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
libavformat60. 18.100 / 60. 18.100
libavdevice60. 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
libpostproc57. 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.00 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.00, 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 @