FFmpeg - Convert images to MP4
FFmpeg command to convert images to MP4 video: *.jpg images in the current directory.
ffmpeg -framerate 2 -pattern_type glob -i '*.jpg' \
-vf "scale=1280:720:force_original_aspect_ratio=decrease,\
pad=1280:720:(ow-iw)/2:(oh-ih)/2" \
-c:v libx264 -pix_fmt yuv420p output.mp4
-framerate 2: set frame rate to 2 frames per second.-pattern_type glob: use glob pattern to match images.-i '*.jpg': input images.-vf "scale=1280:720:force_original_aspect_ratio=decrease,\pad=1280:720:(ow-iw)/2:(oh-ih)/2": video filter to scale the video to 1280x720 pixels and pad the video to 1280x720 pixels.-c:v libx264: set video codec to libx264.-pix_fmt yuv420p: set pixel format to yuv420p.output.mp4: output file.
11. Apr 2026