arthenica / ffmpeg-kit

FFmpeg Kit for applications. Supports Android, Flutter, iOS, Linux, macOS, React Native and tvOS. Supersedes MobileFFmpeg, flutter_ffmpeg and react-native-ffmpeg.
https://arthenica.github.io/ffmpeg-kit
GNU Lesser General Public License v3.0
4.52k stars 603 forks source link

Add text overlay to video causes this issue #1036

Open farmanullahQAU opened 2 months ago

farmanullahQAU commented 2 months ago

[AVFilterGraph @ 0xb400007b93c78b80] No such filter: 'drawtext'

a0m0rajab commented 2 months ago

I had the same issue before, and here is my solution to it: I installed a package that uses GPL mode; if you are using the minimum package, it would not support this.

Here is the information about the packages: https://github.com/arthenica/ffmpeg-kit?tab=readme-ov-file#9-packages

a0m0rajab commented 2 months ago

Duplicate of: https://github.com/arthenica/ffmpeg-kit/issues/991

Answer by the maintainer:

To enable compilation of this filter, you need to configure FFmpeg with --enable-libfreetype. 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.

This message from @mathieu-aubin explains which libraries are needed for drawtext. Make sure you use an ffmpeg-kit package that includes those libraries.