Free tool
FFmpeg is an incredibly powerful command-line tool for processing video, audio, and images. It's open-source and used by many major software platforms under the hood. With it, you can convert, compress, edit, and produce videos from images or other media formats—right from your terminal or scripts.
Here’s a crash course tailored for producing a video from images or clips:
---
✅ Step 1: Install FFmpeg
Windows: Use https://www.gyan.dev/ffmpeg/builds/
Mac: brew install ffmpeg
Linux (Debian/Ubuntu): sudo apt install ffmpeg
Check it works:
ffmpeg -version
---
🎬 Step 2: Make a Video from Images
If you have image files like frame001.png, frame002.png, ..., here's a command to turn them into a video:
ffmpeg -framerate 24 -i frame%03d.png -c:v libx264 -pix_fmt yuv420p output.mp4
Breakdown:
-framerate 24: 24 frames per second
-i frame%03d.png: Looks for files like frame001.png to frame999.png
-c:v libx264: Use the H.264 video codec
-pix_fmt yuv420p: Widest compatibility for video playback
output.mp4: The final video file
---
🧱 Step 3: Combine Images with Audio
If you want to add a background audio track:
ffmpeg -framerate 24 -i frame%03d.png -i audio.mp3 -shortest -c:v libx264 -pix_fmt yuv420p -c:a aac output_with_audio.mp4
-shortest ensures the video ends when the shorter of the audio or video ends.
---
✂️ Step 4: Trim or Cut Video
To trim the first 10 seconds of video.mp4:
ffmpeg -ss 00:00:10 -i video.mp4 -c copy trimmed.mp4
To cut a specific section (from 10s to 20s):
ffmpeg -ss 00:00:10 -to 00:00:20 -i video.mp4 -c copy clip.mp4
---
🧪 Bonus Tricks
Add a Fade-In/Out Effect:
ffmpeg -i input.mp4 -vf "fade=t=in:st=0:d=2, fade=t=out:st=8:d=2" -c:a copy output.mp4
This fades in for 2 seconds and fades out starting at 8s.
Resize Video:
ffmpeg -i input.mp4 -vf "scale=1280:720" output.mp4
Convert to GIF:
ffmpeg -i input.mp4 -vf "fps=10,scale=320:-1" output.gif
---
🧠Helpful Tips
FFmpeg won’t show a progress bar, but it will log frame data as it processes.
Use -y to automatically overwrite files: ffmpeg -y -i input.mp4 output.mp4
Organize your frames sequentially and consistently named.
---
Would you like a script that turns a folder of AI-generated frames into a full video automatically? Or want to go the other way—split video into frames?
Comments