PDA

View Full Version : How to split MKV MPEG-4 AVC HDTV file (larger than the standard DVD size,i.e. 4,37GB)


Stream Recorder
01-27-2008, 10:36 AM
Recently I got an .MKV HDTV file with MPEG-4 AVC (h264) video and two AC3 audio tracks. The bad thing was that the .MKV file was 10MB larger than a single layer DVD disc, i.e. it was 4,38 GB instead of 4,37GB I could fit into the DVD disc.

The problem was that many applications still didn't support files larger than 4,37. Also MPEG-4 AVC (h264) is not always supported even with a single audio track.

I didn't want to re-compress the video. Splitting MKV was the only option. Luckily the video had a dozen of useless seconds at the end.


I tried freeware avidemux (http://avidemux.org/) (Windows) first. It was slow, didn't seem to support 2 audio tracks, besides I got several dialog windows asking me about indexing and other stuff that I didn't really want to see.

Then I tried freeware mkvtoolnix (http://bunkus.org/videotools/mkvtoolnix/) (Windows, Unix). It did the job perfectly!

mkvmerge GUI from mkvtoolnix has some disadvantages:

you can split after a given amount of time, but you can't split after several given amounts of time;
you can't preview the video in the mkvmerge, so you need to launch a player and remember the time when you need to split.


But it is fast. It support MPEG-4 AVC even with two audio tracks, so I recommend it!

pctechsupport
08-24-2008, 09:14 PM
The origional post was written some time ago but I just stumbled on it. I downloaded and installed mkvmerge.

It does (maybe an upgrade since the origional post) allow you to enter multiple timecodes in a comma delimited field for multiple splits in a single pass.

Works for me.

Stream Recorder
09-04-2009, 03:10 AM
The origional post was written some time ago but I just stumbled on it. I downloaded and installed mkvmerge.

It does (maybe an upgrade since the origional post) allow you to enter multiple timecodes in a comma delimited field for multiple splits in a single pass.

Tested the latest version of mkvmerge and it really works. Thank you for posting an update!!!
The Split section handles how the output file is split into several smaller files. If no splitting is selected then only one big file is generated. If splitting is activated then you can tell mkvmerge to start a new output file after either a specific amount of data has been written to the current file or after a specific timecode has been reached. The accepted formats are:

For the size: A number optionally followed by the letter 'K', 'M' or 'G' indicating kilobytes (1024 bytes), megabytes (1024 * 1024 bytes) or gigabytes (1024 * 1024 * 1024 bytes). Examples: '700M' or '100000K'.

For the time: The format is either HH:MM:SS.nnn with up to nine digits for up to nanosecond precision or a number followed by the letter 's' indicating a number of seconds. Several timecodes can be entered separated by commas.

Please note that the timecodes refer to the unsplit output stream. Therefore entering '00:10:00,00:20:00' will result in three files of which the first two will be roughly ten minutes long. The third piece will contain the rest of the input stream. This is independent of the 'file linking' feature.
Examples: '01:20:00' (split after 1 hour, 20 minutes) or '1800s' (split after 1800 seconds = 30 minutes).