特定时间段内的 FFMPEG 缩略图生成

FFMPEG Thumbnail Generation in certain timespan

我根据视频的长度定期生成缩略图:

ffmpeg -i "/my/dir/tmp/mymovie.mp4" -vf fps=4/259 /my/dir/tmp/123456/mymoviethumb%d.jpg

现在我只想使用视频的前 30 秒并从中抓取 5 个缩略图。我被卡住了,谁能帮帮我,给我一个示例命令,我该怎么做?

ffmpeg -i input.mp4 -t 30 -vf fps=1/6:round=inf out_%d.jpg

其中:

-t 30 - 将持续时间限制为 30 秒

fps=1/6 - 30s / 5 = 6s,从 0

舍入