<div dir="ltr"><div>Are you setting it up just to push bytes around your network to end devices, or are you creating a gateway with the capability to transcode for interoperability with other networks?</div><div><br></div><div>If you just want to handle Opus internally and forward it to other devices, the absolute maximum packet size is a few bytes over 61200 (120 ms / 2.5 ms * 1275 bytes, ignoring the small overhead of the packet and each frame). At a hard minimum of 20ms that drops to a maximum 7650 bytes.<br></div><div><br></div><div>If you need to re-eecode it, you will need space for the largest compressed packet (7650 bytes), plus the largest uncompressed packet (11520 bytes, assuming mono16), plus memory for the opus decoder, then set it all up again for the encoder.<br></div><div><br></div><div>You calculated correctly, (aside from the 0 typo), but you need to always know whether you're working entirely in the network and just forwarding and repacketizing (and potentially doing FEC), or if you're acting as a full-service gateway. The latter is much more expensive, but in my experience other VoIP gateways have zero interest in signaling what they support, so you have to convert everything to u-law anyway.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 18, 2019 at 7:00 AM Abdulaziz Alghosh <<a href="mailto:aziz647@gmail.com">aziz647@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Everbody,<br><br>i am not so good with codecs and a lot of terms in RFC 6716 of OPUS are not so familiar for me.<br>I work in VoIP domain (Internet telephony) and try to support OPUS codec throughout our network. <div>Therefore, I am trying actully to calculate or estimate the biggest possible size of the RTP OPUS Packet in case of WB or FB.<br><br>Unfortunately, The "Frame Length Coding" paragraph of RFC 6716 (<a href="https://tools.ietf.org/html/rfc6716#section-3.2.1" target="_blank">https://tools.ietf.org/html/rfc6716#section-3.2.1</a>)  

is not clear enough for me 

to understand why  "" The maximum representable length is 255*4+255=1275 bytes "" </div><div><br>is the Frame length useful only to calculate the bitrate but not the packet size ?<br>the OPUS coded data is compressed. Is it not possible because of this to estimate the packet size ?<br><br>according to <a href="https://tools.ietf.org/html/rfc6716#section-2.1.4" target="_blank">https://tools.ietf.org/html/rfc6716#section-2.1.4</a> (Frame Duration)  :</div><div> <br>it (OPUS) can also combine multiple frames into packets of up to 120 ms. (for me this means 6 Frames. Each is 20 ms)<br><br>so if I the VoIP Device support FB OPUS the and Sampling Rate is 48000 Sample per a Second (1000 ms), then that means the Frame has 9600 samples.<br><br>9600 samples * 16 bit (bit-depth) = 153600 bit per a Frame => 19200 Byte per a Frame <div>19200 Byte per a Frame  * 6 Frames in a Packet (longest Packet) = 115200 Byte per a Packet.<br></div><div><br></div><div>are  the 15200 Bytes normally compressed ? </div><div><br></div><div>once again, I am trying to find out how could the packet size of OPUS be calculated</div></div><div><br></div><div>thanks in advance for your help</div><div>Abdulaziz</div></div>
_______________________________________________<br>
opus mailing list<br>
<a href="mailto:opus@xiph.org" target="_blank">opus@xiph.org</a><br>
<a href="http://lists.xiph.org/mailman/listinfo/opus" rel="noreferrer" target="_blank">http://lists.xiph.org/mailman/listinfo/opus</a><br>
</blockquote></div>