Skip to content

Instantly share code, notes, and snippets.

@Eagle-E
Created February 21, 2024 17:37
Show Gist options
  • Save Eagle-E/eac9244b7599a4d56bf988de2776fff5 to your computer and use it in GitHub Desktop.
Save Eagle-E/eac9244b7599a4d56bf988de2776fff5 to your computer and use it in GitHub Desktop.
ffmpeg extract frames from video
ffmpeg -i video.mp4 -r 10 -s 640x360 -q:v 2 -vframes 25 frame%03d.jpg
# -r = frames per second
# -vframes = number of total frames to extract
# -s = resolution (width x height)
# -q:v = quality of extracted frames, 1 (highest) to 31 (lowest quality)
# frame%03d.jpg = output path (i.e. frame000.jpg, frame001.jpg, ...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment