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.
Ralph Giles
2008-Nov-14 19:40 UTC
[ogg-dev] video chapters and subtitles in ogg containers
On Fri, Nov 14, 2008 at 3:43 AM, ogg.k.ogg.k at googlemail.com <ogg.k.ogg.k at googlemail.com> wrote:> If 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.You don't have to parse the whole file, just enough to find all the chain boundaries. That can still take some time, of course. Prohibitively so for many segments over a high-latency interface. We have resisted doing a seek table in the past. One of the design goals of Ogg has always been that it be not just consumable as a stream, but writable as well. This requires that everything be single pass, which isn't true of a seek table. If the chapter index only references time as Hans has described, and not byte offsets, then when transcoding of course you could put it in at the beginning with the expectation that the complete encode would include all the targets. For web video, retrieving the CMML clip boundaries is equally expensive. The solution annodex pioneered there was to have the server extract just the CMML track (which can be represented as an external xml file) and pass that to the client over a separate connection. That gets you your clip->time mapping from which you can generate seek requests without downloading the whole stream. It's effectively preloading a cache of CMML clip data elements. -r
Hans J. Koch
2008-Nov-14 20:25 UTC
[ogg-dev] video chapters and subtitles in ogg containers
On Fri, Nov 14, 2008 at 11:40:18AM -0800, Ralph Giles wrote:> On Fri, Nov 14, 2008 at 3:43 AM, ogg.k.ogg.k at googlemail.com > <ogg.k.ogg.k at googlemail.com> wrote: > > > If 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. > > You don't have to parse the whole file, just enough to find all the > chain boundaries. That can still take some time, of course. > Prohibitively so for many segments over a high-latency interface. > > We have resisted doing a seek table in the past. One of the design > goals of Ogg has always been that it be not just consumable as a > stream, but writable as well. This requires that everything be single > pass, which isn't true of a seek table. If the chapter index only > references time as Hans has described, and not byte offsets, then when > transcoding of course you could put it in at the beginning with the > expectation that the complete encode would include all the targets.Yes, that's what I mean. When encoding such a file, you usually pass in a text file containing the chapter entry times and optionally chapter names. That's how dvdauthor or ogmmerge do it. The fisbone element of ogg skeleton might be a good place to store such data, maybe simply as name/value pairs, like CHAPTER01=00:00:00.000;CHAPTER02=00:00:58.240;... Thanks, Hans
ogg.k.ogg.k at googlemail.com
2008-Nov-17 11:01 UTC
[ogg-dev] video chapters and subtitles in ogg containers
> You don't have to parse the whole file, just enough to find all the > chain boundaries. That can still take some time, of course.Don't you have to parse the whole file to find those ? Technically, if you find two packets with the same serialno, it is possible that they'd be *different* logical streams just happening to have the same serial, which would be OK if there was another stream in the middle with *another* serial. OK, maybe that's very unlikely, but still legal.