Log in

View Full Version : Ordered chapters in Matroska


Haali
1st September 2005, 19:54
Chapters in Matroska are grouped in independent sets called Editions. Each edition has a few attributes, these are:
Title - this is displayed to the user
Hidden flag - if this is set, then the edition is not show in UI
Default flag - the first Edition with this flag is selected when file is opened.
Ordered flag - this one turns on the heavy magic.

Normally chapters are only points on a movie's timeline that you can seek to. Ordered chapters are quite different. In Matroska chapters have these main attributes:
Titles - this is displayed to the user, can be in different languages
Start time - the seek point for normal chapters
End time - not used in normal chapters
SegmentUID - not used in normal chapters
+ a few others

When ordered chapters are used, the edition acts as an edit list instead, and a virtual timeline is constructed from them. Let's look at a simple example:
;Title, StartTime, EndTime
Chapter 1, 00:00, 02:15
Chapter 2, 04:10, 05:00
Chapter 3, 03:00, 04:00
The splitter constructs a virtual segment of length 4:05 from this list, and plays parts of file in order: first the piece from 00:00 to 02:15 is shown, then the piece from 04:10 to 05:00, and last 03:00 to 04:00. Internally seeks are done, but they are hidden from user. The user sees a single four minute movie with seamless transitions between parts.
By default ordered chapters refer to the same Matroska file, but if you specify SegmentUID for a chapter, then the content is pulled from external file. External files must reside in the same folder as the original file and must have the same number of tracks and the same codecs.

This functionality allows many neat tricks, like
* Having editions with intro/outro and without them in the same file
* Having intro/outro in separate files that are linked on the fly to the series body
* Small files with chapters only that allow playing the entire series as one movie
* and many others

Recently I added support for different AR and picture sizes in different linked files, while still requiring the same codec.

I hope this explains one of the more obscure parts of Matroska.

Kurtnoise
3rd September 2005, 18:31
Thanks for these infos Haali. :)

Does the cuesheets embedded mka files work in the same way ? I assume yes but who knows.

Haali
3rd September 2005, 20:56
Yes, this feature is generic and does not depend on track types and codecs.

Emp3r0r
12th September 2005, 05:44
Very nice, should be especially useful for saving room on full seasons that just won't fit on current media.

thanks :)

movax
12th September 2005, 16:28
This will help in the editor I *still* haven't finished. :P

Dirk99
28th October 2005, 17:02
...
Titles - this is displayed to the user, can be in different languages
...

Hallo Haali,

I found this feature and now some chapters in my edition have two descriptions, one in english and one in german. But where can I change between these two languages? The Haali Media Splitter one shows the german chapter-descriptions, in the BSPlayer and in the ZoomPlayer I see only the english ones.
Where is my mistake?

Thanks in advance
Dirk

Haali
29th October 2005, 13:21
Names should normally be in the system default language. Do your players show actual names or track languages only?

Dirk99
29th October 2005, 15:51
BSPlayer as well as ZoomPlayer have german as default language. My default WinXP system language is german too.
Both players only show the english names I´ve gave them with mkvmerge, but no possibility to choose the german description.
I append a screenshot, perhaps it helps.

Greetz
Dirk

Dirk99
7th November 2005, 09:25
Hallo,

no ideas? Or ist my description incomprehensible?

Greetz
Dirk

Caroliano
7th November 2005, 22:46
In the Haali Media Spliter of Matroska Pack 1.1.2 the option "merge all segments", that apears to be related with this ordered chapters, come disabled. Why that?

And you can use the same chapter many times? This could help compression in some old cartoons or strange animes that show the same scene more than one time; or when the intro and the ending is the same, and you want to put them in an single file.

Last question: you can refer to a chapter in another file or you must refer to it as a whole?

Dirk99
9th November 2005, 09:41
Hallo Caroliano,

I think we misunderstand each other.
In the left screenshot (taken from mkvmerge) of my last posting you can see that it is possible to give adjust to one timecode in a edition multiple chapter names and languages. This is interessting for me, because I have two audiostreams, so I´d like to have two languages in my chapter description, too.
As you can see in the right picture (taken from BSPlayer) the german chapterdescription cannot selected. Only the english one is shown.
Now I attache a new screenshot from the Haali Media Splitter right-click-menue, where you can see the german description of the first two chapter. (In this test I was to lazy to give every chapter a german description)

The problem in both, the BSPlayer and the Haali Media Splitter, is that I cannot change between the two languages in the chapter edition.

I hope I have described the problem a little bit easier with my worse english now.

Greetz
Dirk

Caroliano
9th November 2005, 20:06
I think you misunderstand me. I was making questions for Haali, not answering for you. Sorry if I made you think that.

Cheers

Dirk99
9th November 2005, 20:28
O sorry. :-) I was surprised, because your answer confused me a little bit.

Greetz
Dirk

Haali
9th November 2005, 23:49
In the Haali Media Spliter of Matroska Pack 1.1.2 the option "merge all segments", that apears to be related with this ordered chapters, come disabled. Why that?

Because it is an intended default operation mode. Files that are not explicitly linked are not merged.


And you can use the same chapter many times? This could help compression in some old cartoons or strange animes that show the same scene more than one time; or when the intro and the ending is the same, and you want to put them in an single file.

Yes.


Last question: you can refer to a chapter in another file or you must refer to it as a whole?
You can't refer to chapters in another file, you can only specify times directly.