[opus] adaptive bandwidth
Kelvin Chua
kelchy at gmail.com
Wed Mar 4 03:19:08 PST 2015
opus_encoder_ctl(opvt->opus,
OPUS_SET_MAX_BANDWIDTH(OPUS_BANDWIDTH_WIDEBAND));
opus_encoder_ctl(opvt->opus, OPUS_SET_BITRATE(15000));
but if i do this
opus_encoder_ctl(opvt->opus,
OPUS_SET_MAX_BANDWIDTH(OPUS_BANDWIDTH_NARROWBAND));
i could see bandwidth go down
is there any way i can be sure that it is working?
i tried this, bandwidth still stays the same as if i did not set it.
Kelvin Chua
On Wed, Mar 4, 2015 at 6:16 PM, Dragos Oancea <droancea at yahoo.com> wrote:
> Hi Kelvin,
>
>
> The audio bandpass setting is only configurable when the encoder is
> instantiated (eg: start of a Voip call ) , but you can change the bitrate
> anytime.
> For example if you can read incoming RTCP packets , you can check if
> there's reported packet loss , and then lower the bitrate accordingly.
> Yes, the app has to be aware of the packetloss percentage.
>
> Cheers,
> Dragos
>
> ------------------------------
> *From:* Kelvin Chua <kelchy at gmail.com>
> *To:* Dragos Oancea <droancea at yahoo.com>
> *Cc:* Benjamin Schwartz <benjamin.m.schwartz at gmail.com>; "opus at xiph.org" <
> opus at xiph.org>
> *Sent:* Wednesday, March 4, 2015 11:02 AM
>
> *Subject:* Re: [opus] adaptive bandwidth
>
> Thanks Dragos,
>
> I assume I will be setting those parameters during initialization of
> encoder right?
> Question is, if connection gets too lossy, how will opus adapt to it? Can
> it automatically shift bitrate down to minimize impact?
> Mark from IRC suggests that the app has to be aware of the losses and
> change it on the fly.
> Has anybody on the list tried this?
>
>
> Kelvin Chua
>
>
>
> On Wed, Mar 4, 2015 at 5:53 PM, Dragos Oancea <droancea at yahoo.com> wrote:
>
> Hi Kelvin,
>
> You can use something like :
> opus_encoder_ctl(enc,OPUS_SET_BITRATE(bitrate));
> opus_encoder_ctl(enc,OPUS_SET_MAX_BANDWIDTH(bandpass));
> bandpass is the audio bandpass , eg: OPUS_BANDWIDTH_WIDEBAND .
>
> You will need to calculate the codec bitrate from the available network
> bitrate (by taking into account the size of the IP+UDP+RTP headers which is
> 40 bytes ) .
> By default the audio bandwidth (bandpass) setting is
> OPUS_BANDWIDTH_FULLBAND , which will utilize more network bandwidth .
>
>
> Regards,
> Dragos
>
> ------------------------------
> *From:* Kelvin Chua <kelchy at gmail.com>
> *To:* Benjamin Schwartz <benjamin.m.schwartz at gmail.com>
> *Cc:* opus at xiph.org
> *Sent:* Wednesday, March 4, 2015 2:27 AM
> *Subject:* Re: [opus] adaptive bandwidth
>
> I am using libopus for my implementation. I wonder if anybody in the list
> have any experience on how to make libopus dynamically adjust its bitrate?
> On Mar 3, 2015 10:42 PM, "Benjamin Schwartz" <
> benjamin.m.schwartz at gmail.com> wrote:
>
> It sounds like your software isn't adjusting the opus bitrate in response
> to network conditions. For example, many WebRTC implementations do not
> adjust the opus bitrate, because it is small in comparison to the video
> bitrate. However, opus itself does support continuously varying the
> bitrate over a wide range.
>
> On Tue, Mar 3, 2015, 12:58 AM Kelvin Chua <kelchy at gmail.com> wrote:
>
> Hi guys,
>
> I have been reading a lot about the "adaptiveness" of opus and i quote:
>
> ... can still change, e.g. to adapt to changing network conditions.
> useinbandfec ...
>
> can somebody please enlighten me on this "adaptiveness"?
> whatever way I do our tests, it sticks to the same sampling rate and the
> same average bitrate, it would go up, down a bit but that's it.
> When we get some network issues, bandwidth utilization stays the same.
> Am I interpreting it incorrectly?
>
> Kelvin Chua
> _______________________________________________
> opus mailing list
> opus at xiph.org
> http://lists.xiph.org/mailman/listinfo/opus
>
>
> _______________________________________________
> opus mailing list
> opus at xiph.org
> http://lists.xiph.org/mailman/listinfo/opus
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/opus/attachments/20150304/ebf955f0/attachment-0001.htm
More information about the opus
mailing list