how can i convert a video to images using ffmpeg? Example am having a video with total duration 60 seconds. I want images between different set of duration like between 2-6 seconds, then between 15-24 seconds and so on. Is that possible using ffmpeg?
Two quick-and-dirty ways: Use the FFmpeg executable with the seek option. You'll need to convert to a time first, e.g. if I want frame 150 and my video is 29.97 FPS the command will be ffmpeg -ss 00:00:05.01 -i myvideo. avi -frames:v 1 myimage.
Official ffmpeg documentation on this: Create a thumbnail image every X seconds of the video
Output one image every second:
ffmpeg -i input.mp4 -vf fps=1 out%d.png
Output one image every minute:
ffmpeg -i test.mp4 -vf fps=1/60 thumb%04d.png
Output one image every 10 minutes:
ffmpeg -i test.mp4 -vf fps=1/600 thumb%04d.png
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With