The original bug-report expresses doubt about the solution proposed. As documented here: https://ffmpeg.org/ffmpeg-all.html#drawtext-1
the build must be configured with both --enable-libfreetype and --enable-libharfbuzz. I can confirm that is correct, when building ffmpeg against current git head. Leo
ffmpeg started on 2023-11-28 at 15:32:08 Report written to "ffmpeg-20231128-153208.log" Log level: 48 Command line: ./ffmpeg -y -report -f lavfi -i "testsrc=duration=5:size=hd720:rate=10" -filter_complex "drawtext=fontsize=30:fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf:text=\"hello world\":x=(w-text_w)/2:y=(h-text_h)/2" -f mpegts /tmp/out.ts ffmpeg version N-112875-g47e214245b-3 Copyright (c) 2000-2023 the FFmpeg developers built with gcc 13 (Debian 13.2.0-5) configuration: --enable-libfreetype --enable-libharfbuzz --enable-libx264 --enable-gpl --prefix=/usr --extra-version=3 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls libavutil 58. 32.100 / 58. 32.100 libavcodec 60. 35.100 / 60. 35.100 libavformat 60. 18.100 / 60. 18.100 libavdevice 60. 4.100 / 60. 4.100 libavfilter 9. 14.100 / 9. 14.100 libswscale 7. 6.100 / 7. 6.100 libswresample 4. 13.100 / 4. 13.100 libpostproc 57. 4.100 / 57. 4.100 Splitting the commandline. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'. Reading option '-f' ... matched as option 'f' (force format) with argument 'lavfi'. Reading option '-i' ... matched as output url with argument 'testsrc=duration=5:size=hd720:rate=10'. Reading option '-filter_complex' ... matched as option 'filter_complex' (create a complex filtergraph) with argument 'drawtext=fontsize=30:fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf:text="hello world":x=(w-text_w)/2:y=(h-text_h)/2'. Reading option '-f' ... matched as option 'f' (force format) with argument 'mpegts'. Reading option '/tmp/out.ts' ... matched as output url. Finished splitting the commandline. Parsing a group of options: global . Applying option y (overwrite output files) with argument 1. Applying option report (generate a report) with argument 1. Applying option filter_complex (create a complex filtergraph) with argument drawtext=fontsize=30:fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf:text="hello world":x=(w-text_w)/2:y=(h-text_h)/2. [AVFilterGraph @ 0x55677bdf0580] Setting 'fontsize' to value '30' [AVFilterGraph @ 0x55677bdf0580] Setting 'fontfile' to value '/usr/share/fonts/truetype/freefont/FreeSerif.ttf' [AVFilterGraph @ 0x55677bdf0580] Setting 'text' to value '"hello world"' [AVFilterGraph @ 0x55677bdf0580] Setting 'x' to value '(w-text_w)/2' [AVFilterGraph @ 0x55677bdf0580] Setting 'y' to value '(h-text_h)/2' Successfully parsed a group of options. Parsing a group of options: input url testsrc=duration=5:size=hd720:rate=10. Applying option f (force format) with argument lavfi. Successfully parsed a group of options. Opening an input file: testsrc=duration=5:size=hd720:rate=10. [AVFilterGraph @ 0x55677bdf5040] Setting 'duration' to value '5' [AVFilterGraph @ 0x55677bdf5040] Setting 'size' to value 'hd720' [AVFilterGraph @ 0x55677bdf5040] Setting 'rate' to value '10' detected 8 logical cores [Parsed_testsrc_0 @ 0x55677bdf2240] size:1280x720 rate:10/1 duration:5.000000 sar:1/1 [AVFilterGraph @ 0x55677bdf5040] query_formats: 2 queried, 1 merged, 0 already done, 0 delayed [lavfi @ 0x55677bdf4940] All info found Input #0, lavfi, from 'testsrc=duration=5:size=hd720:rate=10': Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0, 1, 1/10: Video: wrapped_avframe, rgb24, 1280x720 [SAR 1:1 DAR 16:9], 10 fps, 10 tbr, 10 tbn Successfully opened the file. Parsing a group of options: output url /tmp/out.ts. Applying option f (force format) with argument mpegts. Successfully parsed a group of options. Opening an output file: /tmp/out.ts. [out#0/mpegts @ 0x55677bdfac40] Creating output stream from unlabeled output of complex filtergraph 0. This overrides automatic video mapping. [vost#0:0/mpeg2video @ 0x55677bdfbe00] Created video stream from complex filtergraph 0:[drawtext:default] [vost#0:0/mpeg2video @ 0x55677bdfbe00] [out#0/mpegts @ 0x55677bdfac40] No explicit maps, mapping streams automatically... [file @ 0x55677bdfef80] Setting default whitelist 'file,crypto,data' Successfully opened the file. Stream mapping: Stream #0:0 (wrapped_avframe) -> drawtext:default drawtext:default -> Stream #0:0 (mpeg2video) Press [q] to stop, [?] for help [AVFilterGraph @ 0x55677bdff640] Setting 'fontsize' to value '30' [AVFilterGraph @ 0x55677bdff640] Setting 'fontfile' to value '/usr/share/fonts/truetype/freefont/FreeSerif.ttf' [AVFilterGraph @ 0x55677bdff640] Setting 'text' to value '"hello world"' [AVFilterGraph @ 0x55677bdff640] Setting 'x' to value '(w-text_w)/2' [AVFilterGraph @ 0x55677bdff640] Setting 'y' to value '(h-text_h)/2' [graph 0 input from stream 0:0 @ 0x55677be04ec0] Setting 'video_size' to value '1280x720' [graph 0 input from stream 0:0 @ 0x55677be04ec0] Setting 'pix_fmt' to value '2' [graph 0 input from stream 0:0 @ 0x55677be04ec0] Setting 'time_base' to value '1/10' [graph 0 input from stream 0:0 @ 0x55677be04ec0] Setting 'pixel_aspect' to value '1/1' [graph 0 input from stream 0:0 @ 0x55677be04ec0] Setting 'frame_rate' to value '10/1' [graph 0 input from stream 0:0 @ 0x55677be04ec0] w:1280 h:720 pixfmt:rgb24 tb:1/10 fr:10/1 sar:1/1 [format @ 0x55677be05f00] Setting 'pix_fmts' to value 'yuv420p|yuv422p' [auto_scale_0 @ 0x55677be055c0] w:iw h:ih flags:'' interl:0 [format @ 0x55677be05f00] auto-inserting filter 'auto_scale_0' between the filter 'Parsed_drawtext_0' and the filter 'format' [AVFilterGraph @ 0x55677bdff640] query_formats: 4 queried, 2 merged, 1 already done, 0 delayed [auto_scale_0 @ 0x55677be055c0] picking yuv420p out of 2 ref:rgb24 alpha:0 [auto_scale_0 @ 0x55677be055c0] w:1280 h:720 fmt:rgb24 sar:1/1 -> w:1280 h:720 fmt:yuv420p sar:1/1 flags:0x00000004 [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [mpeg2video @ 0x55677bdfc1c0] intra_quant_bias = 96 inter_quant_bias = 0 [mpegts @ 0x55677bdfad80] service 1 using PCR in pid=256, pcr_period=100ms [mpegts @ 0x55677bdfad80] muxrate VBR, sdt every 500 ms, pat/pmt every 100 ms Output #0, mpegts, to '/tmp/out.ts': Metadata: encoder : Lavf60.18.100 Stream #0:0, 0, 1/90000: Video: mpeg2video (Main), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 10 fps, 90k tbn Metadata: encoder : Lavc60.35.100 mpeg2video Side data: cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A frame= 0 fps=0.0 q=0.0 size= 0kB time=N/A bitrate=N/A speed=N/A [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [in#0/lavfi @ 0x55677bdf47c0] EOF while reading input [in#0/lavfi @ 0x55677bdf47c0] Terminating demuxer thread [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [Parsed_drawtext_0 @ 0x55677bdffe00] Copying data in avfilter. [drawtext @ 0x55677be00e40] Line: 0 -- glyphs count: 13 - width64: 9982 - offset_left64: 140 - offset_right64: 768) [vist#0:0/wrapped_avframe @ 0x55677bdf9400] Decoder thread received EOF packet [vist#0:0/wrapped_avframe @ 0x55677bdf9400] Decoder returned EOF, finishing [vist#0:0/wrapped_avframe @ 0x55677bdf9400] Terminating decoder thread [out_0_0 @ 0x55677be05b00] EOF on sink link out_0_0:default. No more output streams to write to, finishing. [out#0/mpegts @ 0x55677bdfac40] All streams finished [out#0/mpegts @ 0x55677bdfac40] Terminating muxer thread [AVIOContext @ 0x55677bdff0c0] Statistics: 337272 bytes written, 0 seeks, 2 writeouts [out#0/mpegts @ 0x55677bdfac40] Output file #0 (/tmp/out.ts): [out#0/mpegts @ 0x55677bdfac40] Output stream #0:0 (video): 50 frames encoded; 50 packets muxed (304332 bytes); [out#0/mpegts @ 0x55677bdfac40] Total: 50 packets (304332 bytes) muxed [out#0/mpegts @ 0x55677bdfac40] video:297kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 10.823706% frame= 50 fps=0.0 q=5.1 Lsize= 329kB time=00:00:04.80 bitrate= 562.1kbits/s speed=24.6x [in#0/lavfi @ 0x55677bdf47c0] Input file #0 (testsrc=duration=5:size=hd720:rate=10): [in#0/lavfi @ 0x55677bdf47c0] Input stream #0:0 (video): 50 packets read (24000 bytes); 50 frames decoded; 0 decode errors; [in#0/lavfi @ 0x55677bdf47c0] Total: 50 packets (24000 bytes) demuxed