Quantcast
Channel: How to get screenshots of the middle of each scene using FFMPEG - Stack Overflow
Viewing all articles
Browse latest Browse all 2

How to get screenshots of the middle of each scene using FFMPEG

$
0
0

This code makes a screenshot of the first frame of each scene:

ffmpeg -i video.mp4 -vsync 0 -vf select='gt(scene\,0.4)' -f image2 img-%04d.png

How to get screenshots of the middle of each scene?

For example: start scene - 1:25; end scene - 1:31. How to get a screenshot on 1:28?

I tried this:

ffmpeg -i video.mp4 -vsync 0 -vf select='(prev_selected_t*gt(scene\,0.4)+t*gt(scene\,0.4))/2' -f image2 img-%04d.png

It's doesn't work:(


Viewing all articles
Browse latest Browse all 2

Trending Articles