[opus] Encoding OPUS with difference bitrates
Suresh t
suresh997699 at gmail.com
Thu Apr 6 11:00:15 UTC 2017
HI,
I'm trying to simulate an audio conference where each leg can be with a
different bit rate. This needs to encode the source PCM to to different bit
rates back to back and store and send respective encoded frames/packet to
the respective channel. For this I changed the opus_demo as below. But the
output of the second encoded frames is completely garbled.
Appreciate if anyone can suggest how to handle this case.
if(1)
{
opus_encoder_ctl(enc, OPUS_SET_BITRATE(bitrate_bps));
len[toggle] = opus_encode(enc, in, frame_size,
data[toggle], max_payload_bytes);
}
if(1)
{
opus_encoder_ctl(enc, OPUS_SET_BITRATE(32000));
enc_size = opus_encode(enc, in, frame_size, tmpBuffer,
max_payload_bytes);
if (enc_size < 0)
{
fprintf (stderr, "opus_encode() returned %d\n",
enc_size);
return EXIT_FAILURE;
}
Thanks
Suresh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/opus/attachments/20170406/6866721a/attachment.html>
More information about the opus
mailing list