Here is the code for extracting frames from a MP4
video.
ffmpeg -i above_marathon_250.mp4 images%03d.bmp
But the same code does not work for YUV
format video.
Does anyone knows how it is possible to extract frame(s) from YUV
format video?
It's not working because yuv files have no header, so ffmpeg doesn't know what size/pixfmt the file is. You need to specify resolution and pixmt manually:
ffmpeg -video_size 1920x1080 -r 25 -pixel_format yuv422p -i file.yuv output-%d.png
And then adjust size/pixfmt to match your particular video.
[edit] I'd also suggest to post such questions on superuser in the future, this has nothing to do with programming.
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