[Matroska-devel] Re: Musepack support

Nicolas r2d at musepack.net
Fri Feb 8 11:59:08 CET 2008


I Christian, thanks for your answer.

Christian HJ Wiesner a écrit :
> A_MPC_SV8
I think I prefer this one

> - a very clear spec of the format itself, and the way the audio packets 
> should be muxed into matroska, including headers etc.
> - if possible some example code for a demuxer and muxer (for 
> mkvextract), preferably in C or C++
The SV8 spec is here :
http://trac.musepack.net/trac/wiki/SV8Specification
The only necessary header for playing the stream is the "Stream Header Packet", so this one must be in the codec private data. Other header packets (RG, EI) are not necessary for playing the file, so may be put somewhere else (or not put at all).
The main data packet is the "Audio packet".
For building a seeking table, you will need to read the "Audio block frames" field in the Stream Header Packet, which defines the number of audio frames (1152 samples) per audio packet.
A C implementation of the demuxer is here :
http://trac.musepack.net/trac/browser/libmpc/trunk/libmpcdec/mpc_demux.c
or see libmpcdec in the libmpc svn :
http://svn.musepack.net/libmpc/trunk

Regards,

Nicolas



More information about the Matroska-devel mailing list