Subject: [Cellar] Menu System in Matroska Files

From: Nithin Mathew Kurien <[email-masked]>
Date: Thu, 17 Dec 2015 16:11:32 +0530

Dear all,

The Matroska specification includes a menu system which is currently
in a draft state (http://matroska.org/technical/menu/index.html).
Currently there are no open-source players supporting this feature.
But there is at least one proprietary format, namely PGMX, a variant
of MKV, that includes a working menu. These files are created by a
proprietary TMPGENC PGMX creator and played by a freeware TMPGENC PGMX
player. A PGMX file also supports including multiple related titles
inside a single file. Opening this file on open-source players will
play it as a normal MKV file without menus. There are some samples
given in their website
(http://tmpgenc.pegasys-inc.com/en/download/tpxp.html).

I think the menu feature would be a good idea to implement in Matroska
files and humbly request for the same. I think this feature would be
useful for content authors who would like to distribute their works
freely under a Creative Commons license, for example, who would
otherwise have to adopt proprietary formats like DVD and Blu-ray. I
understand that implementing a menu system from scratch might involve
some complexity. In that case, would it be possible to adopt some
features from the open-source libdvdnav and libbluray?

Thanks and regards,
Nithin

---

From: Dave Rice <[email-masked]>
Date: Fri, 18 Dec 2015 10:17:38 -0500

Hi,

> On Dec 17, 2015, at 5:41 AM, Nithin Mathew Kurien <[email-masked]> wrote:
> 
> Dear all,
> 

This draft document seems to list features and requirements but does not clarify how to read or write such menu data. AFAIK this is still only an early draft, but could possibly be worked on in coordination of standardizing Matroska version 4.

> of MKV, that includes a working menu.

I'm glad to see this sample as it demonstrates a lot of edge cases in earlier discussion on EBML structure. The sample, http://download1.pegasys-inc.com/download_files/TPXC_materials/elephants_dream.pgmx <http://download1.pegasys-inc.com/download_files/TPXC_materials/elephants_dream.pgmx>, contains 3 EBML Headers, each followed by its own Segment Element. Within the current state of the EBML specification work, this file would be considered an EBML Stream that contains three EBML Documents. The last EBML Document contains 32 attachments, including Navigation.xml, which I extracted to https://gist.github.com/dericed/13ac0fab10a1bed54e37 <https://gist.github.com/dericed/13ac0fab10a1bed54e37>, and lots of png files. It also contains Matroska attachments within Matroska :).

It also seems that most Matroska demuxers ignore the non-first Segment elements.

I'm not familiar enough with navigation to comment much but I suspect that adding a menu to a Matroska file should not require the creation of additional EBML Documents within an EBML Stream. The existing system to reference to link between chapters, tracks, and time currently only coordinations relationships within the same EBML Document.

> These files are created by a
> otherwise have to adopt proprietary formats like DVD and Blu-ray.

I agree that an open format media file with menu based navigation is important. I'd suggest that it could be considered as part of the CELLAR timeline to work on Matroska version 4.

> I

I'm not familiar enough with these two to comment but integrating an existing menu specification with a compatible license may work. You could also review matroska-devel to see how earlier menu discussions progressed.
Dave

> Thanks and regards,
> Nithin
> 
> _______________________________________________
> Cellar mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/cellar

---

From: "Sebastian G. <bastik>" <[email-masked]>
Date: Fri, 18 Dec 2015 19:56:15 +0100

18.12.2015, 16:17 Dave Rice:
> The existing system to reference to link between chapters, tracks,
> and time currently only coordinations relationships within the same
> EBML Document.

I cut out the rest, but kept the sentence intact.

The reason I single out this sentence is because I don't understand it.
I am unable to understand its meaning. It appears like 'to link' and 'to
reference' where meant to substitute each other.

"The existing system ... are currently only coordination relationships
within the same EBML document." ?

"The existing system ... is currently only coordinating relationships
(between elements) within the same EBML document."?

Or something different?

Thank you in advance.

Best Regards,
Sebastian

p.s.: I will not reply to this thread if I get a satisfying answer and
have nothing to contribute to in order to make less noise in the inboxes
of subscribers.

p.p.s.: Menus might add a lot of complexity, but they are surly useful.

---

From: Nithin Mathew Kurien <[email-masked]>
Date: Sat, 19 Dec 2015 01:03:13 +0530

Hi,

On Fri, Dec 18, 2015 at 8:47 PM, Dave Rice <[email-masked]> wrote:
> This draft document seems to list features and requirements but does not
> clarify how to read or write such menu data. AFAIK this is still only an
> early draft, but could possibly be worked on in coordination of
> standardizing Matroska version 4.
>
> I'm glad to see this sample as it demonstrates a lot of edge cases in
> earlier discussion on EBML structure. The sample,
> http://download1.pegasys-inc.com/download_files/TPXC_materials/elephants_dream.pgmx,
> contains 3 EBML Headers, each followed by its own Segment Element. Within
> the current state of the EBML specification work, this file would be
> considered an EBML Stream that contains three EBML Documents. The last EBML
> Document contains 32 attachments, including Navigation.xml, which I
> extracted to https://gist.github.com/dericed/13ac0fab10a1bed54e37, and lots
> of png files. It also contains Matroska attachments within Matroska :).
>
> I'm not familiar enough with navigation to comment much but I suspect that
> adding a menu to a Matroska file should not require the creation of
> additional EBML Documents within an EBML Stream. The existing system to
> reference to link between chapters, tracks, and time currently only
> coordinations relationships within the same EBML Document.
>
> I agree that an open format media file with menu based navigation is
> important. I'd suggest that it could be considered as part of the CELLAR
> timeline to work on Matroska version 4.
>
> I
> I'm not familiar enough with these two to comment but integrating an
> existing menu specification with a compatible license may work. You could
> also review matroska-devel to see how earlier menu discussions progressed.

Thanks. I am cc'ing the e-mail to matroska-devel also.

Thanks and regards,
Nithin

---

From: Dave Rice <[email-masked]>
Date: Fri, 18 Dec 2015 15:03:45 -0500

Hi,

> On Dec 18, 2015, at 1:56 PM, Sebastian G. <bastik> wrote:
> 

I obviously wrote far too quickly, thanks for requesting clarification. I think I had meant to say: "The existing system to reference in-between chapters, tracks, and time currently only coordinates relationships within the same EBML Document.

 However in studying the current Matroska specification again, I see that I may not be correct.

I was considering Matroska Elements such as 'Targets'. Here the current definition says: "Contain all UIDs where the specified meta data apply. It is empty to describe everything in the segment." I had presumed that the Target could only reference a UID within the same Segment element, but I don't think the definition is written in a way that prevents that.

The cited example file contains a structure like:

<EBML>...</EBML>
<Segment>...</Segment>
<EBML>...</EBML>
<Segment>...</Segment>
<EBML>...</EBML>
<Segment>...</Segment>

And contains UID references within the third Segment that reference the first Segment and tracks within it.

> p.p.s.: Menus might add a lot of complexity, but they are surly useful.

Agreed.
Dave Rice