Skip to content

Instantly share code, notes, and snippets.

@blixtra
Last active May 22, 2020 03:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blixtra/da16d5120e9bfd34f4723a268a4bbee4 to your computer and use it in GitHub Desktop.
Save blixtra/da16d5120e9bfd34f4723a268a4bbee4 to your computer and use it in GitHub Desktop.
FFmpeg cheat sheet with examples

FFmpeg cheat sheet

This FFmpeg cheat sheet consists of a command-line example reference that we find useful at Kinvolk. Consult the complete FFmpeg documentation for more information.

Cutting/trimming a video

Cut a section from a video using a start (-ss) and end (-to) timestamp and saving the extracted video to output.mp4 and retaining all audio and video settings (-c:v copy -c:a copy), meaning there is not transcoding.

ffmpeg -i input.mp4 -ss 01:19:27 -to 02:18:51 -c:v copy -c:a copy output.mp4

The same as above but instead of an end time we provide a duration (-t).

ffmpeg -i input.mp4 -ss 00:01:30 -t 00: 10:00 -c:v copy -c:a copy output.mp4

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