Myx Myx - 6 months ago 31
Linux Question

ffmpeg split avi into frames with known frame rate

I posted this as comments under this related thread. However, they seem to have gone unnoticed =(

I've used

ffmpeg -i myfile.avi -f image2 image-%05d.bmp


to split
myfile.avi
into frames stored as
.bmp
files. It seemed to work except not quite. When recording my video, I recorded at a rate of
1000fps
and the video turned out to be
2min29sec
long. If my math is correct, that should amount to a total of 149,000 frames for the entire video. However, when I ran

ffmpeg -i myfile.avi -f image2 image-%05d.bmp


I only obtained 4472 files. How can I get the original 149k frames?

I also tried to convert the frame rate of my original AVI to 1000fps by doing

ffmpeg -i myfile.avi -r 1000 otherfile.avi


but this didn't seem to fix my concern.

Answer
ffmpeg -i myfile.avi -r 1000 -f image2 image-%07d.png

I am not sure outputting 150k bmp files will be a good idea. Perhaps png is good enough?

Comments