ffmpeg: `select` filter output frame numbers are off

我怕爱的太早我们不能终老 提交于 2021-02-17 07:12:41

问题


I want to extract certain frames from video, but using this command

ffmpeg -i "video-a.mkv" -vf select="eq(n\,100)" -vsync 0 -frame_pts true "a_%06d.jpg"
ffmpeg -i "video-b.mkv" -vf select="eq(n\,100)" -vsync 0 -frame_pts true "b_%06d.jpg"

it seems I'm getting inconsistent results. for different videos I get differently named files:

a_000103.jpg
b_000101.jpg

why is that?


回答1:


The input in the log file has a delayed video start time. Reset timestamps, to make it independent of that possibility.

ffmpeg -i "video-a.mkv" -vf setpts=N/TB,select="eq(n\,100)" -r 1 -vsync 0 -frame_pts true "a_%06d.jpg"


来源:https://stackoverflow.com/questions/62608513/ffmpeg-select-filter-output-frame-numbers-are-off

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!