Matroska Sub Chapters

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
ndjamena
Blank Cone
Blank Cone
Posts: 32
Joined: 21 Dec 2013 01:57

Matroska Sub Chapters

Postby ndjamena » 27 Dec 2014 15:28

I'm trying to add sub-chapters to my MKVs but VLC isn't displaying them as I'd anticipated.

The Matroska specs aren't very clear and the only mention of time code specifics says "not scaled" which I'd assumed meant is always relative to the file regardless of anything else.

I asked Mosu and he admitted he had no idea how subchapters worked (apparently it was someone else's job) so I guess I have to ask here, what is the understanding of subchapter timecodes per the VLC development community? (maybe you have a better source than me.)


(And while I'm at it, how do you understand the workings of the combination of subchapters and ordered chapters.)


-edit- Damn it! NOT SCALED. Is not multiplied by the time scale in the header! ie. Nanoseconds only. So now I have absolutely no clue as to how anything works.

ndjamena
Blank Cone
Blank Cone
Posts: 32
Joined: 21 Dec 2013 01:57

Matroska Sub Chapters

Postby ndjamena » 26 Jan 2015 23:03

OK, so I thought of a way to test Sub Chapters using a different program, MKVMerge. I created two MKV files with a single top chapter and moved all the current chapters into it as subchapters, then I used MKVMerge to append to two files into a single file. MKVMerge modified all the chapter timecodes, including the subchapters, to stay relative to their current position in the file, meaning VLC was no longer showing the chapter markers in the correct positions.

I pointed this out to Mosu and he finally gave a reply other than "I don't know":
Hey,

> If I use MMG to add subchapters to an mkv, VLC assumes the subchapter
> timecodes are relative to the start of the parent chapters.

Unfortunately the specs ([1] and [2]) aren't too specific about this, but as long as they don't say that something is relative to something else you have to assume that the first something is absolute. Take the definition of »Block« from [1], for example:

> Block containing the actual data to be rendered and a timestamp
> relative to the Cluster Timecode.

This is clear, and the absence of »relative to…« in the definition of ChapterTimeStart and ChapterTimeEnd means that those timestamps are indeed not relative.

> Should I bother reporting this as a bug in VLC, is this a bug in
> MKVMerge or should I just write this off as another bit of the The
> Matroska specs no one gives a damn about?

VLC is wrong in this regard. So yes, filing a bug report would be the best thing to do. You can include my reply in the report, if you want.

Kind regards,
mosu

[1] http://www.matroska.org/technical/specs/index.html
[2] http://www.matroska.org/technical/specs ... index.html
So... do I need to file a bug report or has this already been taken care of in a pre? Maybe you have prior information that contradicts this...

(if you think about it, Matroska chapters can be layered several times, if using the Tags as an example, the most logical use of sub chapters (although according to the examples, not actually necessary) would be to create one layer each for Series, Season, Episode, Part, Chapter, Scene and Shot. If the timecodes were to reset to zero each time a new level was created, looking at a list of chapters in raw form would be mind numbing. Plus it would make it incredibly fiddly to actually write them in in the first place.)

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Matroska Sub Chapters

Postby Jean-Baptiste Kempf » 27 Jan 2015 09:27

Probably need to file a bugreport, yes. WITH SAMPLES.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

dreamlayers
New Cone
New Cone
Posts: 1
Joined: 13 Feb 2015 03:16

Re: Matroska Sub Chapters

Postby dreamlayers » 14 Feb 2015 04:53

I'm encountering a weird playback issue which is probably related to this. I'm playing a large file I generated with chapters in a 3-level hierarchy. Some of the 2nd level chapter markers appear at the wrong place, at the sum of their time and the time of the 1st level chapter they are in. Clicking on those positions will play the video corresponding to that chapter, but at the wrong time. The exact same video can also be played at its correct earlier time.

As a result, it is impossible to use the progress bar to seek to video that is overlaid by misplaced chapters. If I click there, VLC will play earlier video that corresponds to those chapters. If I seek to before the misplaced chapters and allow playback to continue, I get to the overlaid chapters.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Matroska Sub Chapters

Postby Jean-Baptiste Kempf » 14 Feb 2015 16:16

VLC does not support 3-level.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

ndjamena
Blank Cone
Blank Cone
Posts: 32
Joined: 21 Dec 2013 01:57

Re: Matroska Sub Chapters

Postby ndjamena » 15 Feb 2015 07:28

Hmmmm, while the files I were actually trying to add subchapters to only had two levels (chapter/scene), since VLC wouldn't display them properly I stopped part way through. So for the sample I made to actually demonstrate how subchapters are supposed to work I simply appended two episodes of a TV show together, created chapters for each episode, then moved the original chapters into the new chapters as subchapters. Then I went all out and added chapters to represent series and season for a total of four levels.

VLC seeks within the first episode properly, which means the forth level chapters are functioning correctly, but that may just be because all their parent chapters have start times of zero.

MPC-HC displays the subchapters correctly, but it's not really suited to my workflow.

I'm still trying to get a final decision of sub/ordered chapters.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Matroska Sub Chapters

Postby Jean-Baptiste Kempf » 15 Feb 2015 12:01

File a bug with samples.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

ndjamena
Blank Cone
Blank Cone
Posts: 32
Joined: 21 Dec 2013 01:57

Re: Matroska Sub Chapters

Postby ndjamena » 15 Feb 2015 15:24

It's already done:

https://trac.videolan.org/vlc/ticket/13773

That's the sample I was talking about, it's not an actual file I'd be using but does demonstrate the point well enough.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Corbax and 39 guests