Skip to content

Instantly share code, notes, and snippets.

@FranciscoG
Last active January 17, 2024 16:04
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save FranciscoG/c63760be6d77ab44d919772b2b7b8f82 to your computer and use it in GitHub Desktop.
Save FranciscoG/c63760be6d77ab44d919772b2b7b8f82 to your computer and use it in GitHub Desktop.
Convert Video to Image sequence using ffmpeg
ffmpeg -i input.mov -r 0.25 output_%04d.png
# -i followed by video file sets input stream
# -r set framerat. 1 = 1 frame per second.
# and then set the output file with the number replacement
# more info: https://ffmpeg.org/ffmpeg.html#Main-options
# https://superuser.com/questions/135117/how-to-convert-video-to-images
# add -t MM:SS to reduce how much of the video you want to connvert
ffmpeg -t 00:05 -i input.mov -r 15 output_%04d.png
# reduce the file size of the pngs b
@JGHFunRun
Copy link

Thanks for this! I need to rotoscope (basically trace a video for an animation) a video of myself for an animation class and the software I have to use requires you to import one frame at a time (it's bad software, I wouldn't use it if I didn't have to)

@Techpro709
Copy link

Thanks so much. Same reason as above!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment