The World’s Largest Online Community for Developers

'; batch file - Extract all video frames as images with FFMPEG - LavOzs.Com

I am trying to convert a MP4 video file into a series of jpg images (out-1.jpg, out-2.jpg etc.) using FFMPEG with,

mkdir frames
ffmpeg -i "%1" -r 1 frames/out-%03d.jpg

However I keep getting errors like,

[image2 @ 00000037f5a811a0] Could not open file : frames/out-C:\Applications\FFMPEG\toGIF.bat3d.jpg av_interleaved_write_frame(): Input/output error frame= 1 fps=0.0 q=5.9 Lsize=N/A time=00:00:01.00 bitrate=N/A video:63kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Conversion failed!

If I take out the %03d part, the conversion works but it only outputs the first frame and the program stops with error.

How can I correctly extract all the frames of the video with FFMPEG?


ffmpeg -i "%1" frames/out-%03d.jpg

A sequence of image files don't have a framerate. If you want to undersample the video file, use -r before the input.


ffmpeg -i "C:\Applications\FFMPEG\aa.mp4" "frames/out-%03d.jpg"
How to lazy load images in ListView in Android
How to vertically align an image inside a div
FFMpeg generates still video
Cutting the videos based on start and end time using ffmpeg
How to add the timestamp as a part of the generated image file name in ffmpeg
ffmpeg: packet size 2073600 < expected frame_size 4147200
ffmpeg - mux video and audio and trim the audio
Piping raw []byte video to ffmpeg - Go