【问题标题】:Subtitle not visible while converting GIF with ffmpeg使用 ffmpeg 转换 GIF 时字幕不可见
【发布时间】:2017-09-12 10:05:18
【问题描述】:

我无法制作具有适当质量和字幕的字幕 gif。这是我的 bash 脚本:

start_time=00:00:45
duration=5


PALETTE="palette.png"
SUBTITLE="subtitles=sub.srt:force_style='Fontsize=24'"
FILTERS="fps=20,scale=400:-1:flags=lanczos"




ffmpeg -ss $start_time -t $duration -i $1 -vf "$FILTERS,palettegen" -y $PALETTE 
ffmpeg -ss $start_time -t $duration -i $1 -i $PALETTE -lavfi "$FILTERS[x];[x][1:v] paletteuse" -y $2 -vf $SUBTITLE

它没有返回错误,只是输出 gif 上没有字幕。已经有一个相关问题here,但也没有用。

【问题讨论】:

标签: bash filter ffmpeg gif subtitle


【解决方案1】:

FILTERS 应包含字幕过滤器。

FILTERS="fps=20,scale=400:-1:flags=lanczos,subtitles=sub.srt:force_style='Fontsize=24'"

并删除-vf $SUBTITLE

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2016-09-30
  • 2020-09-02
  • 2014-10-09
  • 2017-04-20
  • 1970-01-01
  • 2014-12-16
  • 1970-01-01
  • 2014-06-01
相关资源
最近更新 更多