Splitting .mkv files

MKV playback, recompression, remuxing, codec packs, players, howtos, etc.
Post Reply
macdonjh
Posts: 15
Joined: Sat Dec 05, 2015 11:39 pm

Splitting .mkv files

Post by macdonjh » Thu Aug 08, 2019 2:21 am

I think this has been asked before, but I can't find it, so I'll ask:

I have a few .mkv files, TV series, that have several chapters but each chapter is an episode. What is the right tool to use to split each file into separate files for each episode? MKVToolnix? Is there a utility within MakeMKV for this kind of editing?

Grauhaar
Posts: 257
Joined: Thu Sep 15, 2016 3:46 pm

Re: Splitting .mkv files

Post by Grauhaar » Thu Aug 08, 2019 3:23 am

Can be done with "MKVToolNIX GUI". Go to the output tab and select "Before chapters" and add "all" or specific Chapter numbers.

macdonjh
Posts: 15
Joined: Sat Dec 05, 2015 11:39 pm

Re: Splitting .mkv files

Post by macdonjh » Thu Aug 08, 2019 11:16 pm

Where can I download MKVToolnix? I tried www.MKVToolNix.download and got some driver optimization subscription service. Don't need that.

Grauhaar
Posts: 257
Joined: Thu Sep 15, 2016 3:46 pm

Re: Splitting .mkv files

Post by Grauhaar » Fri Aug 09, 2019 1:27 am

Just downloaded it from https://www.fosshub.com/MKVToolNix.html (passed from https://mkvtoolnix.download/downloads.html). No problem to get and install it.

macdonjh
Posts: 15
Joined: Sat Dec 05, 2015 11:39 pm

Re: Splitting .mkv files

Post by macdonjh » Mon Aug 12, 2019 10:05 pm

Got it. Thanks.

macdonjh
Posts: 15
Joined: Sat Dec 05, 2015 11:39 pm

Re: Splitting .mkv files

Post by macdonjh » Tue Aug 13, 2019 9:55 pm

Got MKVToolNix, thanks for the help with that. My first couple of attempts produced garbage, can somebody help?

I copied an .mkv file (Part I.mkv) into a "sandbox" folder so I could play with it. I opened the MKVToolNix-GUI and added Part I.mkv to the multiplexer Source window.

Then I moved to the Output tab. I asked for Part I to be "split based on timestamps". I put in time stamps, 0:00:00-0:01:14,0:01:14-0:12:39, et cetera. Eleven new files appeared in my output folder. However, when I tried to play the files (using VLC), all I got was a green screen with some miscellaneous pixels.

Just for grins, I played the original file, Part I.mkv, using VLC and had no trouble, it played fine. Does anyone know what my trouble is?

Grauhaar
Posts: 257
Joined: Thu Sep 15, 2016 3:46 pm

Re: Splitting .mkv files

Post by Grauhaar » Wed Aug 14, 2019 6:13 am

macdonjh wrote:
Tue Aug 13, 2019 9:55 pm
Then I moved to the Output tab. I asked for Part I to be "split based on timestamps". I put in time stamps, 0:00:00-0:01:14,0:01:14-0:12:39, et cetera.
If you hoover over the timestamp input field, the syntax is shown. Do not specify "from-to" timestamps, specify only the timestamp for the split. In youre case "0:01:14, 0:12:39"
Then I tried to play the files (using VLC), all I got was a green screen with some miscellaneous pixels.
You can not split a video file at any timestamp, because it uses GOPs (Group of Pictures). If you specify a timestamp inside a GOP, the startng I-Frame is lost and you have only "delta pictures" without the initial complete picture (I-Frame).

Splits should only be done on Chapter marks, because these are almost set on I-Frame boundary.

macdonjh
Posts: 15
Joined: Sat Dec 05, 2015 11:39 pm

Re: Splitting .mkv files

Post by macdonjh » Thu Aug 15, 2019 9:43 pm

Grauhaar wrote:
Wed Aug 14, 2019 6:13 am
macdonjh wrote:
Tue Aug 13, 2019 9:55 pm
Then I moved to the Output tab. I asked for Part I to be "split based on timestamps". I put in time stamps, 0:00:00-0:01:14,0:01:14-0:12:39, et cetera.
If you hoover over the timestamp input field, the syntax is shown. Do not specify "from-to" timestamps, specify only the timestamp for the split. In youre case "0:01:14, 0:12:39"
Then I tried to play the files (using VLC), all I got was a green screen with some miscellaneous pixels.
You can not split a video file at any timestamp, because it uses GOPs (Group of Pictures). If you specify a timestamp inside a GOP, the startng I-Frame is lost and you have only "delta pictures" without the initial complete picture (I-Frame).

Splits should only be done on Chapter marks, because these are almost set on I-Frame boundary.
Thank you for helping, Grauhaar.

I read that about the split time stamps and tried only setting the time stamp times, but I didn't get any output. Then I read in the HELP that you can also specify a start and stop time stamp and MKVToolNix will split out that section of the file into a new file. When I did that, I got an output file. Too bad it is garbage.

I also read about the proper frames. The time stamps I used were at the chapter breaks identified by my DVD player (I still have the physical discs), at least to the nearest second. Again, HELP said that MKVToolNix would split the file at the closest proper frame to the time stamp requested. Again. unfortunately I got garbage output.

What is your procedure for splitting files with MKVToolNix? I'm using the ToolNix GUI that was bundled with the program download from the site you suggested, so I'm not using command-line commands.

Grauhaar
Posts: 257
Joined: Thu Sep 15, 2016 3:46 pm

Re: Splitting .mkv files

Post by Grauhaar » Fri Aug 16, 2019 3:21 am

macdonjh wrote:
Thu Aug 15, 2019 9:43 pm
What is your procedure for splitting files with MKVToolNix?
I did it 2-3 times with the chapter split and it works for me.

macdonjh
Posts: 15
Joined: Sat Dec 05, 2015 11:39 pm

Re: Splitting .mkv files

Post by macdonjh » Fri Aug 16, 2019 9:14 pm

Frustrating, still didn't work. I put the file I wanted split into the FILE NAME box within the Input tab of MKVToolNix.

Then I clicked on the output tab. I didn't add any information in the GENERAL box. In the SPLITTIG box I entered "Before Chapters" from the drop down menu, "all" in the Chapter Numbers field and left Maximum Number of Files as "unlimited".

I didn't enter any other information. I then clicked the "Start Multiplexing" button. I got several new files in my Videos folder, but none of them play properly. The audio is fine, but the video is a green screen (literally) with some random pixels.

Post Reply