Skip to content

Instantly share code, notes, and snippets.

@r6m
Created February 25, 2017 13:34
Show Gist options
  • Save r6m/dfd3c6b51990469e53cb3bfbbe9a656f to your computer and use it in GitHub Desktop.
Save r6m/dfd3c6b51990469e53cb3bfbbe9a656f to your computer and use it in GitHub Desktop.
get images from video using ffmpeg
ffmpeg -r 10 -f image2 -s 1920x1080 -i %04d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p test.mp4
# -r is the framerate (fps)
# -i %04d.png (example 0001.png, 0002.png)
# -crf is the quality, lower means better quality, 15-25 is usually good
# -s is the resolution
# -pix_fmt yuv420p specifies the pixel format, change this as needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment