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?
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.
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.
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.
On Fri, Oct 18, 2019 at 7:00 AM Abdulaziz Alghosh <aziz647 at gmail.com>
wrote:
> Hi Everbody,
>
> i am not so good with codecs and a lot of terms in RFC 6716 of OPUS are
> not so familiar for me.
> I work in VoIP domain (Internet telephony) and try to support OPUS codec
> throughout our network.
> Therefore, I am trying actully to calculate or estimate the biggest
> possible size of the RTP OPUS Packet in case of WB or FB.
>
> Unfortunately, The "Frame Length Coding" paragraph of RFC 6716 (
> https://tools.ietf.org/html/rfc6716#section-3.2.1) is not clear enough
> for me to understand why "" The maximum representable length is
> 255*4+255=1275 bytes ""
>
> is the Frame length useful only to calculate the bitrate but not the
> packet size ?
> the OPUS coded data is compressed. Is it not possible because of this to
> estimate the packet size ?
>
> according to https://tools.ietf.org/html/rfc6716#section-2.1.4 (Frame
> Duration) :
>
> it (OPUS) can also combine multiple frames into packets of up to 120 ms.
> (for me this means 6 Frames. Each is 20 ms)
>
> 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.
>
> 9600 samples * 16 bit (bit-depth) = 153600 bit per a Frame => 19200 Byte
> per a Frame
> 19200 Byte per a Frame * 6 Frames in a Packet (longest Packet) = 115200
> Byte per a Packet.
>
> are the 15200 Bytes normally compressed ?
>
> once again, I am trying to find out how could the packet size of OPUS be
> calculated
>
> thanks in advance for your help
> Abdulaziz
> _______________________________________________
> 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/20191019/541965ec/attachment.html>