[Matroska-devel] Matroska fast start
mike at haali.net
Wed Jan 9 22:03:04 CET 2008
emanuele fumagalli wrote:
> Hope this is the right place to ask, otherwise redirect me to the
> appropriate forum.
> I think it would be good to have a way to multiplex with Matroska
> putting all the required information for start playing a clip at the
> beginning of the file.
> Now the only command line matroska multiplexer (mkvmerge) puts the Cues
> Section at the end of the file. This means that it’s a little more
> complicated to stream it and there’s a little overhead.
> Is there an easy way to move that section at the beginning?
No, there isn't. The integers are encoded using variable length encoding, so
some values may grow in size after being shifted up. You'd need to reserve some
space to handle that case or use some iterative process until the cues stop
growing. You'll also need to adjust SeekHeads if any stuff they point to is moved.
> I just need some tips how to do that, what library to use and some
> generic steps to follow to achieve that.
You could try libebml/libmatroska, but it's not very well documented.
More information about the Matroska-devel