[FFmpeg-trac] #5347(undetermined:new): Use of borderw with attached font crashes ffmpeg on Windows

FFmpeg trac at avcodec.org
Thu Mar 17 11:38:11 CET 2016


#5347: Use of borderw with attached font crashes ffmpeg on Windows
-------------------------------------+-------------------------------------
             Reporter:  mulvya       |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Use of command below causes ffmpeg to crash. Use of same command without
 borderw results in successful completion. Use of same command with borderw
 but with cour.ttf (Courier) results in successful completion.

 Using 2016-03-17 Zeranoe build on Windows 7 Ultimate 64-bit (no SP
 installed). Behaviour reproduced on another system with same OS and set of
 font files.

 Command:

 {{{

 ffmpeg -f lavfi -i "color=black:s=1280x720" -filter_complex
 "drawtext=fontfile=bpmono.ttf:text='Hello
 World':fontcolor=white at 1.0:fontsize=16:borderw=5:x=w-tw-10:y=10:box=1:boxcolor=black at 0.5"
 -c:v libx264 -preset veryfast -t 5 textwithborder.mp4 -report
 }}}

 Report:


 {{{
 ffmpeg started on 2016-03-17 at 15:50:25
 Report written to "ffmpeg-20160317-155025.log"
 Command line:
 ffmpeg -f lavfi -i "color=black:s=1280x720" -filter_complex
 "drawtext=fontfile=bpmono.ttf:text='Hello
 World':fontcolor=white at 1.0:fontsize=16:borderw=5:x=w-tw-10:y=10:box=1:boxcolor=black at 0.5"
 -c:v libx264 -preset veryfast -t 5 textwithborder.mp4 -report
 ffmpeg version N-79068-g6b7ce0e Copyright (c) 2000-2016 the FFmpeg
 developers
   built with gcc 5.3.0 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-w32threads
 --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
 --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
 --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype
 --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug
 --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-
 libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp
 --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-
 libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab
 --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-
 libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-
 libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink
 --enable-zlib
   libavutil      55. 19.100 / 55. 19.100
   libavcodec     57. 28.103 / 57. 28.103
   libavformat    57. 28.102 / 57. 28.102
   libavdevice    57.  0.101 / 57.  0.101
   libavfilter     6. 39.102 /  6. 39.102
   libswscale      4.  0.100 /  4.  0.100
   libswresample   2.  0.101 /  2.  0.101
   libpostproc    54.  0.100 / 54.  0.100
 Splitting the commandline.
 Reading option '-f' ... matched as option 'f' (force format) with argument
 'lavfi'.
 Reading option '-i' ... matched as input file with argument
 'color=black:s=1280x720'.
 Reading option '-filter_complex' ... matched as option 'filter_complex'
 (create a complex filtergraph) with argument
 'drawtext=fontfile=bpmono.ttf:text='Hello
 World':fontcolor=white at 1.0:fontsize=16:borderw=5:x=w-tw-10:y=10:box=1:boxcolor=black at 0.5'.
 Reading option '-c:v' ... matched as option 'c' (codec name) with argument
 'libx264'.
 Reading option '-preset' ... matched as AVOption 'preset' with argument
 'veryfast'.
 Reading option '-t' ... matched as option 't' (record or transcode
 "duration" seconds of audio/video) with argument '5'.
 Reading option 'textwithborder.mp4' ... matched as output file.
 Reading option '-report' ... matched as option 'report' (generate a
 report) with argument '1'.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option filter_complex (create a complex filtergraph) with
 argument drawtext=fontfile=bpmono.ttf:text='Hello
 World':fontcolor=white at 1.0:fontsize=16:borderw=5:x=w-tw-10:y=10:box=1:boxcolor=black at 0.5.
 Applying option report (generate a report) with argument 1.
 Successfully parsed a group of options.
 Parsing a group of options: input file color=black:s=1280x720.
 Applying option f (force format) with argument lavfi.
 Successfully parsed a group of options.
 Opening an input file: color=black:s=1280x720.
 detected 4 logical cores
 [Parsed_color_0 @ 00000000003cb3e0] Setting 'color' to value 'black'
 [Parsed_color_0 @ 00000000003cb3e0] Setting 's' to value '1280x720'
 [Parsed_color_0 @ 00000000003cb3e0] size:1280x720 rate:25/1
 duration:-1.000000 sar:1/1
 [AVFilterGraph @ 000000000056ae00] query_formats: 2 queried, 1 merged, 0
 already done, 0 delayed
 [lavfi @ 00000000003c9dc0] All info found
 Input #0, lavfi, from 'color=black:s=1280x720':
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #0:0, 1, 1/25: Video: rawvideo (I420 / 0x30323449), yuv420p,
 1280x720 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
 Successfully opened the file.
 [Parsed_drawtext_0 @ 00000000005e7240] Setting 'fontfile' to value
 'bpmono.ttf'
 [Parsed_drawtext_0 @ 00000000005e7240] Setting 'text' to value 'Hello
 World'
 [Parsed_drawtext_0 @ 00000000005e7240] Setting 'fontcolor' to value
 'white at 1.0'
 [Parsed_drawtext_0 @ 00000000005e7240] Setting 'fontsize' to value '16'
 [Parsed_drawtext_0 @ 00000000005e7240] Setting 'borderw' to value '5'
 [Parsed_drawtext_0 @ 00000000005e7240] Setting 'x' to value 'w-tw-10'
 [Parsed_drawtext_0 @ 00000000005e7240] Setting 'y' to value '10'
 [Parsed_drawtext_0 @ 00000000005e7240] Setting 'box' to value '1'
 [Parsed_drawtext_0 @ 00000000005e7240] Setting 'boxcolor' to value
 'black at 0.5'
 Parsing a group of options: output file textwithborder.mp4.
 Applying option c:v (codec name) with argument libx264.
 Applying option t (record or transcode "duration" seconds of audio/video)
 with argument 5.
 Successfully parsed a group of options.
 Opening an output file: textwithborder.mp4.
 [file @ 00000000005e9200] Setting default whitelist 'file'
 Successfully opened the file.
 [Parsed_drawtext_0 @ 00000000005e73c0] Setting 'fontfile' to value
 'bpmono.ttf'
 [Parsed_drawtext_0 @ 00000000005e73c0] Setting 'text' to value 'Hello
 World'
 [Parsed_drawtext_0 @ 00000000005e73c0] Setting 'fontcolor' to value
 'white at 1.0'
 [Parsed_drawtext_0 @ 00000000005e73c0] Setting 'fontsize' to value '16'
 [Parsed_drawtext_0 @ 00000000005e73c0] Setting 'borderw' to value '5'
 [Parsed_drawtext_0 @ 00000000005e73c0] Setting 'x' to value 'w-tw-10'
 [Parsed_drawtext_0 @ 00000000005e73c0] Setting 'y' to value '10'
 [Parsed_drawtext_0 @ 00000000005e73c0] Setting 'box' to value '1'
 [Parsed_drawtext_0 @ 00000000005e73c0] Setting 'boxcolor' to value
 'black at 0.5'
 [graph 0 input from stream 0:0 @ 00000000005e7240] Setting 'video_size' to
 value '1280x720'
 [graph 0 input from stream 0:0 @ 00000000005e7240] Setting 'pix_fmt' to
 value '0'
 [graph 0 input from stream 0:0 @ 00000000005e7240] Setting 'time_base' to
 value '1/25'
 [graph 0 input from stream 0:0 @ 00000000005e7240] Setting 'pixel_aspect'
 to value '1/1'
 [graph 0 input from stream 0:0 @ 00000000005e7240] Setting 'sws_param' to
 value 'flags=2'
 [graph 0 input from stream 0:0 @ 00000000005e7240] Setting 'frame_rate' to
 value '25/1'
 [graph 0 input from stream 0:0 @ 00000000005e7240] w:1280 h:720
 pixfmt:yuv420p tb:1/25 fr:25/1 sar:1/1 sws_param:flags=2
 [format @ 00000000005e7600] compat: called with
 args=[yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21]
 [format @ 00000000005e7600] Setting 'pix_fmts' to value
 'yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21'
 [AVFilterGraph @ 00000000005e30c0] query_formats: 5 queried, 4 merged, 0
 already done, 0 delayed
 [libx264 @ 00000000005f44a0] using mv_range_thread = 56
 [libx264 @ 00000000005f44a0] using SAR=1/1
 [libx264 @ 00000000005f44a0] using cpu capabilities: MMX2 SSE2Fast SSSE3
 SSE4.2 LZCNT BMI2
 [libx264 @ 00000000005f44a0] profile High, level 3.1
 [libx264 @ 00000000005f44a0] 264 - core 148 r2665 a01e339 - H.264/MPEG-4
 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html -
 options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2
 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0
 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6
 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0
 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25
 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=23.0
 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
 Output #0, mp4, to 'textwithborder.mp4':
   Metadata:
     encoder         : Lavf57.28.102
     Stream #0:0, 0, 1/12800: Video: h264 (libx264) ([33][0][0][0] /
 0x0021), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn,
 25 tbc
     Metadata:
       encoder         : Lavc57.28.103 libx264
     Side data:
       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
 Stream mapping:
   Stream #0:0 (rawvideo) -> drawtext
   drawtext -> Stream #0:0 (libx264)
 Press [q] to stop, [?] for help
 cur_dts is invalid (this is harmless if it occurs once at the start per
 stream)
 [rawvideo @ 00000000003ca3c0] PACKET SIZE: 1382400, STRIDE: 1920
 [Parsed_drawtext_0 @ 00000000005e73c0] Copying data in avfilter.

 }}}

 Windows Error:

 {{{
 Problem signature:
   Problem Event Name:   APPCRASH
   Application Name:     ffmpeg.exe
   Application Version:  0.0.0.0
   Application Timestamp:        a528a508
   Fault Module Name:    StackHash_a90e
   Fault Module Version: 6.1.7600.16385
   Fault Module Timestamp:       4a5be02b
   Exception Code:       c0000374
   Exception Offset:     00000000000c6cd2
   OS Version:   6.1.7600.2.0.0.256.1
   Locale ID:    1033
   Additional Information 1:     a90e
   Additional Information 2:     a90e2c32031d7513030a0c0a3edb6e5d
   Additional Information 3:     ac17
   Additional Information 4:     ac177ea7eaeeb184d564166faca9bf33
 }}}

 Font files bpmono.ttf (error-producing) and cour.ttf (error-free)
 attached.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5347>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list