Created
March 29, 2020 18:48
-
-
Save mauricioprado00/c1c2f0b707333e67524daaba080b4740 to your computer and use it in GitHub Desktop.
Split mkv file in two
This file contains 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
#!/usr/bin/env bash | |
file=$1 | |
time1=$2 | |
time2=$3 | |
echo "Two commands" | |
time ffmpeg -v quiet -y -i ${file} -vcodec copy -acodec copy -ss 00:00:00 -t ${time1} -sn part_1_${file} | |
time ffmpeg -v quiet -y -i ${file} -vcodec copy -acodec copy -ss ${time1} -t ${time2} -sn part_2_${file} | |
# see https://stackoverflow.com/questions/5651654/ffmpeg-how-to-split-video-efficiently | |
#echo "One command" | |
#time ffmpeg -v quiet -y -i input.ts -vcodec copy -acodec copy -ss 00:00:00 -t 00:30:00 \ | |
# -sn test3.mkv -vcodec copy -acodec copy -ss 00:30:00 -t 01:00:00 -sn test4.mkv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment