[Matroska-devel] [Cellar] Matroska Chapters

hubblec4 hubblec4 at gmx.ch
Wed Feb 22 14:06:25 CET 2017


Hi all


Am 21.02.2017 um 16:37 schrieb Dave Rice:
> Hi Martin,
>
>> On Feb 19, 2017, at 8:17 AM, hubblec4 <hubblec4 at gmx.ch 
>> <mailto:hubblec4 at gmx.ch>> wrote:
>>
>> Hi all
>>
>> I hope this topic is not too boring and we can improve/implement 
>> important "use" notes.
>>
>> In my chapterEditor thread was a topic "chapter.xml from makemkv" 
>> which generate non-ordered chapters with end time stamps. So far 
>> known to me there is no splitter which read the end times of 
>> non-ordered chapters.
>> In Mosu's new Chapter Editor is it not more possible to set the start 
>> times equal to the end times.
>> The DVDMenuXtractor generate ordered chapters without an end time stamp.
>>
>> What is the correct behavior?
>
> Good point. Is there any purpose to ChapterTimeEnd if the chapters are 
> non-ordered?

No there is no purpose! But as info it is maybe important.
A short description:
When you create mkv's with makemkv and you need ordered 
editions/chapters, so it is easy to build an ordered editon.
In practice:
You load such an mkv to Mosu's Chapter Editor(CE), then enable the 
EditionFlagOrdered=1 and all fine, cause the end times was allready 
exists. If there are no end times you must enter all end times manually 
(a lot of work).
Mosu's CE has no function to create/calculate ordered end times, but my 
chaperEditor(cE) has such a function.
An other problem of ordered chapter end times, is the last chapter. The 
end time of the last chapter must be the duration of the video(in normal 
situations), but this info is nowhere strored in a chapter.xml (only in 
an mkv where it is possible to extract the play duration info).



> Would it be fair to describe ChapterTimeEnd as only relevant to 
> playback if EditionFlagOrdered=1.

Yes it would be fair. Every splitter will ignore this EBML elements.
But there are more EBML elements which affects that:
- ChapterTimeEnd
- SegmentUID
- SegmentEditionUID
- the whole ChapProcess
(ChapProcess: I have found it only in DVDMenuXtractor(DMX) output.xml 
files. Without ordered chapters I think it makes not sense, but I'm not 
100% sure)



>
>> My suggestions are:
>> Data for non-ordered chapters can be set, but with a warning/info 
>> that this data will not be used.
>
> This could be said within the specification. It's a bit much to 
> request that all Matroska editors also say it.

+1 Such an info is very important(my opinion). All "new" Matroska 
editors can use this info an old one could be updated(or not).

>
>> Ordered-chapter end times can be set to "empty", equal or greater as 
>> the start time but never smaller as the start time.
>
> That makes sense to me, though is there any meaning of 
> ChapterTimeStart = ChapterTimeEnd? Is an empty ChapterTimeEnd 
> semantically equivalent to ChapterTimeStart = ChapterTimeEnd or 
> equivalent to ChapterTimeEnd of the last timestamp (or infinity)?
>

For the moment is no meaning defined for ChapterTimeStart(CTS) = 
ChapterTimeEnd(CTE) but we could/should.
In pratice such a chapter will be ignored (this makes the 
parsing/splitting process easier).
But I say that is not good and we lose flexibility.



>> The normal way:
>> End times are greater as the start times. A new virtual timeline use 
>> this chapter and takes the play duration of this chapter into account.
>>
>> End time equal to start time:
>> Lav splitter ignores such ordered chapters, cause the play duration is 0.
>
> +1, Having an ordered chapter where ChapterTimeStart = ChapterTimeEnd 
> should be ignored.

Why should such a chapter be ignored? Ok, there is no duration and 
irrelevant for the new virtual timeline, but you can have other info in 
such chapters:
1. a deeper ordered chapter where you can find a duration
2. ChapProcess can be used
3. only use as chapter mark


>
>> Furthermore LAV-splitter recognized only Level 1 ordered chapters.
>
> Is there a use case for hierarchical ordered chapters? I'm not sure 
> what a level 2 of an ordered chapter would do? Should an ordered 
> chapter be permitted to have an ordered chapter as a child?

Yes there are use case's (only in an early VLC version, but not really 
for practice).
DVDMenuXtractor output.xml for VMG or VTS or the VTSM.
A hugh topic and to much to discribe here.
When it is ok please download my cE 
http://forum.gleitz.info/attachment.php?attachmentid=99288&d=1486654181
You find in this email a 7zip with DMX.xml files from the Aliens DVD.

My cE reads all the XML comments und have a very nice overview about the 
hierarchical Matroska-DVD-Menu structure.
Then you will see that the level 5 ordered chapters are used for the new 
timeline.
Cause, all levels between 1 and 4 are reserved for the DVD-menu-structure.
(I have just noticed that DMX.xml files can have a start time stamp and 
an end time stamp with set to 00:00:00.000000000)

There are one pratice at the moment. My Matroska Menu Editor:
When I combine many files of an episode in many editions in a 
menu-start.mkv (all with Chapter-Segment-Linking)
and I will naviagte through the editions/chapters it is not really handy.
For LAV splitter: In the tray icon you see many editions(thats fine). 
But such an edition(with 20 or more files) has a lot of chapters.
To get a better overview which chapters belong to an episode.mkv I use 
nested chapters.
And therfore is a complex algorithm necessary cause all chapters have to 
be defined twice.
First chapter (level 1) for the ordering and the new timeline duration 
and only the first chapter of an episode.mkv is visible, all others must 
be set to hidden=true.
Second chapter (level 2) with the same time stamps(at the moment it is 
enough when the start time is defined), which is used as chapter mark/jump.

Here a link to a small samle with 3 cutted epsiode.mkv files
http://forum.videohelp.com/attachments/40602-1487505284/MatroskaMenu_Chapter-Segment-Linking.7z
Here an other menu.xml sample.
http://forum.gleitz.info/attachment.php?attachmentid=99279&d=1485686941

I reported a playback bug of such menu.xml files to VLC forum and it was 
fixed.
https://forum.videolan.org/viewtopic.php?f=2&t=137611


In the videohelp forum I have discussed this with a member and he his 
the same opinion like me.

http://forum.videohelp.com/threads/368560-chapterEditor%28OGG-XML-TTXT-m-AVCHD-m-editions-mkv-Matroska-Menu%29-names-CLI?p=2425793&viewfull=1#post2425793


A ordered chapter with a valid duration(greater then 0) should not have 
nested-ordered chapters, cause it makes not sense. The duration of the 
nested-ordered chapter is not defined in the parent chapter-duration.

But for ordered chapters that have a 0 duration or no end time stamp a 
nested-ordered chapter can/should be used.


>
>> For this I have three possible ways in my mind.
>> 1. Only as chapter mark
>> The chapter is shown to the user interface and you can jump to this 
>> point in the timeline. This is the same behaviour like ordered 
>> chapters from Level 2 and deeper. LAV-splitter ignores the "ordered" 
>> state and reads the start time only.
>>
>> 2. Use the ordered times from the nested ordered chapter (I prefer 
>> this option)
>> Nested-ordered-endtimes is a topic where I can't find infos. My 
>> theorie is that such chapters must have then
>> nested chapters and the first nested chapter start time must be the 
>> start/end time of the parent chapter.
>> A splitter should read than the nested-ordered play duration an takes 
>> into acount.
>>
>> 3. Endless loop
>> The frame which correspond to the start time of such a chapter is 
>> shown endless.
>> We could simulate a behaviour for menu's like in DVD's/Bluray's. Some 
>> user option in the player could be prohibited.
>>
>> Empty end times:
>> This can be found in DVDMenuXtractor menu.xml output.
>> In principle we could use the same 3 possibilities here like for "End 
>> time equal to start time"
>>
>>
>> Another EBML element which makes not right sense to me, is 
>> ChapterSegmentEditionUID[6E][BC].
>> When such an UID is specified, the splitter should play this edition 
>> from the linked segment.
>> But an edition have not a start nor an end time!
>> What is with the specified chapter start and end time? This chapter 
>> duration must than match as a sum of all chapter play durations of 
>> the linked edition. What is when in the linked edition has chapters 
>> with linking to other editions?
>> Or is there an other method in use?
>
> I've never used ChapterSegmentEditionUID but it does seem valuable. 
> The specification is not so clear, but my presumption would be that 
> you'd add the ChapterTimeStart of the chapter using 
> ChapterSegmentEditionUID to the starting time of the related Segment's 
> Edition.

(Sorry I don't right understand)

The specs say's
"The EditionUID to play from the segment linked in ChapterSegmentUID."

A splitter generate the virtual time line but the duration info is not 
available/wrong, or the splitter must calculate it first.


>
>> Thanks for reading and sorry for my bad english.
>
> No worries. I think there is a lot to discuss regarding chapters. 
> Honestly I often go to http://mod16.org/hurfdurf/?p=8 for information 
> about Matroska chapters rather than the more official but sparse 
> documentation on matroska.org <http://matroska.org>.
All my Matroska features in cE comes through very often reading this 
wonderful page.

> Perhaps first we could clarify the documentation of the chapter 
> elements in the Matroska Schema 
> <https://github.com/Matroska-Org/matroska-specification/blob/master/ebml_matroska.xml> and 
> then extend the chapter documentation 
> <https://github.com/Matroska-Org/matroska-specification/blob/master/chapters.md> to 
> give descriptive sections on:
> - the use of Non-Ordered Chapters
> - the use of Ordered Chapters
> - how to handle Chapters that reference external Segments and/or Editions
> - also a definition for the xml expression of chapters
>

I will help where I can.


Best regards
Martin Below



> Dave Rice
>
>> Best reagrds
>> Martin
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Matroska-devel mailing list
>> Matroska-devel at lists.matroska.org
>> https://lists.matroska.org/cgi-bin/mailman/listinfo/matroska-devel
>> Read Matroska-Devel on GMane:http://dir.gmane.org/gmane.comp.multimedia.matroska.devel
>> _______________________________________________
>> Cellar mailing list
>> Cellar at ietf.org <mailto:Cellar at ietf.org>
>> https://www.ietf.org/mailman/listinfo/cellar
>
>
>
> _______________________________________________
> Cellar mailing list
> Cellar at ietf.org
> https://www.ietf.org/mailman/listinfo/cellar

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20170222/1677e5a1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DVDMenuXtractor.7z
Type: application/x-7z-compressed
Size: 9453 bytes
Desc: not available
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20170222/1677e5a1/attachment-0001.7z>


More information about the Matroska-devel mailing list