Instantly share code, notes, and snippets.

Embed
What would you like to do?
ffmpeg cheatsheet
# images to video at 10 images per second, 64x64 resolution, named like 000000.jpg
# -start_number 12 starts at image 12
# -vframes 100 creates a video with 100 frames
# the -pix_fmt option makes it quicktime compatible
ffmpeg -y -r 10 -f image2 -s 64x64 -start_number 12 -i %06d.jpg -vframes 100 -pix_fmt yuv420p -vcodec libx264 ./video.mp4
# video to images, image size of 160x128, 10 frames per second, named like 000000.png,
# starting at 000100.png
ffmpeg -i video.mp4 -s 160x128 -vf fps=10 -start_number 100 %06d.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment