Hans J. Koch
2008-Nov-13 19:41 UTC
[ogg-dev] video chapters and subtitles in ogg containers
I'm trying to create files that contain a video stream, one or more audio streams, subtitles, and DVD-like chapter information. ATM, I use ogm containers that can handle all this. But although ogm is supported e.g. by xine (including chapters), it seems to be an unofficial hack. Is that correct? I'd like to move to ogg containers, since ogm doesn't support theora videos. My final goal is one file containing theora video streams, vorbis audio streams, chapters, and subtitles Looking into the ogg docs, I found capabilities to handle multiple video and audio streams in ogg skeleton. But what about meta-data like subtitles (in text format, of course) or chapters? I couldn't find anything about this. Question: Is this planned for the future? Question: Or is it possible and I just didn't see it? If yes, how could I help (I'm a programmer) ? Thanks, Hans
Silvia Pfeiffer
2008-Nov-13 23:59 UTC
[ogg-dev] video chapters and subtitles in ogg containers
Hi Hans, At the moment, Ogg supports two text codecs, CMML and Kate. Both of them are theoretically capable of doing what you want with chapters and subtitles. The biggest problem is player support. There is CMML and kate support in vlc, and kate in mplayer though I am not sure how it is displayed on-screen. Subtitles may display, but chapter markers, I am not so sure about. I assume the subtitles that you have are in srt format which is why you chose ogm as the container format? You will need to transcode them to CMML or Kate to encode into Ogg. There is an old python script for cmml at http://svn.annodex.net/scripts/trunk/subtitles/script-subrip2cmml.py . I'm not sure something like this exists for kate. But it should not be too hard to write one. One more piece of news: I am currently doing a contract for Mozilla about video accessibility for Ogg. There is a lot of work going on in this space right now and we expect to have subtitle support by next year in Firefox with Ogg, but this is currently not the case. The work is being done on "accessibility at xiph.org" <accessibility at xiph.org> and https://wiki.mozilla.org/Accessibility/Video_Accessibility in case you are interested. In view of this work, I am considering abandoning CMML and putting it into a greater framework that is also Web focused. It may have some similarity to kate, but it will have a stronger Web focus than kate, which has everything within the file. Then again, I am not sure if I may just recommend the use of kate to Mozilla. There is some more work necessary. Anyway - I thought I should give you the full picture. :) Cheers, Silvia. On Fri, Nov 14, 2008 at 6:41 AM, Hans J. Koch <hjk at linutronix.de> wrote:> I'm trying to create files that contain a video stream, one or more > audio streams, subtitles, and DVD-like chapter information. > > ATM, I use ogm containers that can handle all this. But although ogm > is supported e.g. by xine (including chapters), it seems to be an > unofficial hack. Is that correct? > > I'd like to move to ogg containers, since ogm doesn't support theora > videos. My final goal is one file containing theora video streams, > vorbis audio streams, chapters, and subtitles > > Looking into the ogg docs, I found capabilities to handle multiple video > and audio streams in ogg skeleton. But what about meta-data like subtitles > (in text format, of course) or chapters? I couldn't find anything about this. > > Question: Is this planned for the future? > > Question: Or is it possible and I just didn't see it? > > If yes, how could I help (I'm a programmer) ? > > Thanks, > Hans > > _______________________________________________ > ogg-dev mailing list > ogg-dev at xiph.org > http://lists.xiph.org/mailman/listinfo/ogg-dev >
ogg.k.ogg.k at googlemail.com
2008-Nov-14 09:48 UTC
[ogg-dev] video chapters and subtitles in ogg containers
Hi, (odd, I did get this reply for Silvia, but not the original post)> There is CMML and kate support in vlc, and kate in mplayer though I am > not sure how it is displayed on-screen. Subtitles may display, but > chapter markers, I am not so sure about.Would you mind expanding on what chapters are, and what you'd expect to be able to do with them ?> There is an old python script for cmml at > http://svn.annodex.net/scripts/trunk/subtitles/script-subrip2cmml.py . > I'm not sure something like this exists for kate. > But it should not be too hard to write one.kateenc (a tool bundled with libkate) can convert a srt file to a Kate stream, which can then be multiplexed along with a Theora video (and other Kate, Vorbis, etc streams).
Hans J. Koch
2008-Nov-14 11:27 UTC
[ogg-dev] video chapters and subtitles in ogg containers
On Fri, Nov 14, 2008 at 10:59:43AM +1100, Silvia Pfeiffer wrote:> Hi Hans,Hi Silvia,> > At the moment, Ogg supports two text codecs, CMML and Kate. Both of > them are theoretically capable of doing what you want with chapters > and subtitles. The biggest problem is player support. > > There is CMML and kate support in vlc, and kate in mplayer though I am > not sure how it is displayed on-screen. Subtitles may display, but > chapter markers, I am not so sure about.Neither am I. I'll try. For OGM containers, xine has the best support for both chapters and subtitles. MPlayer does subtitles, but no chapters, at least in the version I use. Same applies to VLC.> > I assume the subtitles that you have are in srt format which is why > you chose ogm as the container format?I don't care much about the format. Yes, ATM it's srt, but as long as it's a text format, it's easy enough for me to convert it to something different. It should really be a text format, I don't want to need a tool other than vim to edit my subtitles ;-)> > You will need to transcode them to CMML or Kate to encode into Ogg. > There is an old python script for cmml at > http://svn.annodex.net/scripts/trunk/subtitles/script-subrip2cmml.py . > I'm not sure something like this exists for kate. > But it should not be too hard to write one.OK, thanks!> > One more piece of news: I am currently doing a contract for Mozilla > about video accessibility for Ogg. There is a lot of work going on in > this space right now and we expect to have subtitle support by next > year in Firefox with Ogg, but this is currently not the case. The work > is being done on "accessibility at xiph.org" <accessibility at xiph.org> > and https://wiki.mozilla.org/Accessibility/Video_Accessibility in case > you are interested.Looks interesting...> > In view of this work, I am considering abandoning CMML and putting it > into a greater framework that is also Web focused. It may have some > similarity to kate, but it will have a stronger Web focus than kate, > which has everything within the file. Then again, I am not sure if I > may just recommend the use of kate to Mozilla. There is some more work > necessary. > > Anyway - I thought I should give you the full picture. :)Thanks a lot! Hans
Hans J. Koch
2008-Nov-14 11:36 UTC
[ogg-dev] video chapters and subtitles in ogg containers
On Thu, Nov 13, 2008 at 04:17:04PM -0800, Ralph Giles wrote:> On Thu, Nov 13, 2008 at 3:59 PM, Silvia Pfeiffer > <silviapfeiffer1 at gmail.com> wrote: > > > At the moment, Ogg supports two text codecs, CMML and Kate. Both of > > them are theoretically capable of doing what you want with chapters > > and subtitles. The biggest problem is player support. > > I also want to mention that Ogg has a natural chapter mechanism, where > each chapter is encoded separately and the segments are (literally) > concatenated together. This is legal as long as the stream serial > numbers are all unique in the chain, and the chapters can be > identified by metadata changes at the segment boundaries. This has the > advantage that it can be generated for live streams, and in fact this > is how song changes are handled in internet radio streams.Ah, nice feature. This is different from the usual approach known from DVDs where you have the full list of chapter entry points available from the beginning. This can't be done for live streams, naturally.> > Again, the biggest problem is player support. Most video players don't > currently support chained Ogg streams, or do anything useful in the ui > to show the chapter boundaries.For a live stream, the player could at least display chapter info. When recording a stream to disk, it could e.g. offer an option to start a new file on chapter boundaries. Chapters as known from DVD are probably impossible since you cannot seek to arbitrary points.> > If you'd like to help, improving player and authoring support for one > or more of these schemes would be a great place to start. :)OK. Thanks for explaining this, Hans
ogg.k.ogg.k at googlemail.com
2008-Nov-14 11:43 UTC
[ogg-dev] video chapters and subtitles in ogg containers
>> I also want to mention that Ogg has a natural chapter mechanism, where >> each chapter is encoded separately and the segments are (literally) >> concatenated together. This is legal as long as the stream serialIf the use of these is seeking, chaining doesn't fit the bill as you have to parse the stream to know which chains you have, no ? This kind of defeats the purpose of skipping to a known place.