GNOME Bugzilla – Bug 481070
[matroska] support for ordered chapters
Last modified: 2012-10-06 11:55:52 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.
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.
*** Bug 540883 has been marked as a duplicate of this bug. ***
(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.
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
Created attachment 166099 [details] [review] Generic TOC support Fix reseting
Created attachment 166608 [details] [review] Matroska chapters support (with tags)
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 :)
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 :)
Created attachment 166665 [details] [review] Chapters support for matroska demuxer
Created attachment 166666 [details] [review] Chapters support for matroska muxer
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 :)
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?
The patches don't apply anymore. Does anyone has them still applied and can update them?
I will sync them with current GStreamer next week.
Created attachment 210892 [details] [review] Chapter support for matroska common reader
Created attachment 210893 [details] [review] Chapter support for matroska demuxer
Created attachment 210895 [details] [review] Chapter support for matroska muxer