[Matroska-devel] how to add audio streams to ebml?

Ralph Giles giles at thaumas.net
Thu Sep 13 23:41:39 CEST 2012


On 12-08-26 8:03 AM, alexander wrote:

> But how to calculate size of MP3data? MP3header do not contains this
> information. 
> And how to know the time when this data should play?

The mp3 header does contain this information. It tells you the layer,
bitrate, sample frequency, and pad bit, from which you can calculate the
length of the frame. You can verify the calculation by looking for the
sync word at the expected location.

http://en.wikipedia.org/wiki/MP3 is a good place to start on parsing the
header, although it's not explicit about how to calculate the exact length.

HTH,
 -r


More information about the Matroska-devel mailing list