View Single Post
Old 2008-05-14, 07:05   Link #1
TheFluff
Excessively jovial fellow
 
 
Join Date: Dec 2005
Location: ISDB-T
Age: 37
MKV Ordered Chapters: User's Manual

Recently an MKV feature known as "ordered chapters" or "ordered editions" has become increasingly common. The purpose of this thread is to clarify some common concerns about said feature.

Q: Why use ordered chapters?
A: Ordered chapters, when combined with MKV segment linking, provides an easy way to save a lot of diskspace and improve video quality for TV anime. This is not because ordered chapters compress video or anything. Instead, ordered chapters allows you to encode the opening and/or ending sequences of a series into a file of their own, and then have the OP/ED automagically inserted into each episode at the appropriate places. This saves space, because instead of encoding the OP/ED into every episode, they are only encoded once, so the main episode can be made smaller. It is particularly true because opening themes in particular tend to have a lot of high-motion content that doesn't compress very well. In some extreme cases I've seen, cutting out the OP of an episode reduced the filesize by about 25%.

Q: What do I need to do to get it working properly?
A: Not much. Install the CCCP, put the linked files together in one folder, play the main file (usually the episode itself, not the OP/ED), and it will look and behave just like an episode encoded in the standard fashion. If you've installed Haali's splitter separately, go to its settings, go to "input" and make sure "try to open linked files" is set to "yes".

Q: What about other players or operating systems?
A: Unfortunately this feature (which is a part of the MKV standard) is not yet implemented in any other splitters than Haali's. This means that if you try to watch linked files in (for example) MPlayer or VLC, they will just play whatever the file contains, without inserting content from other files.

Q: Can I rename the files?
A: Yes. The linking is done by something called a Segment Unique Identifier (SUID) and not by the filename, so feel free to rename the files. However, remuxing the file will change the SUID and hence break the linking, so don't do that.

Q: But that sucks, I want to change the subtitle font and remux!
A: Well actually I lied about "no remuxing", it can actually be done, just not with mkvmerge. Instead you will need to use Haali's GDSMux (comes with the CCCP as well as with the standalone splitter package). How to do it:
1) Use mkvinfo (comes with the mkvtoolnix package, if you have mkvmerge you have this) to find out the SUID of the file you want to remux. It should look something like this:
Code:
Segment UID: 0xa2 0xa6 0xa2 0xa7 0x45 0x22 0x6b 0x85 0x85 0xd4 0x75 0x5e 0x6c 0xf4 0x67 0x60
Remove the "Segment UID:" part and all the "0x", and note it down somewhere.
2) Use mkvextract to extract the chapters XML file.
3) Start GDSMux. On the Input tab, rightclick and hit "Add source". Add the MKV file you want to remux and whatever files you want to change.
4) Go to the Chapters tab and hit "load from file". Load the .xml file you just extracted.
5) Go to the Global options tab and paste the Segment UID in the appropriate field there.
6) Select an output file using the button at the bottom.
7) Hit start.
8) Wait.
9) Profit.

Q: Does this feature increase CPU usage?
A: No. It might increase file load time slightly but unless you have 300+ MKV files in the same folder it's highly unlikely to be much of a noticeable problem.

Q: I don't like this. Is there any way I can put it back to normal?
A: Yes, it's possible but a bit complicated. Basically, what you need to do is:
1) extract the chapter files
2) find out where the split points between different files are
3) split the main file into multiple files (around the split points) using mkvmerge
4) append files to each other with mkvmerge so that everything is in the right order in one file.

Q: This is relevant to my interests and I would like to know more!
A: See this page.
__________________
| ffmpegsource
17:43:13 <~deculture> Also, TheFluff, you are so fucking slowpoke.jpg that people think we dropped the DVD's.
17:43:16 <~deculture> nice job, fag!

01:04:41 < Plorkyeran> it was annoying to typeset so it should be annoying to read

Last edited by TheFluff; 2010-11-17 at 14:22.
TheFluff is offline