Extract thumbnails of each camera to a video file

Is there a way to detect and retrieve thumbnails of each sudden change (camera change, slide change, scene change, receive?) Of a video file (preferably h264).

Something in the lines of comparison of key frames and look for differences that exceed some given constant.

+4
source share
1 answer

Seams type

ffmpeg -i video.mp4 -vf select="eq(pict_type\,I)" -vsync 0 -an keyframes%03d.png

will do something. This is a video filter that selects only I-Frames , which are basically reference frames that appear every time significant changes occur.

More details here: http://ffmpeg.org/ffmpeg.html#select

This is especially true for MPEG-based compression, I donโ€™t know how other codecs behave.

EDIT: as LordNeckbeard notes, the scene option, as in ffmpeg -i video.mp4 -vf select='gt(scene\,0.9)' -vsync 0 -an keyframes%03d.jpg , works better for what I intend.

+5
source

Source: https://habr.com/ru/post/1443026/


All Articles