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

Pro Max 4K OTT

Reading FLAC frame numbers under fixed and variable blocking

A FLAC frame header’s coded number means different things under fixed and variable blocking.

A useful support message. Say what happened, when it happened and which device/player you use. Pro Max 4K OTT, promax4k.tv.
A useful support message. Say what happened, when it happened and which device/player you use. Pro Max 4K OTT, promax4k.tv.

A FLAC frame header’s coded number means different things under fixed and variable blocking. With fixed block size it is a frame number; with variable block size it is the first sample number. The blocking-strategy bit defines which interpretation applies. Reading every coded number as elapsed samples can produce an incorrect media position.

Compare two valid interpretations

Imagine a fixed-block stream using blocks of 4096 samples. Frame number four, counting from zero, follows four ordinary blocks and begins at sample position 16,384. A variable-block header carrying the number four instead identifies its starting sample count directly. Those values can have the same numeric spelling while expressing different positions under their respective strategies.

Read the actual strategy bit

RFC 9639 requires the blocking-strategy bit to remain consistent during the audio stream. In a variable-block stream, STREAMINFO sizes can describe bounds rather than exact observed extrema. Several locally equal-sized blocks therefore do not establish fixed blocking. Conversely, equal STREAMINFO minimum and maximum block sizes identify a fixed-block stream under the RFC. Check that the declarations agree instead of deciding from the first two observed frame lengths alone.

Account for the real sample sequence

A duration or seek calculation needs frame block sizes as well as the numbering interpretation. The final block can be shorter than a regular fixed block, and a variable sequence needs its actual sample counts. A maintainer should expand a short run of frames with their header values and sample extents, rather than convert a filename number or byte offset into a sample position by guesswork.

Locate a parser discrepancy

If a timeline jumps by an implausible amount after a header is read, preserve the strategy bit, coded number, block size and sample rate. A viewer can report the repeated content time without editing binary data. A structural check can then distinguish the wrong numbering interpretation from a genuinely inconsistent frame sequence. The useful outcome is an accurately indexed sample range under the declared blocking strategy, leaving output synchronization and actual decoder compatibility to separate observation.

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↑