Logichaos is a blog site created by Neil Moore with the help of John Wolgamot. Here you will find guides for Windows and Windows based programs. Logichaos started out as a hobby many years ago and over time it has become my personal website where I submit and edit guides and video tutorials. I maintain a list of free programs for Windows called The Ultimate List of Free Programs for Windows.

This short guide will teach you how to split large MKV files (aka Matroska) so that they can be burned to multiple DVDs. MKV is a video container format similar to AVI in the sense that it can hold almost any audio or video stream, however it has more features than AVI and is a true successor. MKV is primiarly used to store very large H.264 videos. These videos can be upwards of 4GB or larger, which can make burning them to DVDs very difficult

1. Questions and Answers

Q. Why split an MKV file when I can just compress it into multiple zips?
A. Splitting an MKV file into multiple parts has its advantages. The conventional way to burn files larger than DVD is to zip the file and split the zip into multiple parts. The problem with doing this for MKV files is, if you want to watch your video, you have copy the zip files from your DVDs to your harddrive and then extract them. This is a time consuming 2-step process. While this works, it's hardly appealing. Not to mention, if your DVD becomes scratched or damaged, the entire zip file cannot be unzipped.

If you choose to split your MKV file, you can burn them directly to DVD and then watch them directly from DVD without having to first extract or copy the files to your harddrive. Additionally, MKV supports file linking, which means if the multiple MKVs reside in the same folder, they will be seamlessly combined when you play the first MKV file. This means you won't have a noticeable delay during the transition from part 1 to part 2.

Lets say that you want to upload a video to Youtube. The problem with that is Youtube has a 10 minute restriction. We can sidestep this annoyance by splitting your video into multiple parts. On top of that, if your video is an AVI or MP4, no worries. You can simply remux (remultiplex or "convert") your video into multiple MKV files without any loss of quality.

2. Required Files

3. Installation

Install MKV Toolnix with the default settings. If you downloaded the 7zip archive (.7z), you need to extract it. Once extracted, you can run the .exe file.
  1. Run the MKV Merge GUI (mmg.exe)
  2. Next to Input Files, click Add and navigate for the MKV file you wish to split. Once found, press Open.

    01_add
  3. Go up to the Global tab and click it.

    02_global
  4. Check Enable Splitting

    03_splitting
  5. Choose after this size...

    04_after_this_filesize
  6. For this part, you will need a calculator.

    1. Open a calculator from your start menu. Leave this window open for now.
    2. Open an explorer (My Computer) from your Start Menu and navigate to the folder containing your MKV file.
    3. Take note of its filesize. My MKV filesize is 1,535,652 KB. It is very important that you note its exact filesize without rounding any numbers. You need to be as precise as possible with this part.
    4. Simply input the number into your calculator and divide it by however many parts you wish to split your file to. In my case, I want to split it into 3 parts so that it can be burned to 3 CDs. Mine comes to 511,884 KB. That is the number I will be typing next to after this size in MKV Merge.
    5. Next to ...after this size:, type the filesize you wish to split your video into. Make sure you type the number without commas and type the letter K after the number. If you don't, MKV Merge automatically assumes Bytes which can easily confuse you when you end up with 1 or 2 very small files and an extremely large file. Don't make this mistake! :)

    09_after_this_filesize2
  7. (Optional Step) Check Link Files. If you do not do this, each MKV will be independent and will not merge into a single video file while watching.
    Note: File linking can sometimes create issues with certain hardware or software media players. It has been brought to my attention that File Linking will sometimes make the video have difficulty rewinding. Personally, I do not have issues when using File linking because I watch everything on my computer with Media Player Classic Homecinema, however many people use different players and file linking may be problematic. Use at your own risk.

    05_link_files
  8. Next to Max number of Files, type the number of files you wish to create. In my case, 3. If you skip this step, you might end up with a 4th MKV file that is only a few KB in size. This happens because splitting MKV files isn't perfect. When a video is split into multiple parts, sometimes the first part will be smaller than the second (or vice versa). This is due to the way splitting works. Videos are comprised of keyframes and frames. Keyframes are like perfect quality snapshots and frames contain less information. A video cannot be split on a frame, it has to be split exactly on a keyframe. If you intend to split your video into 2 parts, sometimes you will end up with a 3rd part. This 3rd part might be a few kilobytes in size. I like to call this the "remainder". To avoid this, simply type the number of parts you wish to split your video into. This ensures that the final part contains the remainder.

    06_max_number_of_files
  9. Next to Output Filename, append your filename with "_part". Your file should look like this:

    some_file_part.mkv

    07_some_file

    By default, MKV Merge tries to create your MKV files in the same directory with the same filename. In short, MKV Merge will try to overwrite your file, which will result in an error. By adding the "_part", it not only changes the resulting filename but it helps you distinguish between a multipart MKV and non multipart MKV.
  10. Press "Start Muxing" to begin.

    08_start_muxing
If you did everything correctly, it should begin splitting the MKV file into multiple parts. Once finished, you should check to see if the multiple MKV files turned out okay to see if everything is fine. If it finishes without any errors and the multiparts play without any problems, then you can delete the original MKV file.

4. Important Notes

Make sure you don't accidentally split the files too big so that they won't fit on CDs or DVDs. A DVD+R's typical capacity is 4,482MB (4,590,208KB). Dual layer DVD-R can fit 8,147MB (8,343,424KB) I have burned DVDs with about 4470MB without any problems. Your results may vary.

Type KiB MiB GiB
DVD-R SL 4,596,992 4,489 4.384
DVD+R SL 4,590,208 4,482 4.378
DVD-R DL 8,343,424 8,147 7.957
DVD+R DL 8,347,648 8,152 7.961

Source: Wikipedia

5. How to Split Videos for Youtube (and other Video Streaming Sites)

Splitting video can be useful for Youtube or other video streaming sites. Youtube enforces a strict 10 minute limitation, which can be easily bypassed by simply splitting your videos into 10 minute increments. Simply follow steps 1 through 4. When you reach step 5, instead of choosing After this size..., choose After this duration. In the text box, you need to type a timecode. For 10 minutes, you would type:

00:10:00.00

But for Youtube, I recommend splitting a video around 9 minutes and 45 seconds just to be safe. To do that, simply type:

00:09:45.00

you can also type seconds like this:

360s (This will split the video into 6 minute parts)

Important: Youtube gets confused if you link the videos. I ran into this problem with a video I uploaded, so make sure you don't choose Link Files during Step 7.

Enjoy!

Frequently Asked Questions

Q. Why does the split MKV file play fine on my PC but does not work in my hardware media player? (e.g. Sony BDP-S370, Playstation 3, PopCorn Hour, etc.)
A #1. There are 2 possible answers for this. The first is, your MKV file contains a Level 5.1 Mpeg-4 AVC (H.264) video stream. If this is the case, then your video will not work in any hardware decoder or media player and will need to be reconverted. This process takes hours even on the fastest of computers. Only videos with a Level of 4.1 or lower will play in hardware players. If you need to determine if your video is Level 5.1, simply open your video with a program called MediaInfo and look for its "Format Profile" If it says "High@L5.1", then it will not play and will need to be reconverted. If it says High@L4.1 (or Main@L3.2 etc.), then there must be something else wrong with your video that is causing it to have playback issues. Refer below for other possible solutions.

A #2. If for some reason after splitting your MKV file, it does not play in your hardware media player, it may be due to a recent change in MkvToolnix that implements a feature called "Header Removal Compression" All versions of MKVToolnix starting from versions 4.1.0 and newer use Header Removal Compression, which is responsible for making certain video and audio tracks take up less space, consequently making the MKV file smaller.

Certain hardware and software players do not have Header Removal Compression support, which therefore means they do not fully support the MKV container. A possible fix would be to downgrade MKVToolnix to a version prior to v4.1.0 or explicitly set the "Compression scheme" for all video and audio tracks to "none". A much better solution would be to contact the maker and request support for Header Removal Compression" For more information regarding Header Removal Compression, visit http://www.bunkus.org/videotools/mkvtoolnix/faq.html#header_removal_compression

Q. After splitting a file into multiple MKV files, I get an error when uploading to Youtube.
A. It's possible you enabled "file linking" which is recommended in Step 7. For some odd reason, Youtube throws a fit sometimes when file linking is enabled. To fix this, simply split the video again with file linking disabled and then upload them again.

Last Updated (Saturday, 18 September 2010 13:32)

 

Comments

#45 billybob 2011-12-26 23:26
when figuring out the file size it has 2 numbers. 1 says file size, and the other says file size on disk. which one should we use
Quote
#44 Carlos Sang 2011-11-10 12:45
I'm looking to cut a specific part of a mkv file without recompressing (e.g. extract frames from 00:00:14.00 to 00:00:41.00). Not to split it in multiple equally files. I would appreciate very much any help or guidance given. I know other people might be also interested. Thanks.
Quote
#43 Karolinger 2011-11-10 12:11
If it isn't asking too much, how do I remux other video formats to mkv?
Quote
#42 Neil 2011-10-27 08:08
Quoting Carisma:
Just try to split a MKV file and it works successfully. However, when I play with my tablet with MX Video Player, I cannot trun on the Hardware decoder for the splitted files BUT the original file can. Is there any setting which I should turn-on or turn-off before splitting?


I'm not sure about this. You might have better luck asking about this at the doom9 forum or the MKV Toolnix Contact Page. Good luck.
Quote
#41 Carisma 2011-10-27 03:58
Just try to split a MKV file and it works successfully. However, when I play with my tablet with MX Video Player, I cannot trun on the Hardware decoder for the splitted files BUT the original file can. Is there any setting which I should turn-on or turn-off before splitting?
Quote
#40 oleeo 2011-10-07 20:27
Hey, THANKS!!
This was clear and straight forward and super helpful.

appreciated muchly :)
Quote
#39 ps3 2011-08-25 02:20
thank you very much man! we can now watch 4GB+ HD films on our ps3.
Quote
#38 Aries Munandar 2010-11-16 10:28
Hi, Neil. I am from Indonesia, and very gratefully for the tutorial. I just have one question: after i split the files, can I join them back? If yes, how to do it?

Thanks in advance.
Quote
#37 Peeru 2010-11-03 07:01
The author of this post Mr Neil. Mate I would like to thank you to the core. I was unable to split a 19 Gb movie rip of Saving Private Ryan. I tried boilsoft converter, multiavchd,and avs video remaker. None worked perfectly. But through your method ie through mkvmerge, the file ran perfectly on my PS3 as I split the file into 6 parts of 3 gb each. Thanx so much mate.may God bless u always.
Quote
#36 Neil 2010-09-19 18:06
Quoting Usman:
Thanks for the tutorial but I'm facing an issue. I have successfully split the file into 2 file but when I play them the transition is noticeable. I have checked it on media player classic, smplayer, & windows media player. Just when the first part finishes playing and it switches to second part I see a black screen.

How can I resolve this problem? Please help!

Thanks.


Try installing Haali Matroska Splitter. You'll need to play the MKV in a directshow player of some sort. That means Media Player Classic and Windows Media Player. SMplayer is a frontend for Mplayer, which is not a directshow player, so unless mplayer does not support file linking, then file linking will not work in SMplayer after installing the Haali Matroska Splitter.

If for some reason it doesn't work after installing Haali Matroska Splitter, you might need to enable it in the options.



Hope that helps,
-Neil
Quote
#35 Usman 2010-09-19 06:31
Thanks for the tutorial but I'm facing an issue. I have successfully split the file into 2 file but when I play them the transition is noticeable. I have checked it on media player classic, smplayer, & windows media player. Just when the first part finishes playing and it switches to second part I see a black screen.

How can I resolve this problem? Please help!

Thanks.
Quote
#34 Neil 2010-08-29 02:04
Quoting Greg:
I just wanted to report that joining a split fileset, whether linked or not linked, results in nearly identical files except for the expected date and SUID difference. This is good news because if I save unlinked split files to DVD5, I can always join them with confidence at least in regards to linking or not linking.

What bothered me wass that the rejoined file was not the same as the original. Yes, using a newer version of mkvmerge might result in some differences such as location offsets, flags, etc., but I was seeing more than that.

I do not know if these differences are benign or not (probably they are). Some of the issues with joined files having greater seek delays significantly in the second half of the file could be as you say attributed to the particular player and not the MKV file itself.

While the frames are not being re-encoded during a join, there is some kind of reordering of the containing blocks that organize them, such that a frame in one block is now in the next block (that is one example). I think all the frames are there and in sequence, just the block level organization is slightly different.

You can see this by saving a full mkvinfo (all options enabled) on the source MKV and the rejoined MKV, and then comparing the differences with a diff like program (winmerge for me). I believe these differences are probably attributable to the version of mkvmerge and as I said, they are benign.

My sample set is pretty small so far (two large MKVs and one small MKV) so its hard to conclude anything.

I have tried Media Player Classic Home Cinema x64 with CoreAVC 2.0 and it plays the joined files very well as does GOM with CoreAVC 2.0. As you said, for now its best to use players with the Divx codec or the CoreAVC codec when play MKVs. I thank you for pointing me in this direction.

To conclude, I am using mkvmerge to split large MKV files using no linking and no header compression on all tracks for archiving to cheap DVD+R blanks. Thank-you again.

Glad to see that you were able to come to a solution. Also thanks for trying MPC, it's pretty obvious that it handles MKV files a whole lot better than VLC.

It appears that you know more than I do in certain areas. I am merely an investigator, I don't have all the answers. heh. :-) But, there are some things that I know for sure and in this case, I find it hard to believe MKVmerge would have such obvious problems, though I have been surprised before.

I have ceased using MKV entirely. I know that sounds a bit ill advised considering MKV is the container format of the future, but considering the PS3s lack of MKV support, I must turn to converting MKV files to MP4 with AC3 surround. Some people say cramming AC3 into MP4 is unsupported but from what I heard, it is perfectly acceptable. The PS3 is able to read an MP4 file with AC3 just fine.

Most of the time, all I have to do is simply copy the video stream to MP4 and recode DTS to AC3. This takes roughly 15 minutes as opposed to 8-10 hours to do a full reconversion.

By converting MKV to MP4, I ensure that the DVDs will be readable by my PC and any PS3, which is great because not everyone has a Blu-Ray player, most people have PS3s. It's nice to be able to take a movie over to a friend or family member's house and watch it on their PS3.

Anyway, that's just what I do.
Quote
#33 Greg 2010-08-29 01:26
I just wanted to report that joining a split fileset, whether linked or not linked, results in nearly identical files except for the expected date and SUID difference. This is good news because if I save unlinked split files to DVD5, I can always join them with confidence at least in regards to linking or not linking.

What bothered me wass that the rejoined file was not the same as the original. Yes, using a newer version of mkvmerge might result in some differences such as location offsets, flags, etc., but I was seeing more than that.

I do not know if these differences are benign or not (probably they are). Some of the issues with joined files having greater seek delays significantly in the second half of the file could be as you say attributed to the particular player and not the MKV file itself.

While the frames are not being re-encoded during a join, there is some kind of reordering of the containing blocks that organize them, such that a frame in one block is now in the next block (that is one example). I think all the frames are there and in sequence, just the block level organization is slightly different.

You can see this by saving a full mkvinfo (all options enabled) on the source MKV and the rejoined MKV, and then comparing the differences with a diff like program (winmerge for me). I believe these differences are probably attributable to the version of mkvmerge and as I said, they are benign.

My sample set is pretty small so far (two large MKVs and one small MKV) so its hard to conclude anything.

I have tried Media Player Classic Home Cinema x64 with CoreAVC 2.0 and it plays the joined files very well as does GOM with CoreAVC 2.0. As you said, for now its best to use players with the Divx codec or the CoreAVC codec when play MKVs. I thank you for pointing me in this direction.

To conclude, I am using mkvmerge to split large MKV files using no linking and no header compression on all tracks for archiving to cheap DVD+R blanks. Thank-you again.
Quote
#32 Neil 2010-08-27 23:08
Quoting Greg:
Last question, I promise. Is a mkvmerge join on linked files equivalent join on unlinked files?

Brief testing says yes (maybe) but there is something definitely odd about a mkvmerge joined file. When jumping forwards and back in the first half of the joined file, the movie plays like the original, meaning, it takes just a brief second to start playing after a jump. In the second half, the movie takes longer to start when making a jump.

In VLC, you see pixelation for one to five seconds in the second half of a joined file but not the first half. Pixelation ends when you hit a keyframe. Other players just pause longer before starting in the second half. This is very curious behavior not found in the original split file (part002). And this happens in both linked and unlinked files that are joined.

Well, that's it for now. I wish I could archive linked split MKV to DVD5, but because of player issues, I should instead archive unlinked split MKV files. I do this even though I am uncertain about the merits of a join on a linked set versus a join on an unlinked set. Well, that's how it goes.


Are you saying you physically and permanently joined the mkv files back into a single MKV file or are you saying that you are playing the linked MKV files?

I guess I'm not fully understanding your questions.

When playing a linked MKV file, it should simply play without any kind of interruption when it reaches the end of one part and continues the second part. It should appear seamless or gapless.

If you try to jump to a random part of the video in the second half of a linked file, it should not do anything differently than a regular MKV file that has not been split. I hope that makes sense.

The fact that you're experiencing any kind of delay or pixilation is probably due to VLC. I have never experienced that with Media Player Classic.

As far as burning split MKV files with file linking, there really should not be any issues. Try this. Take part 1 and put it in a different folder and put part 2 in a different folder. Play part 1. You'll notice that it does not have the full length because it cannot find part 2 and link it. This is what will happen when you burn it to a DVD. This is not abnormal, this is in fact normal behavior.

If you have any issues playing a split MKV file with file linking without the 2nd part in the same folder, then you probably have something wrong with VLC. Like I said, I did not fully understand the question so I can't say for sure.

I don't mind answering your questions. :-)

-Neil

Edit: I went ahead and downloaded the latest version of VLC. I went ahead and split an MKV file with file linking enabled. Next, I played the first MKV file. As I suspected, it did not show the full length of all the parts combined. It only showed the length of that segment.

As far as I can tell, VLC does not support the playing of linked MKV files. It treats each MKV file as a separate file.

For file linking to work, you need to install a player that supports it. In order to play MKV files in Windows Media Player, you need an MKV splitter. For that, I think 99% of the people out there use Haali Matroska Splitter. It comes with codec packs such as the K-Lite codec pack or CCCP. Haali Matroska Splitter supports linked MKV files, though I can't remember if it's enabled by default. It's in the preferences of Haali Matroska Splitter.

When you play an MKV file in Windows Media Player or Media Player Classic, it uses the Haali Matroska Splitter. If you play (example) file_part_1of3.mkv, it will link all 3 parts together to create the illusion of playing one big long video. (Assuming those MKV files have been created with file linking enabled).

So, basically, any issues you speak of are purely related to VLC and it's lack of MKV file linking support. Also, I experienced the pixilation effect you spoke of when playing the MKV files. This is most likely the effect of VLC trying to play at a frame instead of a keyframe. If not, then it's because VLC has a very crappy way of playing MKV files with H.264 video streams. I can't say for sure but the last time I checked, VLC was slow and sucks for MKV playback, which is why I stopped using it and switched to MPC.
Quote
#31 Greg 2010-08-27 17:11
Last question, I promise. Is a mkvmerge join on linked files equivalent join on unlinked files?

Brief testing says yes (maybe) but there is something definitely odd about a mkvmerge joined file. When jumping forwards and back in the first half of the joined file, the movie plays like the original, meaning, it takes just a brief second to start playing after a jump. In the second half, the movie takes longer to start when making a jump.

In VLC, you see pixelation for one to five seconds in the second half of a joined file but not the first half. Pixelation ends when you hit a keyframe. Other players just pause longer before starting in the second half. This is very curious behavior not found in the original split file (part002). And this happens in both linked and unlinked files that are joined.

Well, that's it for now. I wish I could archive linked split MKV to DVD5, but because of player issues, I should instead archive unlinked split MKV files. I do this even though I am uncertain about the merits of a join on a linked set versus a join on an unlinked set. Well, that's how it goes.
Quote

Add comment


Security code
Refresh