Created
June 4, 2015 02:45
-
-
Save klaxa/6c54f54f6b2b6ace34b5 to your computer and use it in GitHub Desktop.
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
First generate a list of the timestamps of the I-frames: | |
mkvinfo -s input.mkv | grep track\ 1 | grep I\ frame | grep -o -E "[0-9]{1,2}\:[0-9]{1,2}\:[0-9]{1,2}\.[0-9]{3}" > I-frames_stripped.txt | |
Now copy the timestamps you want into another file. | |
Then you can run: | |
mkvmerge --split timecodes:$(cat marks.txt) input.mkv -o input_split.mkv | |
where marks.txt contains your timestamps. | |
You can then use: | |
mkvmerge -o combined.mkv input_split-001.mkv + input_split-002.mkv + input_split-003.mkv [...] | |
to combine your videofiles. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment