Last active
March 13, 2022 04:21
-
-
Save shrekuu/cf7ee308d1c6312c987797a60264138a to your computer and use it in GitHub Desktop.
Remove a section from the middle of a video
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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