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

Pro Max 4K OTT

Calculating FLAC duration from interchannel sample count

FLAC’s total-sample field counts interchannel samples: the count applies to every channel at once.

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.

FLAC’s total-sample field counts interchannel samples: the count applies to every channel at once. Duration is that count divided by sample rate, not multiplied by the number of channels. A stereo file and a six-channel file can have the same sample count and duration while storing different numbers of individual sample values.

Work through a duration

Imagine STREAMINFO declares 96,000 total interchannel samples at 48,000 Hz. The duration is two seconds. For stereo, there are two channels with 96,000 values each; for six channels, there are six such sets. Channel count changes the collection of sample values, rather than making the presentation last four or twelve seconds.

Handle an unknown count deliberately

RFC 9639 gives zero a special meaning in the total-sample field: the total is unknown. A duration display should not automatically interpret that as a demonstrated empty audio track. The decoder can still need to inspect the stream under the format rules. A metadata summary and the actual presence of audio frames are separate observations to preserve in a support report.

Keep byte calculations separate

Decoded PCM byte size additionally needs channel count and the sample storage representation. Encoded FLAC file size also depends on compression and metadata. Dividing the complete file bytes by an assumed constant PCM rate does not accurately recover the declared media duration. Retain the exact field used by the calculation so a reviewer can distinguish sample arithmetic from a rough byte-size estimate.

Check the practical discrepancy

If a tool reports twice the expected length for a stereo stream, a maintainer can inspect whether it multiplied the interchannel count again. If the declared total disagrees with decoded frame coverage, investigate that discrepancy separately rather than overwrite the count without verification. Viewers can report the displayed timer and audible ending. The useful outcome is a correctly defined duration calculation, with unknown metadata, inconsistent declarations and actual missing audio kept as different cases requiring their own evidence.

Sources & further reading

From the ProMax collection

Different places. Shared screen time.

From Indian cinema to South African sporting interests. Make a regional shortlist that reflects your household.

India and South Africa flags against a world-map background in a Pro Max regional television card.
From Indian cinema to South African sporting interests. Make a regional shortlist that reflects your household.

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↑