Skip to content

Instantly share code, notes, and snippets.

@evantbyrne
Created April 1, 2017 20:59
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 evantbyrne/1d68ddf2822177f0d945200b7915815e to your computer and use it in GitHub Desktop.
Save evantbyrne/1d68ddf2822177f0d945200b7915815e to your computer and use it in GitHub Desktop.
ffmpeg cut video time
# Cut five seconds off beginning
ffmpeg -i original.mkv -strict experimental -c:v copy -c:a copy -ss 00:00:05 cut.mkv
# Cut to ten seconds in length, starting at five seconds (5-15s)
ffmpeg -i original.mkv -strict experimental -c:v copy -c:a copy -ss 00:00:05 -t 00:00:10 cut.mkv
# Cut everything before five seconds, cut everything after eight seconds (5-8s)
ffmpeg -i original.mkv -strict experimental -c:v copy -c:a copy -ss 00:00:05 -to 00:00:08 cut.mkv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment