From: Alex Tsang Subject: graphics/ffmpeg: Fix drawtext filter To: "ports@openbsd.org" Date: Tue, 20 May 2025 10:28:24 +0000 Hi Brad, ports, After upgrading to OpenBSD 7.7 I notice that the drawtext filter in FFmpeg no longer works. For example: ffmpeg -i input.jpeg -vf "drawtext=fontsize=20:fontcolor=Red:fontfile='/usr/X11R6/lib/X11/fonts/TTF/DejaVuSans.ttf':text='test'" output.jpeg The expected behaviour is to generate a new image file output.jpeg with the text "test" in red on top-left corner. At the time of writing, running the command gives the following error: [AVFilterGraph @ 0xe9320c9fc00] No such filter: 'drawtext' [vost#0:0/mjpeg @ 0xe9320c9b400] Error initializing a simple filtergraph Looking at the manpage of ffmpeg-filters [0], regarding the drawtext filter, it says: To enable compilation of this filter, you need to configure FFmpeg with "--enable-libfreetype" and "--enable-libharfbuzz". To enable default font fallback and the font option you need to configure FFmpeg with "--enable-libfontconfig". To enable the text_shaping option, you need to configure FFmpeg with "--enable-libfribidi". In the Makefile, all options are set, except "--enable-libharfbuzz". I can confirm that the harfbuzz-11.0.0 package is installed on the computer, though. This patch was prepared by Brad, I tested it on OpenBSD 7.7 amd64. I can see the image file being generated as expected. [0]: https://ffmpeg.org/ffmpeg-filters.html#drawtext-1 Ok? Index: graphics/ffmpeg/Makefile =================================================================== RCS file: /cvs/ports/graphics/ffmpeg/Makefile,v diff -u -p -r1.244 Makefile --- graphics/ffmpeg/Makefile 20 Mar 2025 08:48:34 -0000 1.244 +++ graphics/ffmpeg/Makefile 20 May 2025 07:11:56 -0000 @@ -2,7 +2,7 @@ COMMENT= audio/video converter and strea V= 6.1.2 DISTNAME= ffmpeg-${V} -REVISION= 1 +REVISION= 2 EPOCH= 1 CATEGORIES= graphics multimedia SITES= https://ffmpeg.org/releases/ @@ -27,11 +27,11 @@ MAINTAINER= Brad Smith