[opus] multi stream decode

Jean-Marc Valin jmvalin at jmvalin.ca
Tue Dec 18 07:44:53 PST 2012

Hi Audric,

First thing I'd like to point out is that the current RTP draft does not
support transmitting more than one stream. Unless the two streams are
truly unrelated, I recommend sending as a stereo stream using the
standard (non multi-stream) API. Otherwise, you will not be compatible
with any other application, in which case, I strongly recommend *not*
using "opus" as the SDP codec name.

On 12/18/2012 10:21 AM, Audric Ackermann wrote:
> I think I'm right when I create an OpusMsDecoder with
> opus_multistream_decoder_create (48000, 2, 2 ,0 ,mapping, NULL)
> where mapping is:  unsigned char mapping[2] = {0,1} isn't it ?
> Next, i need to encode data which I get from jack (float) so I use
> opus_multistream_encode_float(enc, data, 480 , encodedData, MAX_DATA)

Looks correct.

> My question is how can I make the opposite in the client.
> I created my decoder with
> m_decoder = opus_multistream_decoder_create (48000, 2, 2
> ,0,mapping,NULL) and
> unsigned char mapping[2] = {0,1};
> Currently, I can read my RTP packet from network, and get data from it.
> I need now to decode opus data to something readable for jack. I do it
> like that :
> opus_multistream_decode_float(m_decoder, data, len, decodedBuffer,
> BUFLEN, 0);

Also looks correct.

> But how can I know the start of the two packets ?

I don't understand your question.


More information about the opus mailing list