Nepedia
Back to Discover
Advanced Reader
💻

Ogg

technology Maturity 11-13 Next article →

Ogg is a digital multimedia container format. It is designed for the efficient streaming and manipulation of digital media. Unlike a single audio file, a container acts as a framework. It can hold many different types of independent data streams at once. These streams can include audio, video, text like subtitles, and metadata.

Play ogg
Play ogg

The format is maintained by the Xiph.Org Foundation. It is free and open to everyone. This means it is not restricted by software patents. Because it is open, many different types of software can use it.

The Ogg format works by organizing data into small units called Ogg pages. Each page is a discrete chunk of information. Every page must begin with a specific capture pattern. This pattern is the four-character sequence "OggS". This sequence acts as a sync code. It helps a computer parser resynchronize if data becomes lost or corrupted.

Ogg page header structure (en)
Ogg page header structure (en)

Each page header also contains a version field. Currently, this version is mandated to be 0. This field allows for future expansions of the bitstream format.

Inside the page header, several fields manage the flow of data. A header type field uses flags to indicate the page's role. For example, a Beginning of Stream (BOS) flag marks the first page. An End of Stream (EOS) flag marks the final page. A continuation flag identifies a page that carries the rest of a previous packet. To keep data in order, each page has a serial number and a page sequence number. The serial number identifies which logical bitstream the page belongs to. This is vital when a file contains both audio and video. The sequence number helps the computer detect if any pages are missing.

Data integrity is maintained through a mathematical tool called a checksum. The Ogg page header includes a 32-bit CRC-32 checksum. This checksum covers the entire page, including the header itself. The computer uses this to verify that the data has not been corrupted. If a page fails this check, the system should discard it. To group data into meaningful units, Ogg uses a segment table. This table contains an array of 8-bit values. Each value indicates the length of a data segment. These segments are then combined into packets for the decoder to read.

The history of Ogg began in 1993. It started as a simple audio compression package. The project was originally named "Squish." However, the name was already trademarked by someone else. The team then used the name "OggSquish." In 2001, the project was renamed simply to "Ogg." This name is derived from "ogging," which was jargon from the computer game Netrek. In that game, the term referred to doing something forcefully. The Ogg project is part of the larger Xiph.org multimedia project. On September 2, 2000, the Ogg reference implementation was separated from Vorbis.

File extensions have changed over time to be more specific. Until 2007, the .ogg extension was used for all Ogg files. Now, the Xiph.Org Foundation recommends specific names for different content. The .oga extension is used for audio-only files. The .ogv extension is used for video files, which may include Theora video. The .ogx extension is used for multiplexed files containing multiple media types. These distinctions help software identify the content immediately. As of November 7, 2017, the reference implementation was version libogg 1.3.3. This software is released under the New BSD License.

Ogg is used in many famous digital systems. Many popular video game engines incorporate Ogg codecs. These include engines for games like Halo: Combat Evolved and Grand Theft Auto. The game Minecraft also uses Ogg for its audio. Beyond games, Ogg is found in portable media players and even GPS receivers. It is also used to encode free content on Wikimedia Foundation projects. This wide use shows how important open formats are for sharing digital media across different devices and platforms.

651 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (2)
File:Ogg page header structure (en).svg
Ogg page header structure (en).svg
File:Play ogg.png
Play ogg.png
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.