3

I want to extract images from a video I want thous images to be extracted from specific time for example 0:30 1:15 1:45 and I would love them to be in PNG format as well

Thank you in advanced

Update Thank you rechengehirn and Rmano Sadly I can not except both of your answer and I selected it randomly sorry for that but I thought it would be fair like that because both of your answers work so Thank you again

Levan
  • 10,880

2 Answers2

2

This works for me:

ffmpeg -i input_movie.mp4 -ss 00:00:05 -f image2 -vframes 1 imagename.png

Where the options are:

-i              > The input video file
-ss  00:00:05   > Start at Second 5 of movie
-f image2       > Force image output
-vframes 1      > Set the number of video frames to record

You can read the ffmpeg documentation on: http://ffmpeg.org/ffmpeg.html

Evenbit GmbH
  • 4,636
  • -f image2 is not needed. It is usually used in scripts where the output file name may be ambiguous to ffmpeg. – llogan Nov 12 '13 at 18:40
1

I am using a static build of a recent ffmpeg, but it should not matter. What I use is

ffmpeg -i videoin.avi -ss 30 -r 1 -t 1 myimage.png

that skips the first 30 seconds, then use a framerate of 1 frame/sec and creates images for 1 second.

Googling around I found this: http://linuxers.org/tutorial/how-extract-images-video-using-ffmpeg with a bit more options.

Rmano
  • 31,947