Skip to content

Instantly share code, notes, and snippets.

@cnruby
Last active March 28, 2020 01:04
Show Gist options
  • Save cnruby/39685f9e819a9f1440d2886044828063 to your computer and use it in GitHub Desktop.
Save cnruby/39685f9e819a9f1440d2886044828063 to your computer and use it in GitHub Desktop.
Cutting the videos based on start and end time using ffmpeg
// https://stackoverflow.com/questions/18444194/cutting-the-videos-based-on-start-and-end-time-using-ffmpeg
INPUT_VIDEO=input
CUT_OUTPUT_VIDEO=cut_output
BEGIN_TIME="00:00:03"
END_TIME="00:00:08"
ffmpeg -ss $BEGIN_TIME -t $END_TIME -i $INPUT_VIDEO.mp4 -acodec copy -vcodec copy -async 1 $CUT_OUTPUT_VIDEO.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment