Ogg 22513 224344101 2008-07-08T13:01:43Z 77.225.48.223 /* See also */ :''To learn how to create video or audio files for Wikipedia and its sister projects, check [[Wikipedia:Creation and usage of media files]].'' {{otheruses}} {{ infobox file format | name = Ogg | icon = [[Image:XiphophorusLogoSVG.svg|Vorbis Logo]] | logo = | extension = .ogv, .oga, .ogx, .ogg | mime = video/ogg ([[Internet Assigned Numbers Authority|unregistered]]), audio/ogg ([[Internet Assigned Numbers Authority|unregistered]]), application/ogg | magic = OggS | owner = [[Xiph.Org Foundation]] | creatorcode = [[Chris Montgomery]] | genre = [[Container format]] | container for = [[Vorbis]], [[Theora]], [[Speex]], [[FLAC]], [[Dirac (codec)|Dirac]], and others.}} '''Ogg''' is a [[free file format|free]], [[open standard]] [[container format (digital)|container format]] maintained by the [[Xiph.Org Foundation]]. The Ogg format is unrestricted by [[software patent]]s and is designed to provide for efficient [[streaming media|streaming]] and manipulation of high quality [[digital multimedia]]. The name ‘Ogg’ refers to the [[file format]] which can multiplex a number of separate independent [[free software|free]] and [[open source software|open source]] [[codecs]] for [[sound|audio]], [[video]], text (such as [[subtitles]]), and [[metadata]]. In the Ogg multimedia framework, [[Theora]] provides a [[lossy]] video layer, while the music-oriented [[Vorbis]] codec most commonly acts as the audio layer. The human speech compression codec [[Speex]], [[lossless]] audio compression codec [[FLAC]], and [[OggPCM]] may also act as audio layers. The term ‘Ogg’ is commonly used to refer to [[audio file format]] [[Vorbis|Ogg Vorbis]], that is, Vorbis-encoded audio in the Ogg container. Previously, the .ogg file extension was used for any content distributed within Ogg, but as of 2007, the Xiph.Org Foundation requests that .ogg be used only for Vorbis due to backward compatibility concerns. 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 applications.<ref>{{cite web |url = http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions |title = MIME Types and File Extensions |work = XiphWiki |date = 2007-09-07 |accessdate = 2007-09-10 }}</ref> The current version of the Xiph.Org Foundation's reference implementation, released on [[27 November]] [[2005]], is libogg 1.1.3.<ref>[http://lists.xiph.org/pipermail/vorbis-dev/2005-November/018295.html [Vorbis-dev&#93; libogg 1.1.3 and libvorbis 1.1.2 releases<!-- Bot generated title -->]</ref> Another version, libogg2, is also available from the Xiph.Org Foundation's SVN repositories. Both [[library (software)|software libraries]] are [[free software]], released under the new [[BSD license]]. Because the format is free, Ogg's various codecs have been incorporated into a number of different free and [[proprietary software|proprietary]] [[media player (application software)|media player]]s, both commercial and non-commercial, as well as [[portable media player]]s and [[GPS]] receivers from different manufacturers. ==Naming== It is sometimes assumed that the name ''Ogg'' comes from the character of [[Nanny Ogg]] in [[Terry Pratchett]]'s ''[[Discworld]]'' novels. However, it derives from [[ogging]], [[jargon]] from the computer game [[Netrek]] which came to mean doing 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 [[IBM PC compatible|PC]] hardware of the time.<ref>{{cite web|publisher=Xiph.org Foundation|url=http://xiph.org/xiphname|date=[[2006-01-07]]|title=Xiph.org: naming|accessdate=2008-02-16|quote=At the time Ogg was starting out, most personal computers were i386s and the i486 was new. I remember thinking about the algorithms I was considering, "Woah, that's heavyweight. People are going to need a 486 to run that..." While the software ogged the music, there wasn't much processor left for anything else.}}</ref><ref>{{cite web|author= Medo|publisher=BBC|url=http://www.bbc.co.uk/dna/h2g2/A6556511|date=[[2005-12-20]]|title=Ogg Vorbis - Better Than Mp3?|accessdate=2007-06-24}}</ref> ==File format== The ''Ogg'' [[bitstream format]], spearheaded by the Xiph.Org Foundation, 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 available free of charge and are 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 [[multiplexing|multiplexed]] 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 licence|BSD-licensed]] library, called ''libogg'', is available to encode and decode data from ''Ogg'' streams. Independent Ogg implementations are used in several projects such as [[RealPlayer]] and a set of [[DirectShow]] filters. ==Page structure== The following is the field layout of an Ogg page header: [[Image:Ogg page header structure (en).svg|512px|center|The field layout of an Ogg page header]] ;Capture pattern &mdash; 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 &mdash; 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 &mdash; 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. :{| class="wikitable" !width="5%"|Bit !width="10%"|Value !width="10%"|Flag !width="75%"|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 &mdash; 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 &mdash; 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 (vorbis), and the other will be the video (theora) ;Page sequence number &mdash; 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 &mdash; 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 &mdash; 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. ==Metadata== Currently, there is no official standard for including metadata in Ogg containers. Implementation is still a long way off as of Quarter 3, 2007. The Xiph.Org Foundation are currently welcoming suggestions and feedback. Suggested metadata implementation methods include the following: <ref name="oggmeta">{{cite web|publisher=Xiph Wiki|url=http://wiki.xiph.org/Metadata|date=[[2005-12-20]]|title=Ogg Metadata|accessdate=2007-08-31}}</ref> * [[Dublin core]] in [[Resource_Description_Framework|RDF]] * XML-encoding (options include generic RDF, [[CMML]], and [[XMP]]) * [[MusicBrainz]] XML MetaData * Ogg Skeleton is emerging as the way to approach machineable metadata. Metadata must currently be included in the [[codec]]. There is fairly good software support for Vorbis metadata—often referred to as comments. But software support for Theora and FLAC comments in Ogg containers is very limited. == History == [[Image:Play ogg.png|thumb|The “Play Ogg” web button]] In May [[2003]], two Internet [[Requests for Comments|RFC]]s were published relating to the format. The Ogg bitstream was defined in RFC 3533 (which is classified as 'informative') and its [[MIME#Content-Type|Internet content type]] (<code>application/ogg</code>) in RFC 3534 (which is, [[as of 2006]], a proposed standard protocol). Although Ogg hasn't reached anywhere near the ubiquity of the [[MPEG]] standards <ref>[http://www.wired.com/entertainment/music/news/2007/02/72785?currentPage=all MP3's Loss, Open Source's Gain]</ref> (e.g.: [[MP3]] / [[MP4]]), [[as of 2006]], it is commonly used to encode [[free content]] (such as free music, multimedia on [[Wikimedia]] projects and [[Creative Commons]] files) and has started to be supported by a significant minority of [[digital audio player]]s. Also supporting the Ogg format have been many popular video game engines, including [[Doom 3]], [[Unreal Tournament 2004]], [[Myst IV: Revelation]], [[Serious Sam: The Second Encounter]], [[Lineage 2]], [[Vendetta Online]], and the [[Grand Theft Auto]] engines. The more popular 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. On May 16, 2007, the [[Free Software Foundation]] started a campaign to increase the use of Vorbis “as an ethically, legally and technically superior audio alternative to the proprietary MP3 format.”<ref>[http://www.fsf.org/news/playogg.html 'Play Ogg': FSF launches free audio format campaign]</ref> People are also encouraged to support the campaign by adding a web button to their [[website]] or [[blog]]. For those who don't want to download and use FSF's suggested Ogg player ([[VLC media player|VLC]]), the [[Xiph|Xiph.Org Foundation]] has an official codec<ref>[http://xiph.org/quicktime/ Xiph.Org Foundation: Ogg QuickTime Components for iTunes and iMovie (Windows and Mac OS X)]</ref> for [[QuickTime]]-based applications in [[Microsoft Windows|Windows]] and [[Mac OS X]], such as [[iTunes]] players and [[iMovie]] applications; and Windows users can install a [[Windows Media Player]] Ogg codec<ref>[http://www.illiminable.com/ogg/ Windows Media Player Directshow Filters for Vorbis, Speex, Theora and FLAC]</ref>. == Ogg codecs == Ogg is only a container format. The actual audio or video encoded by a codec will be 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 (such as [[MPEG-4]], [[Dirac (codec)|Dirac]], MP3 and others) but Ogg was intended and usually is used with the following free codecs: * [[Audio codec]]s ** [[lossy data compression|lossy]] *** [[Speex]]: handles voice data at low bitrates (~8-32 kbit/s/channel) *** [[Vorbis]]: handles general audio data at mid- to high-level [[variable bitrate]]s (~16-500 kbit/s/channel) ** [[lossless data compression|lossless]] *** [[FLAC]]: handles archival and high fidelity audio data * Text codecs ** [[Ogg Writ|Writ]]: a text codec designed to embed subtitles or captions ** [[CMML]]: a text/application codec for timed metadata, captioning, and formatting * [[Video codec]]s ** [[Theora]]: based upon [[On2]]'s [[VP3]], it is targeted at competing with [[MPEG-4]] video (for example, encoded with [[DivX]] or [[Xvid]]), RealVideo, or Windows Media Video. ** Tarkin: an experimental codec utilizing [[discrete wavelet transform]]s in the three [[dimension]]s of width, height, and time. It has been put on hold since February 2000, with Theora becoming the main focus for video encoding. ** [[Dirac (codec)|Dirac]]: an experimental codec developed by the BBC as the basis of a new codec for the transmission of video over the Internet. The [http://schrodinger.sourceforge.net/ Schrödinger] 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]]: a draft codec for storing uncompressed video. * [[Subtitle (captioning)|Subtitle]] structures ** [[Annodex]]: A free and open source set of standards developed by [[CSIRO]] to annotate and index networked media. == See also == {{portal|Free software|Free Software Portal Logo.svg}} * [[Audio data compression]] * [[Comparison of container formats]] * [[LRC (file format)]] * [[liboggz]] == References == {{reflist}} == External links == {{HelpCommons|Commons:Media help|Ogg}} {{commonscat|Ogg files}} {{wiktionary}} * [http://www.xiph.org/ogg/ The Xiph.Org Foundation official webpage &mdash; Ogg] * [http://www.ietf.org/rfc/rfc3533.txt RFC 3533 &mdash; The Ogg Encapsulation Format Version 0] * [http://www.ietf.org/rfc/rfc3534.txt RFC 3534 &mdash; The application/ogg Media Type] * [http://creativecommons.org/technology/ogg Using Creative Commons Metadata in Ogg containers] * [http://www.catb.org/~esr/jargon/html/O/ogg.html Ogg etymology] from the [[Jargon File]] * [http://xiph.org/quicktime/ Xiph.Org's official Ogg QuickTime Components for iTunes and iMovie (Windows and Mac OS X)] * [http://www.illiminable.com/ogg/ Windows Media Player codecs for Vorbis, Speex, Theora and FLAC] * [http://v2v.cc/~j/ffmpeg2theora/ ffmpeg2theora] Ogg Theora encoder, commandline application for Linux, Win32 and [[DOS]] (use port or [[HX_DOS_Extender|HX]]) {{Xiph.org}} {{Compression Formats}} [[Category:Ogg files]] [[Category:Container formats]] [[Category:Free multimedia codecs, containers, and splitters]] [[Category:Xiph.Org projects]] [[Category:Open formats]] [[ast:Ogg]] [[ca:Ogg]] [[cs:Ogg]] [[da:Ogg]] [[de:Ogg]] [[es:Ogg]] [[eo:Ogg]] [[fr:Ogg]] [[gl:Ogg]] [[ko:Ogg]] [[hr:OGG]] [[it:Ogg]] [[lb:.ogg]] [[hu:Ogg]] [[ms:Ogg]] [[nl:Ogg (bestandsindeling)]] [[ja:Ogg]] [[no:Ogg]] [[nn:Ogg]] [[pam:Ogg]] [[pl:Ogg]] [[pt:Ogg]] [[ro:Ogg]] [[ru:Ogg]] [[sr:Ogg]] [[sv:Ogg]] [[ta:ஆக்]] [[th:Ogg]] [[zh:Ogg]]