问题
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