<div dir="ltr"><div>opus_encoder_ctl(opvt->opus, OPUS_SET_MAX_BANDWIDTH(OPUS_BANDWIDTH_WIDEBAND));<br></div><div>opus_encoder_ctl(opvt->opus, OPUS_SET_BITRATE(15000));</div><div><br></div><div>but if i do this</div><div>opus_encoder_ctl(opvt->opus, OPUS_SET_MAX_BANDWIDTH(OPUS_BANDWIDTH_NARROWBAND));<br></div><div>i could see bandwidth go down</div><div><br></div><div>is there any way i can be sure that it is working?</div><div><br></div><div><br></div><div><br></div><div>i tried this, bandwidth still stays the same as if i did not set it.</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">Kelvin Chua</div></div>
<br><div class="gmail_quote">On Wed, Mar 4, 2015 at 6:16 PM, Dragos Oancea <span dir="ltr"><<a href="mailto:droancea@yahoo.com" target="_blank">droancea@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div style="color:rgb(0,0,0);font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:16px;background-color:rgb(255,255,255)"><div dir="ltr">Hi Kelvin,</div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr">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.</div><div dir="ltr">For example if you can read incoming RTCP packets , you can check if there's reported packet loss , and then lower the bitrate accordingly.</div><div dir="ltr">Yes, the app has to be aware of the packetloss percentage.</div><div><br></div><div dir="ltr">Cheers,</div><div dir="ltr">Dragos</div><div><br></div><div class=""> </div><div style="font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:16px"><div class=""> </div><div style="font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:16px"><div class=""> </div><div dir="ltr"><div class=""> <hr size="1"> </div><font face="Arial"><div class=""> <b><span style="font-weight:bold">From:</span></b> Kelvin Chua <<a href="mailto:kelchy@gmail.com" target="_blank">kelchy@gmail.com</a>><br> <b><span style="font-weight:bold">To:</span></b> Dragos Oancea <<a href="mailto:droancea@yahoo.com" target="_blank">droancea@yahoo.com</a>> <br><b><span style="font-weight:bold">Cc:</span></b> Benjamin Schwartz <<a href="mailto:benjamin.m.schwartz@gmail.com" target="_blank">benjamin.m.schwartz@gmail.com</a>>; "<a href="mailto:opus@xiph.org" target="_blank">opus@xiph.org</a>" <<a href="mailto:opus@xiph.org" target="_blank">opus@xiph.org</a>> <br> <b><span style="font-weight:bold">Sent:</span></b> Wednesday, March 4, 2015 11:02 AM</div><div><div class="h5"><br> <b><span style="font-weight:bold">Subject:</span></b> Re: [opus] adaptive bandwidth<br> </div></div></font> </div><div><div class="h5"> <div><br><div><div><div dir="ltr">Thanks Dragos,<div><br clear="none"></div><div>I assume I will be setting those parameters during initialization of encoder right?</div><div>Question is, if connection gets too lossy, how will opus adapt to it? Can it automatically shift bitrate down to minimize impact?</div><div>Mark from IRC suggests that the app has to be aware of the losses and change it on the fly.</div><div>Has anybody on the list tried this?</div><div><br clear="none"></div></div><div><br clear="all"><div><div>Kelvin Chua</div></div>
<br clear="none"><div><br><br></div><div><div>On Wed, Mar 4, 2015 at 5:53 PM, Dragos Oancea <span dir="ltr"><<a rel="nofollow" shape="rect" href="mailto:droancea@yahoo.com" target="_blank">droancea@yahoo.com</a>></span> wrote:<br clear="none"><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div style="color:rgb(0,0,0);font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:16px;background-color:rgb(255,255,255)"><div dir="ltr"><span>Hi Kelvin,</span></div><div dir="ltr"><span><br clear="none"></span></div><div dir="ltr"><span>You can use something like :</span></div><div dir="ltr"><span>opus_encoder_ctl(enc,OPUS_SET_BITRATE(bitrate));</span></div><div>opus_encoder_ctl(enc,OPUS_SET_MAX_BANDWIDTH(bandpass));<br clear="none"></div><div dir="ltr">bandpass is the audio bandpass , eg: OPUS_BANDWIDTH_WIDEBAND .</div><div dir="ltr"><br clear="none"></div><div dir="ltr">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 ) .<br clear="none"></div><div dir="ltr">By default the audio bandwidth (bandpass) setting is OPUS_BANDWIDTH_FULLBAND , which will utilize more network bandwidth .</div><div dir="ltr"><br clear="none"></div><div><br clear="none"></div><div dir="ltr">Regards,</div><div dir="ltr">Dragos</div><div><br clear="none"></div> <div style="font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:16px"> <div style="font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:16px"> <div dir="ltr"> <hr size="1"> <font face="Arial"> <b><span style="font-weight:bold">From:</span></b> Kelvin Chua <<a rel="nofollow" shape="rect" href="mailto:kelchy@gmail.com" target="_blank">kelchy@gmail.com</a>><br clear="none"> <b><span style="font-weight:bold">To:</span></b> Benjamin Schwartz <<a rel="nofollow" shape="rect" href="mailto:benjamin.m.schwartz@gmail.com" target="_blank">benjamin.m.schwartz@gmail.com</a>> <br clear="none"><b><span style="font-weight:bold">Cc:</span></b> <a rel="nofollow" shape="rect" href="mailto:opus@xiph.org" target="_blank">opus@xiph.org</a> <br clear="none"> <b><span style="font-weight:bold">Sent:</span></b> Wednesday, March 4, 2015 2:27 AM<br clear="none"> <b><span style="font-weight:bold">Subject:</span></b> Re: [opus] adaptive bandwidth<br clear="none"> </font> </div><div><div> <div><br clear="none"><div><div dir="ltr">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?</div>
<div>On Mar 3, 2015 10:42 PM, "Benjamin Schwartz" <<a rel="nofollow" shape="rect" href="mailto:benjamin.m.schwartz@gmail.com" target="_blank">benjamin.m.schwartz@gmail.com</a>> wrote:<br clear="none"><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">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.</div>
<br clear="none"><div>On Tue, Mar 3, 2015, 12:58 AM Kelvin Chua <<a rel="nofollow" shape="rect" href="mailto:kelchy@gmail.com" target="_blank">kelchy@gmail.com</a>> wrote:<br clear="none"><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Hi guys,</div><div><br clear="none"></div><div>I have been reading a lot about the "adaptiveness" of opus and i quote:</div><div><br clear="none"></div><div>... can still change, e.g. to adapt to changing network conditions. useinbandfec ...<br clear="none"></div><div><br clear="none"></div><div>can somebody please enlighten me on this "adaptiveness"?</div><div>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.</div><div>When we get some network issues, bandwidth utilization stays the same.</div><div>Am I interpreting it incorrectly?</div><br clear="all"><div><div>Kelvin Chua</div></div>
</div>
______________________________<u></u>_________________<br clear="none">
opus mailing list<br clear="none">
<a rel="nofollow" shape="rect" href="mailto:opus@xiph.org" target="_blank">opus@xiph.org</a><br clear="none">
<a rel="nofollow" shape="rect" href="http://lists.xiph.org/mailman/listinfo/opus" target="_blank">http://lists.xiph.org/mailman/<u></u>listinfo/opus</a><br clear="none">
</blockquote></div>
</blockquote></div></div><br clear="none">_______________________________________________<br clear="none">opus mailing list<br clear="none"><a rel="nofollow" shape="rect" href="mailto:opus@xiph.org" target="_blank">opus@xiph.org</a><br clear="none"><a rel="nofollow" shape="rect" href="http://lists.xiph.org/mailman/listinfo/opus" target="_blank">http://lists.xiph.org/mailman/listinfo/opus</a><br clear="none"><br clear="none"><br clear="none"></div> </div></div></div> </div> </div></div></blockquote></div></div><br clear="none"></div></div></div><br><br></div> </div></div></div> </div> </div></div></blockquote></div><br></div></div>