Skip to content

Instantly share code, notes, and snippets.

@njanakiev
Created January 3, 2018 11:34
Show Gist options
  • Save njanakiev/e2e1ed4a6e5358d5dbe24e803c040bb9 to your computer and use it in GitHub Desktop.
Save njanakiev/e2e1ed4a6e5358d5dbe24e803c040bb9 to your computer and use it in GitHub Desktop.
FFmpeg Commands

FFmpeg Commands

This is a collection of useful ffmpeg commands. Detailed description of the commands can be found in the documentation

Extract frames from video, one frame per second, where -r sets the desired framerate (e.g. -r 10 extracts 10 frames per second).

ffmpeg -i movie.mp4 -r 1 frames\\frame_%%04d.png

Create Instagram compatible video from frames

ffmpeg -framerate 30 -i frames\\frame_%%04d.jpg -c:v libx264 -strict -2 -c:a aac -ar 44100 -r 30 -pix_fmt yuv420p -shortest movie.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment