Log in

View Full Version : Using mkvmerge split to get a sample


FreQi
27th October 2006, 00:01
When I want to cut a small part of an MKV, I use mkvmerge's --split option, but I have no way of telling it to just make one file. I have tried using --split-max-files 1, but it say's I have supplied a "wrong argument" and fails. I figure that's because "split" is meant to retain the entire input clip but just cut it up into parts, but I only want a sample of the input file. To get that, I have to hit ctrl-c to kill the processing after mkvmerge has made a few files. Here is what I am using now:

mkvmerge.exe -o "%OUTFILE%" --language 1:eng --default-track 1 --display-dimensions 1:16x9 --language 2:eng --default-track 2 -a 2 -d 1 -S %INFILE% --track-order 0:1,0:2 --split duration:00:01:00

I have tried using combinations like "--split duration:00:01:00 --split 00:05:00 --split-max-files 2" thinking maybe it would give me a one minute sample taken 5mins in from the start of the file, but instead I get 2 files with the first minute of the input clip in the first file and the rest of the input in the second file.

Is there another way to cut samples naturally without having to kill the process? Can "1" be made to be a legal argument to --split-max-files which would trigger the --split durration: and --split time stamps to be used as places to cut a sample from?

unskinnyboy
27th October 2006, 04:23
Let's say you want to take a sample of your MKV, starting from 5 mins into your movie and lasting for 10 mins, try:

.......--split timecodes:00:05:00,00:15:00 --split-max-files 3

3 files will be created, but the second one will be the sample you need.

FreQi
27th October 2006, 06:20
Cool, so I can cut the file at a certain point and for a certain amount of time, but it'll still make the leading and trailing segments... Is there any way to tell it to make only the one file in the middle?

I'm really trying to find a way to automate it, so I can't rely on hitting ctrl-c, and I don't want to wait for it to make these extra files I'd end up deleting anyway. I'm pretty much expecting it would require a change to the program, but figured I'd ask if it's already possible.