Skip to content

Instantly share code, notes, and snippets.

@RyanHirsch
Created January 7, 2017 13:51
Show Gist options
  • Select an option

  • Save RyanHirsch/7cee07319561df804ea3d4289f481a7c to your computer and use it in GitHub Desktop.

Select an option

Save RyanHirsch/7cee07319561df804ea3d4289f481a7c to your computer and use it in GitHub Desktop.
ffmeg

Get Info

ffmpeg -i input.avi

Remove the first 2 seconds from a video

ffmpeg -ss 2 -i input.flv -vcodec copy -acodec copy output.flv

Re-Encode as MKV

ffmpeg -i ".\capture - 27 November 2016 - 10-37-43 AM.avi" -c:v libx264 -preset slow -crf 22 -c:a copy ..\video\2016-11-27.mkv

Extract Audio as MP3

ffmpeg -i ".\capture - 27 November 2016 - 10-37-43 AM.avi"  ..\audio\2016-11-27.mp3

Create a new file with the first 10 seconds of the original

ffmpeg -i INFILE.avi -vcodec copy -acodec copy -ss 00:00:00.000 -t 00:00:10.000 OUTFILE.avi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment