gpt4 book ai didi

ffmpeg - 在整个视频期间显示的标题

转载 作者:行者123 更新时间:2023-12-04 13:16:06 25 4
gpt4 key购买 nike

我用过ffmpeg包创建一个wmv来自 gif 的文件(请参见下文)。标题显示几秒钟,然后消失。有没有我可以应用的设置,以便让标题在整个视频期间出现在视频中?

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

最佳答案

AVFilterGraph 的错误和 drawtext当您的 ffmpeg 在没有 libfreetype 的情况下编译时会发生。

要生成带有文本的图像,您需要使用 libfreetype 编译 ffmpeg。最简单的方法是使用 Homebrew .

假设 homebrew 已经安装:

# 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

关于ffmpeg - 在整个视频期间显示的标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30193626/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com