ffmpeg -framerate 24 -pattern_type glob -i "*.jpg" -c:v libx264 -pix_fmt yuv420p output.mp4
Parameter | Description |
---|---|
-framerate 24 |
Sets the input frame rate (how many images per second) |
-pattern_type glob |
Uses glob pattern matching for finding files |
-i "*.jpg" |
Specifies all JPG files in the current directory as input |
-c:v libx264 |
Sets the video codec to H.264 |
-pix_fmt yuv420p |
Sets the pixel format to YUV 4:2:0 (required for compatibility) |
ffmpeg -framerate 30 -i img%04d.jpg -c:v libx264 -pix_fmt yuv420p -crf 20 numbered_timelapse.mp4
Works with sequentially numbered files (img0001.jpg, img0002.jpg, etc.) at 30 fps.
ffmpeg -framerate 10 -pattern_type glob -i "*.jpg" -vf "minterpolate='fps=30'" -c:v libx264 -pix_fmt yuv420p slow_motion.mp4
Uses motion interpolation to create smooth slow-motion effect from 10fps to 30fps output.
ffmpeg -framerate 15 -pattern_type glob -i "*.jpg" -vf "zoompan=d=2:zoom='min(1.3,1+0.002*n)':x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'" -c:v libx264 -pix_fmt yuv420p -crf 22 ken_burns.mp4
Creates a Ken Burns effect with slow zoom on each frame while creating the timelapse.