I have used the ffmpeg
package to create a wmv
file from gif
(please see below). The title displays for a few seconds, then disappears. Is there a setting I can apply, in order to have the title appearing in the video throughout the duration?
ffmpeg -i Input.gif -s 300x300 -metadata title="Testing" Output.wmv
Following the suggestion by Maxito, I have modified the code to
ffmpeg -i Input.gif -vf drawtext="text='Text to write is this one, overlaid':fontsize=20:fontcolor=red:x=100:y=100" Output_Text.wmv
The following error message was received:
[AVFilterGraph @ 0x100115cc0] No such filter: 'drawtext'
Error opening filters!
This is the version of ffmpeg I used on Mac 10.6.8. Is there a need to re-compile?
ffmpeg version 2.5.3
built on Jan 19 2015 13:08:24 with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libgsm --enable-libvidstab --enable-libx265 --arch=x86_64 --enable-runtime-cpudetect
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 13.100 / 56. 13.100
libavformat 56. 15.102 / 56. 15.102
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 2.103 / 5. 2.103
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
The error with AVFilterGraph
and drawtext
happens when your ffmpeg is compiled without libfreetype.
To generate images with text, you need to compile ffmpeg with libfreetype. The easiest way to do this is with Homebrew.
Assuming homebrew is already installed:
# If ffmpeg is already installed, you need to uninstall it.
brew uninstall ffmpeg
# you may very well want to specify other options (e.g. --with-faac)
brew install ffmpeg --with-freetype
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With