Skip to content

Instantly share code, notes, and snippets.

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 shrekuu/cf7ee308d1c6312c987797a60264138a to your computer and use it in GitHub Desktop.
Save shrekuu/cf7ee308d1c6312c987797a60264138a to your computer and use it in GitHub Desktop.
Remove a section from the middle of a video
# cut from the beginning of the video to the beginning of the unwanted part
ffmpeg.exe -ss 00:00:00.000 -t 00:19:00.000 -i original.mp4 -c:v copy -c:a copy part1.mp4
# cut from the ending of the unwanted part to the end of the video
ffmpeg.exe -ss 00:20:28.000 -t 01:26:25.000 -i original.mp4 -c:v copy -c:a copy part2.mp4
# create a list file
touch list.txt
echo file part1.mp4 > list.txt
echo file part2.mp4 >> list.txt
# concat the two parts, then you get the final.mp4 video
ffmpeg.exe -f concat -i list.txt -c copy final.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment