After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 481070 - [matroska] support for ordered chapters
[matroska] support for ordered chapters
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.32
Other All
: Normal enhancement
: 1.0.0
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 540883 (view as bug list)
Depends on: 540890
Blocks: 163546
 
 
Reported: 2007-09-27 19:33 UTC by Benjamin Schmitz
Modified: 2012-10-06 11:55 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Add TOC support for the chapters (12.35 KB, patch)
2010-07-17 17:55 UTC, Alexander Saprykin
none Details | Review
Generic TOC support (12.63 KB, patch)
2010-07-17 21:55 UTC, Alexander Saprykin
none Details | Review
Matroska chapters support (with tags) (32.16 KB, patch)
2010-07-26 22:55 UTC, Alexander Saprykin
none Details | Review
Chapters support for matroska demuxer (18.93 KB, patch)
2010-07-27 19:55 UTC, Alexander Saprykin
none Details | Review
Chapters support for matroska muxer (13.46 KB, patch)
2010-07-27 19:56 UTC, Alexander Saprykin
none Details | Review
Chapter support for matroska common reader (16.90 KB, patch)
2012-03-29 19:28 UTC, Alexander Saprykin
committed Details | Review
Chapter support for matroska demuxer (5.07 KB, patch)
2012-03-29 19:29 UTC, Alexander Saprykin
committed Details | Review
Chapter support for matroska muxer (13.96 KB, patch)
2012-03-29 19:30 UTC, Alexander Saprykin
committed Details | Review

Description Benjamin Schmitz 2007-09-27 19:33:49 UTC
Matroska's ordered chapters allow many useful 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

See here for a short explanation of what ordered chapters are:
http://forum.doom9.org/showthread.php?t=99489

Since ordered chapters are used more and more (especially on series, where the intro/outro are moved to separate files and then linked to the episodes in order to save space) it is absolutely required that gstreamer's matroskademux supports them.
Comment 1 Tim-Philipp Müller 2007-09-28 11:08:06 UTC
Sounds like a bit of an exotic feature to me.

Jumping around within the same file is not a problem, doing a redirection to a new file is also not a problem, but seamlessly jumping from one file to another and keeping state is a bit of a problem with our current design/demuxer because the assumption is almost always that there's only one file/stream input.

For things like external subtitles other elements like playbin hook up the second input.  In other words: you'd probably need a special-case element/bin for this.

It'd also be possible to make matroska-demux support a bunch of request sink pads (one per file referenced) and make the application/playbin/a helper bin connect those by posting messages on the bus or emitting signas, but this would involve a major rewrite of the matroska demuxer.
Comment 2 Sebastian Dröge (slomo) 2008-06-30 09:21:51 UTC
*** Bug 540883 has been marked as a duplicate of this bug. ***
Comment 3 Bastien Nocera 2008-06-30 09:28:50 UTC
(In reply to comment #1)
> Sounds like a bit of an exotic feature to me.

Chapters can also be implemented in ogg videos, using chained oggs. This allows to replicate DVD chapters, or add bookmarks in files.

> Jumping around within the same file is not a problem, doing a redirection to a
> new file is also not a problem, but seamlessly jumping from one file to another
> and keeping state is a bit of a problem with our current design/demuxer because
> the assumption is almost always that there's only one file/stream input.

We could just ignore cross-files references for now. This file uses chapters:
http://www.matroska.org/samples/matrix/Matrix.Reloaded.Trailer-RV9-Karl640x432_HE_AAC_subtitled_chapters.mkv

and should be self-contained.
Comment 4 Alexander Saprykin 2010-07-17 17:55:26 UTC
Created attachment 166083 [details] [review]
Add TOC support for the chapters

Based on patches from the https://bugzilla.gnome.org/show_bug.cgi?id=540890
Comment 5 Alexander Saprykin 2010-07-17 21:55:19 UTC
Created attachment 166099 [details] [review]
Generic TOC support

Fix reseting
Comment 6 Alexander Saprykin 2010-07-26 22:55:50 UTC
Created attachment 166608 [details] [review]
Matroska chapters support (with tags)
Comment 7 Sebastian Dröge (slomo) 2010-07-27 10:01:54 UTC
Please try to split the matroska patch into 3 pieces. One for adding the chapters support in the demuxer, one for the demuxer and one for the per-track-chapter-foo tags support. That makes reviewing much easier :)
Comment 8 Alexander Saprykin 2010-07-27 10:13:06 UTC
Here is a git repository with Matroska chapters support:

git://gitorious.org/gstreamer-chapters/gstreamer-good.git 

I'll try to create splitted patches later when I would have an access to my working laptop :)
Comment 9 Alexander Saprykin 2010-07-27 19:55:46 UTC
Created attachment 166665 [details] [review]
Chapters support for matroska demuxer
Comment 10 Alexander Saprykin 2010-07-27 19:56:24 UTC
Created attachment 166666 [details] [review]
Chapters support for matroska muxer
Comment 11 Alexander Saprykin 2010-07-27 20:04:17 UTC
I've tried to split patch for 3 pieces, but tags and chapters are interleaved in the muxer (especially in the _finish () func), so it's hard to make separate patches for that :( Btw, the last patch's id is scaring me :)
Comment 12 Bastien Nocera 2011-03-26 01:52:05 UTC
http://mod16.org/hurfdurf/?p=8 has an example on generating a ordered chapters in a matroska container.

Sebastian, any chance to review Alexander's patches?
Comment 13 Stefan Sauer (gstreamer, gtkdoc dev) 2012-03-21 20:59:20 UTC
The patches don't apply anymore. Does anyone has them still applied and can update them?
Comment 14 Alexander Saprykin 2012-03-21 21:45:56 UTC
I will sync them with current GStreamer next week.
Comment 15 Alexander Saprykin 2012-03-29 19:28:42 UTC
Created attachment 210892 [details] [review]
Chapter support for matroska common reader
Comment 16 Alexander Saprykin 2012-03-29 19:29:30 UTC
Created attachment 210893 [details] [review]
Chapter support for matroska demuxer
Comment 17 Alexander Saprykin 2012-03-29 19:30:36 UTC
Created attachment 210895 [details] [review]
Chapter support for matroska muxer