Ogg
Filename extension |
.ogg,.ogv,.oga,.ogx,.ogm,.spx,.opus |
---|---|
Internet media type |
video/ogg, audio/ogg, application/ogg |
Magic number | OggS |
Developed by | Xiph.Org Foundation |
Initial release | May 2003 |
Type of format | Container format |
Container for | Vorbis,Theora,Speex,Opus,FLAC,Dirac,and others. |
Open format? | Yes |
Free format? | Yes[1] |
Developer(s) | Xiph.Org Foundation |
---|---|
Initial release | 22 September 2004 |
Stable release | 1.3.5
/ 4 June 2021 |
Type | Reference implementation(multiplexer/demultiplexer) |
License | BSD-style license[2] |
Website | downloads |
Oggis afree,opencontainer formatmaintained by theXiph.Org Foundation.The authors of the Ogg format state that it is unrestricted bysoftware patents[3]and is designed to provide for efficientstreamingand manipulation of high-qualitydigital multimedia.Its name is derived from "ogging",jargonfrom the computer gameNetrek.[4]
The Ogg container format canmultiplexa number of independentstreamsforaudio,video,text (such assubtitles), andmetadata.
In the Ogg multimedia framework,Theoraprovides alossyvideo layer. Theaudio layeris most commonly provided by the music-orientedVorbisformator its successorOpus.Losslessaudio compression formats includeFLAC,andOggPCM.
Before 2007, the.oggfilename extensionwas used for all files whose content used the Ogg container format. Since 2007, the Xiph.Org Foundation recommends that.ogg only be used for Ogg Vorbis audio files. The Xiph.Org Foundation decided to create a new set of file extensions and media types to describe different types of content such as.oga for audio only files,.ogv for video with or without sound (including Theora), and.ogx for multiplexed Ogg.[5]
As of November 7, 2017, the current version of the Xiph.Org Foundation's reference implementation is libogg 1.3.3.[6]Another version, libogg2, has been in development, but is awaiting a rewrite as of 2018.[7]Bothsoftware librariesarefree software,released under theNew BSD License.Ogg reference implementation was separated from Vorbis on September 2, 2000.[8]
Ogg's variouscodecshave been incorporated into a number of different free andproprietarymedia players,both commercial and non-commercial, as well asportable media playersandGPSreceivers from different manufacturers.
Naming
[edit]TheOgg Vorbisproject started in 1993. It was originally named "Squish" but that name was already trademarked, so the project underwent a name change. The new name, "OggSquish", was used until 2001 when it was changed again to "Ogg". Ogg has since come to refer to thecontainer format,which is now part of the larger Xiph.org multimedia project. Today, "Squish" (now known as "Vorbis" ) refers to a particularaudio coding formattypically used with the Ogg container format.
Ogg is derived from "ogging",jargonfrom the computer gameNetrek,which came to mean doing something forcefully, possibly without consideration of the drain on future resources.[4][failed verification]At its inception, the Ogg project was thought by the authors to be somewhat ambitious given the limited power of thePChardware of the time. Although the name "Ogg" is unrelated to the character "Nanny Ogg"inTerry Pratchett'sDiscworldnovels, "Vorbis" is named after another Terry Pratchett character from the bookSmall Gods.[9]
File format
[edit]The "Ogg"bitstream format,designed principally by the Xiph.Org Foundation, has been developed as the framework of a larger initiative aimed at producing a set of components for the coding and decoding of multimedia files, which are available free of charge and freely re-implementable in software and hardware.
The format consists of chunks of data each called an "Ogg page".Each page begins with the characters" OggS "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 abitstream.Multiple bitstreams may bemultiplexedin 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.
ABSD-licensedlibrary, called "libvorbis", is available to encode and decode data from "Vorbis" streams. Independent Ogg implementations are used in several projects such asRealPlayerand a set ofDirectShowfilters.[10]
Mogg, the "Multi-Track-Single-Logical-Stream Ogg-Vorbis", is the multi-channel or multi-track Ogg file format.
Page structure
[edit]The following is the field layout of an Ogg page header:
- Capture pattern – 32 bits
- The capture pattern or sync code is amagic numberused to ensure synchronization when parsing Ogg files. Every page starts with the four ASCII character sequence, "OggS". This assists in resynchronizing a parser in cases where data has been lost or is corrupted, and is a sanity check before commencing parsing of 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 that follows.
Bit Value Flag Page type 0 0x01 Continuation The first packet on this page is a continuation of the previous packet in the logical bitstream. 1 0x02 BOS Beginning 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. 2 0x04 EOS End 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 that 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 and Theora file, one stream is the audio (Vorbis), and the other is the video (Theora)
- 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 aCRC32checksum of the data in the entire page (including the page header, calculated with the checksum field set to 0). This allows verification that the data has not been corrupted since it was authored. Pages that fail the checksum should be discarded. The checksum is generated using a polynomial value of 0x04C11DB7.
- 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 that follows this field. There can be a maximum of 255 segments in any one page.
- Segment table
- The segment table is an array of 8-bit values, each indicating the length of the corresponding 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 segment's 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 segment's length is 0–254, this indicates that this segment is the final segment in this packet. Where a packet's length is a multiple of 255, the final segment is length 0.
Where the final packet continues on the next page, the final segment value is 255, and the continuation flag is set on the following page to indicate that the start of the new page is a continuation of last page.
Metadata
[edit]VorbisCommentis a base-level Metadata format initially authored for use with Ogg Vorbis. It has since been adopted in the specifications of Ogg encapsulations for other Xiph.Org codecs includingTheora,Speex,FLACandOpus.VorbisCommentis the simplest and most widely supported mechanism for storing metadata with Xiph.Org codecs.[11]
Notably,[attribution needed]one or moreMETADATA_BLOCK_PICTURE=... in aVorbisCommentfor thumbnails and cover art haveBase64-encoded values of the correspondingFLACMETADATA_BLOCK_PICTURE.In other words, FLAC stores thumbnails and cover art in binary blocks—outside of the FLAC tags in alittle-endianMETADATA_BLOCK_VORBIS_COMMENT.[12][13]
Other existing and proposed mechanisms are:[14]
- FLACmetadata blocks
- Ogg Skeleton[15]
- Continuous Media Markup Language(deprecated)
History
[edit]The Ogg project began with a simple audio compression package as part of a larger project in 1993.[9]The software was originally namedSquishbut due to an existing trade mark it was renamed toOggSquish.This name was later used for the whole Ogg project. In 1997, the Xiphophorus OggSquish was described as "an attempt both to create a flexible compressed audio format for modern audio applications as well as to provide the first audio format that is common on any and every modern computer platform".[16]The OggSquish was in 2000 referred to as "a group of several related multimedia and signal processing projects". In 2000, two projects were in active development for planned release: Ogg Vorbis format and libvorbis—the reference implementation of Vorbis. Research also included work on future video and lossless audio coding.[9][17][18][19][20]In 2001, OggSquish was renamed toOggand it was described as "the umbrella for a group of several related multimedia and signal processing projects".[21]Ogg has come to stand for thefile format,as part of the larger Xiph.org multimedia project. Squish became just the name of one of the Ogg codecs.[9]In 2009, Ogg is described as "a multimedia container format, and the native file and stream format for the Xiph.org multimedia codecs".[22]
The Ogg reference implementation was separated from Vorbis on September 2, 2000.[8]
In May 2003, two InternetRFCswere published relating to the format. The Ogg bitstream was defined inRFC3533(which is classified as 'informative') and itsInternet content type(application/ogg
) inRFC3534(which is, as of 2006[update],a proposed standard protocol). In September 2008, RFC 3534 was obsoleted byRFC5334,which added content typesvideo/ogg
,audio/ogg
and filename extensions.ogx,.ogv,.oga,.spx.
OGM
[edit]In 2002, the lack of formal video support in Ogg resulted in the development of theOGMfile format, a hack on Ogg that allowed embedding of video from the MicrosoftDirectShowframework into an Ogg-based wrapper. OGM was initially supported only by closed source Windows-only tools, but the codebase was subsequently opened. Later, video (and subtitle) support were formally specified for Ogg but in a manner incompatible with OGM. Independently, theMatroskacontainer format reached maturity and provided an alternative for people interested in combining Vorbis audio and arbitrary video codecs. As a result, OGM is no longer supported or developed and is formally discouraged by Xiph.org.[23]Today, video in Ogg is found with the.ogv file extension, which is formally specified and officially supported. Software and codecs that support.ogm files are available without charge.[24]
2006
[edit]Although Ogg had not reached anywhere near the ubiquity of theMPEGstandards[25](e.g.,MP3/MP4), as of 2006[update],it was commonly used to encodefree content(such as free music, multimedia onWikimedia Foundationprojects andCreative Commonsfiles) and had started to be supported by a significant minority ofdigital audio players.Also supporting the Ogg format were many popular video game engines, includingDoom 3,Unreal Tournament 2004,Halo: Combat Evolved,Jets'n'Guns,Mafia: The City of Lost Heaven,Myst IV: Revelation,StepMania,Serious Sam: The Second Encounter,Lineage 2,Vendetta Online,Battlefield 2,and theGrand Theft Autoengines, as well as the audio files of theJava-based game,Minecraft.The more popular Vorbis codec had built-in support on many software players, and extensions were available for nearly all the rest.
2007
[edit]On May 16, 2007, theFree Software Foundationstarted a campaign to increase the use of Vorbis "as an ethically, legally and technically superior audio alternative to the proprietary MP3 format".[26]People were also encouraged to support the campaign by adding a web button to theirwebsiteorblog.For those who did not want to download and use the FSF's suggested Ogg player (VLC), theXiph.Org Foundationhad an official codec[27]forQuickTime-based applications inWindowsandMac OS X,such asiTunesplayers andiMovieapplications; and Windows users could install aWindows Media PlayerOgg codec.[28]
2009
[edit]By June 30, 2009, the Ogg container, through the use of the Theora and Vorbis, was the only container format included inFirefox 3.5web browser's implementation of theHTML5<video>
and<audio>
elements.[29][30]This was in accordance with the original recommendation outlined in, but later removed from, the HTML5 draft specification (seeOgg controversy).
2010
[edit]On March 3, 2010, a technical analysis by anFFmpegdeveloper was critical about the general purpose abilities of Ogg as a multimedia container format.[31]The author of Ogg later responded to these claims in an article of his own.[32]
Ogg codecs
[edit]Ogg is only a container format. The actual audio or video encoded by a codec is stored inside an Ogg container. Ogg containers may contain streams encoded with multiple codecs; for example, a video file with sound contains data encoded by both an audio codec and a video codec.
Being a container format, Ogg can embed audio and video in various formats[33][34](such asDirac,MNG,CELT,MPEG-4,MP3and others) but Ogg was intended to be, and usually is, used with the followingXiph.orgfree codecs:
- Audio
- Video
- Lossy
- Theora:based uponOn2'sVP3,it is targeted at competing withMPEG-4video (for example, encoded withDivXorXvid),RealVideo,orWindows Media Video.
- Daala:a video coding format under development.
- Tarkin: an experimental and now obsolete video codec developed in 2000, 2001 and 2002 utilizingdiscrete wavelet transformsin the threedimensionsof width, height, and time.[19][36][37][38]It has been put on hold after Theora became the main focus for video encoding (in August 2002).[39]
- Dirac:a free and open video format developed by theBBC.Uses wavelet encoding.[40]
- Lossless
- Lossy
- Text
- Continuous Media Markup Language:a text/application codec for timed metadata, captioning, and formatting.
- Annodex:A free and open source set of standards developed byCSIROto annotate and index networked media.
- OggKate: An overlay codec, originally designed for karaoke and text, that can be multiplexed in Ogg.[41]
Media types
[edit]Ogg audio media is registered asIANAmedia typeaudio/oggwith file extensions.oga,.ogg,and.spx.It is a proper subset of the Ogg video media typevideo/oggwith file extension.ogv.Other Ogg applications use media typeapplication/oggwith file extension.ogx;this is a superset ofvideo/ogg.[34]TheOpusmedia typeaudio/opuswith file extension.opuswas registered later inRFC7587and7845.
See also
[edit]References
[edit]- ^Ogg File Format(Full draft). Sustainability of Digital Formats. Washington, D.C.: Library of Congress. 19 February 2008.Archivedfrom the original on 8 October 2021.Retrieved1 December2021.
- ^"Sample Xiph.Org Variant of the BSD License".Xiph.Org Foundation.Archivedfrom the original on 2020-04-11.Retrieved2009-08-29.
- ^"Vorbis.com: FAQ".Archived fromthe originalon 2005-10-01.Retrieved2010-05-28.
- ^ab"Ogging 101".Archivedfrom the original on 2017-12-25.Retrieved2016-11-06.
3.3 Ogging: This is the art of killing a carrier, or potential carrier, by a suicide run.
- ^"MIME Types and File Extensions".XiphWiki.2007-09-07.Archivedfrom the original on 2018-11-17.Retrieved2007-09-10.
- ^Giles, Ralph (2017-11-07)."libogg 1.3.3 release".ogg-dev(Mailing list).Archivedfrom the original on 2018-04-04.Retrieved2019-01-14.
- ^Giles, Ralph (2008-01-05)."r14372 - in trunk/theora:. lib/dec lib/enc".xiph-commits(Mailing list).Archivedfrom the original on 2020-10-03.Retrieved2019-01-14.
This library was never released and now looks like it needs to be redesigned.
- ^abXiph.Org (2002-07-19)Ogg releases - libogg-1.0.tar.gz - CHANGESArchived2017-06-14 at theWayback Machine.Retrieved 2009-09-01.
- ^abcd"Xiph.org: naming".Xiph.org Foundation. 2006-01-07. Archived fromthe originalon 2012-02-27.Retrieved2009-09-02.
- ^"Directshow Filters for Ogg Vorbis".Archivedfrom the original on 2015-02-08.Retrieved2015-02-14.
- ^"VorbisComment".26 April 2016.Archivedfrom the original on 23 October 2018.Retrieved23 October2018.
- ^"METADATA_BLOCK_PICTURE".flac free lossless audio codec.Xiph.Org.2014.Archivedfrom the original on 2017-03-27.Retrieved2019-12-03.
- ^"Ogg Vorbis I format specification: comment field and header specification".Xiph.Org.2005.Archivedfrom the original on 2019-12-03.Retrieved2019-12-03.
- ^"Metadata".xiph.org Foundation.24 July 2013.Archivedfrom the original on 23 October 2018.Retrieved23 October2018.
- ^"Ogg Skeleton 4".Xiph.Org.2012.Archivedfrom the original on 2019-08-13.Retrieved2019-12-03.
- ^Montgomery, Christopher(1997)."Ogg 98.9".Xiphophorus company.Archivedfrom the original on 2016-04-24.Retrieved2009-09-02.
- ^ Xiph.org (2000-01-18)."OggSquish Vorbis encoding format documentation".Archived fromthe originalon January 18, 2000.Retrieved2008-09-02.
- ^ Xiph.org (2000-01-18)."OggSquish logical and physical bitstream overview".Archived fromthe originalon January 18, 2000.Retrieved2008-09-02.
- ^ab Xiphophorus company (2001-04-05)."The Ogg project homepage".Archived fromthe originalon April 5, 2001.Retrieved2009-09-02.
- ^ Xiph.org (2001-12-04)."The Ogg project homepage".Archived fromthe originalon December 4, 2001.Retrieved2008-09-02.
- ^Xiphophorus company (2001-12-04)."The Ogg project homepage".Archived fromthe originalon December 4, 2001.Retrieved2009-09-02.
- ^"The Ogg container format".Xiph.Org Foundation. 2006-01-07.Archivedfrom the original on 2000-05-20.Retrieved2009-09-02.
- ^"OGM is not Ogg. Xiph.org does not support OGM".Backup at WayBack Machine. 2004-07-07. Archived from the original on March 17, 2012.
{{cite web}}
:CS1 maint: unfit URL (link) - ^"K-Lite Codec Pack: Comparison of abilities and supported file formats".Codec Guide.Archivedfrom the original on 16 March 2018.Retrieved16 March2018.
- ^Hansen, Evan (2007-02-23)."MP3's Loss, Open Source's Gain".Wired.Archivedfrom the original on 2010-06-05.Retrieved2010-03-04.
- ^Lee, Matt (May 16, 2007)."'Play Ogg': FSF launches free audio format campaign ".Free Software Foundation.Archivedfrom the original on 2011-06-08.Retrieved2010-03-04.
- ^"Foundation: Ogg QuickTime Components for iTunes and iMovie (Windows and Mac OS X)".Xiph.org.Archivedfrom the original on 2008-10-26.Retrieved2010-03-04.
- ^"Directshow Filters for Ogg Vorbis, Speex, Theora and FLAC".Xiph.org. 2010-02-22.Archivedfrom the original on 2013-01-24.Retrieved2010-03-04.
- ^"Mozilla Developer Center - HTML - Element - Video".September 2009.Archivedfrom the original on 2010-06-27.Retrieved2009-12-28.
- ^"Mozilla Developer Center - HTML - Element - Audio".September 2009.Archivedfrom the original on 2010-06-27.Retrieved2009-12-28.
- ^Rullgard, Mans (2010-03-03)."Ogg objections".hardwarebug.org.Archivedfrom the original on 2010-05-09.Retrieved2010-05-02.
- ^Montgomery, Christopher (2010-04-27)."Monty - In Defense of Ogg's Good Name".people.xiph.org/~xiphmont. Archived fromthe originalon 2010-04-29.Retrieved2010-05-02.
- ^"MIME Types and File Extensions".XiphWiki. 2009-10-04.Archivedfrom the original on 2018-11-17.Retrieved2009-10-24.
- ^abI. Goncalves; S. Pfeiffer;C. Montgomery(2008).Ogg Media Types.sec. 10.doi:10.17487/RFC5334.RFC5334.
- ^"OggPCM".XiphWiki. 2020-05-25.Archivedfrom the original on 2020-10-03.Retrieved2020-05-25.
- ^Ralph Giles (2000-12-19)vorbis-dev - Tarkin video codec?Archived2018-01-24 at theWayback Machine,Xiph.org vorbis-dev mailinglist. Retrieved 2009-09-06.
- ^Jack Moffitt (2001-01-03)vorbis-dev - Tarkin at lastArchived2014-09-30 at theWayback Machine,Xiph.org vorbis-dev mailinglist. Retrieved 2009-09-06.
- ^Chris Montgomery(2001-02-11)Tarkin developer mailing listArchived2014-09-30 at theWayback Machine,Retrieved on 2009-09-06
- ^Michael Smith (2005-08-29)TarkinArchived2016-03-03 at theWayback Machine.Retrieved 2009-09-06.
- ^Dirac specification - integration of Dirac encoded video into commonly used container formatsArchived2010-06-14 at theWayback MachineRetrieved on 2009-07-05
- ^"OggKate".wiki.xiph.org.2017.Archivedfrom the original on 2011-07-18.Retrieved2019-12-03.
External links
[edit]- The Xiph.Org Foundation official webpage — Ogg
- Pfeiffer, Silva (May 2003).The Ogg Encapsulation Format Version 0.Internet Engineering Task Force.doi:10.17487/RFC3533.RFC3533.
- Using Creative Commons Metadata in Ogg containers
- Ogg etymologyfrom theJargon File
- Xiph.Org's official Ogg QuickTime Components for iTunes and iMovie (Windows and Mac OS X)
- Windows Media Player codecs for Vorbis, Speex, Theora and FLAC
- ffmpeg2theoraOgg Theora encoder, commandline application for Linux andWin32