Skip to content

Instantly share code, notes, and snippets.

@booherbg
Last active November 10, 2021 22:21
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 booherbg/e4c79ebd46f76a7e0199f28497a0def5 to your computer and use it in GitHub Desktop.
Save booherbg/e4c79ebd46f76a7e0199f28497a0def5 to your computer and use it in GitHub Desktop.
ffmpeg split video
ffmpeg -ss 00:00:00.000 -i turtle.mkv -t 00:45:00.000 -c copy out.mkv

To cut out a section, just split it before and after the section to cut, then create a file with the filenames in it and run concat:

:: Create File List
echo file file1.mp4 >  mylist.txt 
echo file file2.mp4 >> mylist.txt
echo file file3.mp4 >> mylist.txt

:: Concatenate Files
ffmpeg -f concat -i mylist.txt -c copy output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment