Andy
Andy

Reputation: 115

FFMPEG not extracting all the frames from a video

I am trying to extract all the frames from a video in order to get some training data for a tensor flow project. However whenever I run

ffmpeg -i one.mp4 -r 1/1 "$filename%03d.jpeg"

I only get 15 pictures. My phone films in 30fps, and the video was 13 seconds long, so shouldn't I get roughly 490 pictures?

Is there an error in my understanding or am I using the wrong function?

Upvotes: 2

Views: 4203

Answers (1)

Gyan
Gyan

Reputation: 93329

You've added an output frame rate of 1, so FFmpeg will pick one frame out of every second of the input. You want all frames with no drops or duplicates, so use

ffmpeg -i one.mp4 -vsync 0 "$filename%03d.jpeg"

Upvotes: 6

Related Questions