See Also

Ogg

Ogg is a patent Software patent

Software patents are patent [i]s on computer [i]-implemented invention [i]s. ... 

-free, fully open and standardised multimedia Multimedia

Multimedia is media [i] that uses multiple forms of information content [i] and information processing [i] ... 

 bitstream container format designed for efficient streaming and manipulation by the Xiph.Org Foundation Xiph.Org Foundation

The Xiph.Org Foundation is a non-profit organization [i] dedicated to producing public domain [i] multimedia [i] ... 

. The name "Ogg" refers to the file format which can be multiplexed with a number of separate independent open source codecs for audio Sound

Sound is a disturbance of mechanical energy [i] that propagates through matter [i] as a wave [i]. ... 

, video Video

Video is the technology of capturing, recording, processing, transmitting, and reconstructing moving pictures [i] ... 

 and text . Files ending in the .ogg extension may be of any Ogg media filetype, and because the format is free, Ogg's various codecs have been incorporated into a number of different free and commercial media players as well as portable media players from different manufacturers.

Discussions

  Discussion Features

   Ask a question about 'Ogg'

   Start a new discussion about 'Ogg'

   Answer questions about 'Ogg'

   'Ogg' discussion forum


Encyclopedia

Ogg is a patent Software patent

Software patents are patent [i]s on computer [i]-implemented invention [i]s. ... 

-free, fully open and standardised multimedia Multimedia

Multimedia is media [i] that uses multiple forms of information content [i] and information processing [i] ... 

 bitstream container format designed for efficient streaming and manipulation by the Xiph.Org Foundation Xiph.Org Foundation

The Xiph.Org Foundation is a non-profit organization [i] dedicated to producing public domain [i] multimedia [i] ... 

.

The name "Ogg" refers to the file format which can be multiplexed with a number of separate independent open source codecs for audio Sound

Sound is a disturbance of mechanical energy [i] that propagates through matter [i] as a wave [i]. ... 

, video Video

Video is the technology of capturing, recording, processing, transmitting, and reconstructing moving pictures [i]... 

 and text . Files ending in the .ogg extension may be of any Ogg media filetype, and because the format is free, Ogg's various codecs have been incorporated into a number of different free and commercial media players as well as portable media players from different manufacturers.

The term "ogg" is often used to refer to audio file format Ogg Vorbis Vorbis

Vorbis is an open source [i], lossy [i] audio codec [i] project headed by the Xiph.org Foundation [i] ... 

, that is, Vorbis-encoded audio in the Ogg container. Other prominent Xiph codecs that are often encapsulated in Ogg are the video codec Theora, and the human speech audio compression format, Speex.

The current version of Xiph's free reference implementation, released on November 27, 2005, is libogg 1.1.3. Another version, libogg2, is also available from Xiph's SVN repositories.

File format

The Ogg bitstream format, spearheaded by the Xiph.org Foundation Xiph.Org Foundation

The Xiph.Org Foundation is a non-profit organization [i] dedicated to producing public domain [i] multimedia [i] ... 

, has been created as the framework of a larger initiative aimed at developing a set of components for the coding and decoding of multimedia content which are both freely available and freely re-implementable in software.

The format consists of chunks of data each called an Ogg Page. Each page begins with the "OggS" string to identify the file as Ogg format.

A serial number and page number in the page header identifies each page as part of a series of pages making up a bitstream. Multiple bitstreams may be multiplexed Multiplexing

Multiplexing is a term used in electrical engineering [i] to refer to a process [i] where multiple source [i]... 

 in the file where pages from each bitstream are ordered by the seek time of the contained data. Bitstreams may also be appended to existing files, a process known as chaining, to cause the bitstreams to be decoded in sequence.

A BSD-licensed BSD licenses

BSD licenses represent a family of a permissive [i] free software license [i] ... 

 library, called libogg, is available to encode and decode data from Ogg streams. Independent Ogg implementations are used in several projects such as RealPlayer RealPlayer

RealPlayer is a media player [i], created by RealNetworks [i], that plays a number of multimedia formats ... 

 and a set of DirectShow DirectShow

DirectShow, codename Quartz, is a multimedia framework [i] and API [i] ... 

 filters.

Page structure

The following is the field layout of an Ogg page header:

0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1| Byte
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| capture_pattern: Magic number for page start "OggS" | 0-3
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| version | header_type | granule_position | 4-7
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | 8-11
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | bitstream_serial_number | 12-15
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | page_sequence_number | 16-19
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | CRC_checksum | 20-23
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |page_segments | segment_table | 24-27
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... | 28-
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

;Capture Pattern - 32 bits
The capture pattern or sync code is a magic number used to ensure synchronisation when parsing ogg files. Every page starts with the four byte sequence 'OggS'. This assists in resynchronising a parser in cases where data has been lost or is corrupted, and is a sanity check before commencing parsing the page structure.


;Version - 8 bits
This field indicates the version of the ogg bitstream format, to allow for future expansion. It is currently mandated to be 0.


;Header Type - 8 bits
This is an 8 bit field of flags, which indicates the type of page which follows. The rightmost or least significant bit is considered bit 0, with value 0x01, the next least significant digit is bit 1, with value 0x02. The third is bit 2, with value 0x04, and so on.
BitValueFlagPage type
00x01ContinuationThe first packet on this page is a continuation of the previous packet in the logical bitstream.
10x02BOSBeginning Of Stream. This page is the first page in the logical bitstream. The BOS flag must be set on the first page of every logical bitstream, and must not be set on any other page.
20x04EOSEnd Of Stream. This page is the last page in the logical bitstream. The EOS flag must be set on the final page of every logical bitstream, and must not be set on any other page.



;Granule Position - 64 bits
A granule position is the time marker in ogg files. It is an abstract value, whose meaning is determined by the codec. It may for example be a count of the number of samples, the number of frames or a more complex scheme.


;Bitstream Serial Number - 32 bits
This field is a serial number which identifies a page as belonging to a particular logical bitstream. Each logical bitstream in a file has a unique value, and this field allows implementations to deliver the pages to the appropriate decoder. In a typical vorbis+theora file, one stream will be the audio , and the other will be the video


;Page Sequence Number - 32 bits
This field is a monotonically increasing field for each logical bitstream. The first page is 0, the second 1, etc. This allows implementations to detect when data has been lost.


;Checksum - 32 bits
This field provides a checksum of the data in the entire page, performed with the checksum field set to 0. This allows verification that the data has not been corrupted since it was created. Pages which fail the checksum should be discarded.


;Page Segments - 8 bits
This field indicates the number of segments that exist in this page. It also indicates how many bytes are in the segment table which follows this field. There can be a maximum of 255 segments in any one page.


;Segment Table
The segment table is an 8 bit vector of values indicating the length of each segment within the page body. The number of segments is determined from the preceding Page Segments field. Each segment is between 0 and 255 bytes in length.


The segments provide a way to group segments into packets, which are meaningful units of data for the decoder. When the segments length is indicated to be 255, this indicates that the following segment is to be concatenated to this one and is part of the same packet. When the segments length is 0-254, this indicates that this segment is the final segment in this packet. Where a packets length is a multiple of 255, the final segment will be of length 0.

Where the final packet continues on the next page, the final segment value will be 255, and the continuation flag will be set on the following page to indicate that the start of the new page is a continuation of last page.

History

It is often erroneously assumed that the name Ogg comes from the character of Nanny Ogg in Terry Pratchett Terry Pratchett

Terence David John Pratchett OBE [i] is an English fantasy author [i], best ... 

's Discworld Discworld

Discworld is a series [i] of thirty-four fantasy novels, a number of short stories, and ... 

novels. Rather, it derives from ogging, jargon that arose in the computer game, Netrek Netrek

Netrek is a free to play open source software [i] cross platform [i] multiplayer [i] hybrid multi-di ... 

. Originally meaning a kamikaze attack and later, more generally, to do something forcefully possibly without consideration of the drain on future resources. At its inception, the Ogg project was thought to be somewhat ambitious given the power of the PC IBM PC compatible

IBM PC compatible is a class of computer [i]s which make up the vast majority of small computers on the ... 

 hardware of the time.

In May 2003, two Internet RFCs were published relating to the format. The Ogg bitstream was defined in RFC 3533 and its Internet content type  in RFC 3534 .

Although Ogg hasn't reached anywhere near the ubiquity of the MPEG standards , as of 2006 2006

2006 is a common year starting on Sunday [i] of the Gregorian calendar [i].
... 

, it is commonly used to encode free content  and has started to be supported by a significant minority of digital audio player Digital audio player

A digital audio player is a device that stores, organizes and plays digital music file [i] ... 

s. The more popular Ogg Vorbis codec has built-in support on many software players and extensions are available for nearly all the rest. Other codecs are less well supported although extensions are often available.

Ogg codecs

Ogg is only a container format. The actual music or video encoded by a codec will be stored inside an Ogg container. Ogg containers may contain multiple codecs, for example, an audio video file may contain data encoded by both an audio codec and a video codec.

Being a Container format, ogg can embed third-party codecs but usually Ogg is used with the following:

  • Audio codecs
    • lossy Lossy data compression

      A lossy data compression [i] method is one where compressing data and then decompressing it retrieves da ... 

      • Speex: handles voice data at low bitrates
      • Vorbis Vorbis

        Vorbis is an open source [i], lossy [i] audio codec [i] project headed by the Xiph.org Foundation [i] ... 

        : handles general audio data at mid- to high-level variable bitrates
    • lossless
      • FLAC FLAC

        FLAC, an acronym [i] for Free [i] Lossless [i] ... 

        : handles archival and high fidelity audio data


  • Text codec
    • Writ: a text codec designed to embed subtitles or captions


  • Video codecs
    • Theora: based upon On2's VP3, it is targeted at competing with MPEG-4 video , RealVideo, or Windows Media Video.
    • Tarkin: an experimental codec utilizing 3D wavelet transforms. It has been put on hold, with Theora becoming the main focus for video encoding.
    • Dirac: an experimental codec developed by the BBC as the basis of a new codec for the transmission of video over the Internet. The project aims to provide portable libraries, written in C, that implement the Dirac codec. It also allows to embed Dirac inside the Ogg container format.
    • OggUVS


  • Subtitle Subtitle

    A subtitle can refer to one of two things: an explanatory or alternate title of a book, play or film, in... 

     structures
    • Annodex Annodex

      Annodex is a digital media format developed by CSIRO [i] to provide annotation and indexing of continu ... 

      : An open source set of standards developed by CSIRO Commonwealth Scientific and Industrial Research Organisation

      The Commonwealth Scientific and Industrial Research Organisation is the national government body for sci... 

       to annotate and index networked media.

Ogg clients



Other patent-free standard formats

  • Matroska Matroska

    Matroska is a project to develop an open source [i] multimedia container format [i] similar to Apple's [i] ... 

  • NUT

Proprietary alternatives

Various components of the project are intended to stand as alternatives to proprietary codecs such as:

  • MP3 MP3

    MPEG-1 Audio Layer 3, more commonly referred to as MP3, is a popular digital audio [i] encoding an ... 

     and Advanced Audio Coding Advanced Audio Coding

    Advanced Audio Coding is a standardised, lossy [i] digital audio [i] compression [i] scheme. ... 

  • RealAudio and RealVideo
  • QuickTime QuickTime

    QuickTime is a multimedia framework [i] developed by Apple Computer [i], capable of handling various for ... 

     streaming format and its codecs
  • The RIFF format and its derivates such as WAV and AVI and their respective codecs
  • The Advanced Streaming Format with its Windows Media Audio and Windows Media Video codecs

External links

  • RFC 3533 - The Ogg Encapsulation Format Version 0
  • RFC 3534 - The application/ogg Media Type
  • from the Jargon File
  • - electronic music in Ogg Vorbis format
  • - Online radio stations in Ogg Vorbis format