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

Pro Max 4K OTT

Reading the granule position of an Ogg page with continued packets

An Ogg page and an Opus packet are different boundaries. A packet can continue across pages, and a page’s granule position refers to completed audio data under the Ogg Opus rules. Treating every page as one independently decodable packet can misplace samples or label a legitimate continuation as an incomplete audio frame.

Sound without the picture. Give the programme and player details without assuming a cause from the symptom alone. Pro Max 4K OTT, promax4k.tv.
Sound without the picture. Give the programme and player details without assuming a cause from the symptom alone. Pro Max 4K OTT, promax4k.tv.

An Ogg page and an Opus packet are different boundaries. A packet can continue across pages, and a page’s granule position refers to completed audio data under the Ogg Opus rules. Treating every page as one independently decodable packet can misplace samples or label a legitimate continuation as an incomplete audio frame.

Follow a continued packet

Imagine packet A beginning on page one and finishing on page two. The first page contains no completed packet from which to assign a normal audio granule position. RFC 7845 uses the special all-ones value, interpreted as minus one, when a page is entirely spanned by a packet that completes later. That marker does not mean playback should seek to negative one second.

Associate time with completed output

An audio page’s granule identifies the accumulated samples up through the last fully decodable sample from the last packet completed there. A demuxer can work from known granules and packet durations to assign timing to the intervening packets. The final page has special trimming behavior. A single generic page-number-times-duration formula cannot represent all of these cases correctly.

Separate page transport from codec input

A reader must reassemble complete packet data according to the container before supplying the codec input it expects. A network read can divide bytes at still different boundaries. Neither an HTTP chunk nor an arbitrary file-read buffer necessarily coincides with a complete Ogg page or codec packet. Preserve the layer names when investigating a custom extraction or streaming implementation.

Build a small structural report

A maintainer can retain the page sequence, continuation information, packet-completion points and relevant granules around the failure. A viewer can report the repeated content position without interpreting binary headers. This distinguishes an expected packet spanning pages from a genuinely missing continuation. The useful outcome is correct reassembly and timing at the container boundary, leaving audio decoding and output rendering to their own checks rather than assuming a sparse page or special granule value proves programme loss.

Sources & further reading

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↑