Skip to content

Instantly share code, notes, and snippets.

@vo
Created September 30, 2016 18:41
Show Gist options
  • Save vo/c705f0acf3a5c301c70d949ae81b4cad to your computer and use it in GitHub Desktop.
Save vo/c705f0acf3a5c301c70d949ae81b4cad to your computer and use it in GitHub Desktop.
examples of trimming and re-encoding video using ffmpeg on the command line
# examples for trimming without re-encoding
ffmpeg -ss 01:48:12 -i in.ogv -t 00:02:37 -c copy out.ogv
# examples for trimming a video
ffmpeg -ss 00:12:30 -i in.ogv -t 00:12:55 -filter:v "crop=1774:999:16:42" -c:v libx264 -preset slow out1.mp4
ffmpeg -ss 01:48:12 -i in.ogv -t 00:02:37 -filter:v "crop=1763:999:0:51" -c:v libx264 -preset slow out2.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment