FFMPEG frame extraction - stuck

懵懂的女人 提交于 2021-02-10 14:18:30

问题


trying to extract specific frames from a video with the following command (with specific names of files removed!:

ffmpeg -i video.mp4 -vf "select-gte(n\,6956)" -vframes 10262 folder/frame%d.jpg

However, in many cases, this results in the same frame (the first one) extracted repeatedly, rather than a progression of frames extracted.


回答1:


The image sequence muxer, by default, is set to assume a constant frame rate output, so it will fill in missing timestamp gaps with duplicates.

The select filter does not reset timestamps, so, in your command, there's a "gap" from 0 to the timestamp of the first selected frame.

Use instead

ffmpeg -i video.mp4 -vf "select-gte(n\,6956)" -vsync 0 -vframes 10262 folder/frame%d.jpg

This changes video sync method to prevent frame duplication.



来源:https://stackoverflow.com/questions/51496572/ffmpeg-frame-extraction-stuck

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