Summary

  • RFC 3533 gave every Ogg page a capture pattern, stream tag, sequence number, segment table and CRC — enough for a decoder to find a page and check it, and deliberately not enough to claim the page held a whole codec packet.
  • The format pushed identity, time, authenticity, decoding and the rendered result onto other layers, so a perfectly valid page can open with the middle of a packet whose beginning vanished one page earlier.

A frame can be flawless and the film can still be lost. The perforations line up, the dyes are intact, the inspection stamp is genuine — for that frame. None of it tells you whether the previous frame is gone, whether this image belongs to the same scene, or whether the projector will turn the surviving strip into anything a paying audience would call a movie.

In May 2003, Silvia Pfeiffer sat down to write that same discipline into a digital container. The result was RFC 3533, an Informational document from the Independent stream, specifying the Ogg encapsulation format version 0. Encoders carved media into logical bitstreams and chopped those into packets; Ogg treated the packets as ordered sequences of bits, sliced them into segments, bundled segments into pages, and interleaved pages from one or more logical streams into a single physical bitstream.

The container did not become the codec just because it carried the codec's output — a distinction that sounds pedantic until an archive depends on it twenty years later.

The capture pattern finds a page. It does not vouch for the packet.

Everything starts with four bytes: OggS. That capture pattern marks a possible page boundary, and finding it is the easy part. A decoder must then parse the header, work out the segment table and page length, and run the page CRC — a 32-bit checksum over polynomial 0x04c11db7. Verified erratum 8825 settles an ambiguity in the original wording: the calculation covers the header with the CRC field zeroed and the page content. The receipt is therefore stronger than a header-only glance, and still exactly what it is — a page-local corruption check, not a signature, not a seal, not a promise.

The lacing table confesses everything

The honesty shows up in the lacing values. Each single byte describes a segment: 255 means the packet continues into the next segment, anything below 255 ends it, and a zero can mean an empty packet or close one whose length is an exact multiple of 255. A header flag records whether the page opens with a packet continued from the page before. One codec packet may therefore sprawl across several pages.

Which produces the format's signature paradox. Page B can pass its own CRC with flying colours while the opening bytes of its first packet disappeared along with page A. The page is valid. The packet is not whole. Both statements are true, and only one of them is written on the receipt.

Sequence numbers prove continuity, not custody

The page sequence number exposes a different kind of evidence. It climbs separately inside each logical stream, so a decoder can spot a missing page. Spotting is not restoring: a gap establishes that custody broke without revealing the lost bytes, the affected codec frames, or the audible damage. And a perfectly continuous sequence proves only that the page numbers ran in order — not that an application kept every page, reassembled every packet, accepted every codec header, decoded every frame, or delivered a single sample to a listener.

The logical-bitstream serial number is just as useful and just as modest. Ogg generates it at random so interleaved pages can be routed back to the right decoder, and RFC 3533 says outright that the number has no connection to the content or the encoder. It is not a work identifier, an author identifier, a device identity, an account, a rights statement or a provenance seal. Treating it as any of those is a policy invention bolted onto a local demultiplexing tag.

BOS and EOS flags mark where a logical stream begins and ends. A BOS page carries codec-identifying material defined by that codec's media mapping, with further headers possibly trailing behind before any data. An EOS page can be a nil page — position information and a flag, no media payload at all. Grouped streams start together with interleaved pages; chained streams follow one another without overlap. The flags make structure legible. They do not prove that every intended media unit sits between the boundaries, that audio and video stayed in step, or that anything was ever rendered.

Time lives somewhere else

RFC 3533 states this point with a bluntness rare in standards prose: Ogg has no concept of time. Its granule position is an increasing, unitless marker whose meaning is supplied by the codec and its media mapping. An audio mapping might count samples; a video mapping might count frames; a page on which no packet finishes can carry the special value minus one. Turning that field into temporal information requires codec knowledge the container never had.

The Opus mappings make the architectural boundary concrete. RFC 7845 and its successor RFC 9639 define a 48 kHz granule clock, pre-skip, end trimming and seeking behaviour for Opus in Ogg. None of those rules are latent inside the eight bytes of the base header. They arrive from the mapping. Read a raw granule position as universal seconds and you have confused a container landmark with a codec-specific presentation decision.

The MIME trail: a bounded symbol, well used

RFC 3534 first registered application/ogg; RFC 5334 later obsoleted it, refined the usage and registered audio/ogg and video/ogg, with IANA's registry coordinating the names today. A correct media type helps a system pick a handler and describe broad content. It cannot attest that an individual object has intact packet history, a supported codec, safe content, synchronised tracks or a successful playback.

Security follows the same pattern. RFC 3533 supplies no generic encryption or signing for the container or its contents. A codec bitstream may itself be encrypted or signed, but the page CRC does not inherit authenticity from that possibility. The document also warns implementers to handle manipulated bitstreams, buffer overflows and related hazards properly. Parsing a page cleanly is not a safety verdict about what later code will do with its lengths, its packets or its codec state.

What the errata still argue about

The errata record is a lesson in labelling evidence by status. Erratum 8825's coverage clarification is Verified. Erratum 6796, which corrects "pages" to "segments" in an example, is also Verified. Erratum 8824 argues that the precise CRC32 parameterisation remains under-specified — and it is only Reported. A serious account says so out loud rather than quietly rewriting the RFC as though review had already ruled.

The chain is longer than a green light

Count the links: receive bytes; find a capture pattern; establish a page boundary; parse the lacing table; verify the CRC; check sequence continuity per logical stream; reconstruct complete packets; identify the media mapping; accept codec headers; interpret granule positions; synchronise multiplexed streams; decode frames; render output; and observe what a listener or viewer actually got.

RFC 3533 made the early links inspectable and then did something rarer than inventing a checksum. It declined to call those links the whole chain. Two decades on, that restraint is still the format's most valuable inheritance — because the systems that forget it are the ones that end up with a green badge, a missing frame, and nobody left who can explain the difference.

Sources