【发布时间】:2015-07-23 11:45:00
【问题描述】:
我使用ffmpeg 包从gif 创建了一个wmv 文件(请参见下文)。标题显示几秒钟,然后消失。有没有我可以应用的设置,以便让标题在整个视频期间出现在视频中?
ffmpeg -i Input.gif -s 300x300 -metadata title="Testing" Output.wmv
根据 Maxito 的建议,我已将代码修改为
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
收到以下错误消息:
[AVFilterGraph @ 0x100115cc0] No such filter: 'drawtext'
Error opening filters!
这是我在 Mac 10.6.8 上使用的 ffmpeg 版本。是否需要重新编译?
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
【问题讨论】:
-
如果您的显示是指“在 vlc 中”,那是客户端/播放的东西,而不是编码的东西,FWIW
-
谢谢,@rogerdpack。有没有办法使用 ffmpeg 将文本添加到将出现在每一帧中的视频文件中?
-
Text on video ffmpeg 的可能重复项
-
现在看来他已经掌握了正确的命令,问题是关于
AVFilterGraph错误。