Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FFMPEG- Convert video to images

Tags:

ffmpeg

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?

like image 644
hack Avatar asked Oct 17 '16 13:10

hack


People also ask

How do I extract frames from a video 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.


1 Answers

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 
like image 93
Vitaliy Fedorchenko Avatar answered Oct 17 '22 06:10

Vitaliy Fedorchenko