Your screen. Your subscription. Your ProMax. Start with a one-day trial ↗

Pro Max 4K OTT

Calculating Opus packet duration from its frame structure

An Opus packet can contain several audio frames. Its table-of-contents information and framing determine their durations and count; packet byte size alone does not. A packet-rate display therefore needs the packet structure before converting its count into milliseconds of audio or comparing it with a decoder’s pending-work counter.

An app licence or a service account. Keep player purchase details separate from the service activation record. Pro Max 4K OTT, promax4k.tv.
An app licence or a service account. Keep player purchase details separate from the service activation record. Pro Max 4K OTT, promax4k.tv.

An Opus packet can contain several audio frames. Its table-of-contents information and framing determine their durations and count; packet byte size alone does not. A packet-rate display therefore needs the packet structure before converting its count into milliseconds of audio or comparing it with a decoder’s pending-work counter.

Multiply frame duration and count

Imagine a packet combining two twenty-millisecond frames. It contains forty milliseconds of media, equivalent to 1920 samples per channel at a 48 kHz decoding rate. A different packet can contain one twenty-millisecond frame. Counting each as one packet does not make their durations equal, and stereo does not double the elapsed presentation time.

Read the format’s constraints

RFC 6716 describes frame durations of 2.5, 5, 10, 20, 40 or 60 milliseconds and packet combinations up to 120 milliseconds. The packet’s table-of-contents byte, framing and configuration determine which combination applies to that packet. A valid frame count is constrained by the total duration, so forty-eight sixty-millisecond frames would not become valid merely because a count field has enough bits to hold forty-eight.

Keep compressed bytes separate

Variable-rate encoding can represent the same media duration with different byte lengths. Padding and framing add further structure. A maintainer should retain duration, frame count and encoded byte count as separate observations. The highest transfer burst in a network panel does not directly reveal the codec’s frame interval or the amount of playable audio already available.

Use the calculation for one pipeline stage

For a queue or timestamp investigation, expand a short sequence into its actual packet durations and compare the resulting timeline. A viewer can report whether the symptom is a fixed delay, growing delay or a brief interruption. Do not infer that a codec setting is wrong just because two applications send different numbers of packets. The useful result is an accurately counted media interval, with transport overhead, buffering policy and actual device performance kept outside the claim until independently observed.

Sources & further reading

From the ProMax collection

The purple screen you know.

The original Pro Max identity, from welcome to home. Get familiar with the player before you begin.

Purple Pro Max welcome artwork and the original white PRO MAX logo.
The original Pro Max identity, from welcome to home. Get familiar with the player before you begin.

An evening worth making time for

Get the player ready.
We’ll help with the rest.

Install the player for your screen, then WhatsApp the ProMax team for a one-day free trial. Already watching? Open the help desk for your next step.

Ask ProMax↑