Extract Video Frames with FFmpeg
-
Install FFmpeg and make sure the
ffmpegcommand is available. -
Open a terminal in the directory containing your video.
-
Create the output directory:
mkdir output_frames -
Run the command that matches the frames you need. Replace
input.mp4with your video's filename.
Extract Every Frame
ffmpeg -i input.mp4 output_frames/frame_%04d.png
Extract at a Fixed Frame Rate
This example creates 10 frames per second. Change 10 as needed.
ffmpeg -i input.mp4 -vf "fps=10" output_frames/frame_%04d.png
Resize Extracted Frames
This example scales every frame to 1280×720.
ffmpeg -i input.mp4 -vf "scale=1280:720" output_frames/frame_%04d.png
The numbered PNG files in output_frames can be used to create an AFMA or classic FMA animation. Fewer frames and smaller dimensions reduce file size and memory use.