Ogg page

Ogg page
Ogg page header

An Ogg page is a variable sized unit of data within an Ogg bitstream.

Contents

Purpose

One of the purposes of multimedia container formats is to allow multiple codecs to be muxed into a single file or stream. For example, to combine audio, video, and subtitles into a single file.

The viewpoint held by Christopher Montgomery, creator of the Ogg format, is that the units of muxed codec data should be a separate abstraction layer from the units of data used by the codec in order to limit the amount of buffering necessary when decoding the contained data. In his opinion, which is supported by other developers working with the Xiph.org Foundation, this gives Ogg a technical advantage over alternative bitstream formats such as AVI, QuickTime, and MPEG.

Each Ogg page also provides the time offset of the contained data which allows efficient seeking which works with streaming and time accurate. In contrast, many other formats seek to byte positions in the stream or rely on a table of contents for seeking information.

Page structure

Every Ogg page begins with the four-byte magic string "OggS". If sync is lost a decoder can look for the next occurrence of this sequence to begin decoding again. This string is followed by a null byte for Ogg version 0. The version field had originally been intended to allow multiple Ogg page types tuned for different payloads to coexist in the same stream. At the 2000s it became clear that only one page version will be used.[1]

The sixth byte of each page specifies type flags. The value of 1 specifies that contained data is continued from the last page. The value of 2 specifies that this is the first page of the stream, and the value of 4 specifies that this is the last page of the stream. These values can be combined with addition or logical OR.

The next 8 bytes, or 64 bits, is called the absolute granule position which is a synthetic value that encodes the Decode Timestamp, the Presentation time stamp and distance to first-needed reference. The exact encoding of the granule position is up to a specific codec.[2][1]

The following 4 bytes are the stream serial number to which this page belongs. Each logical stream must have a unique serial number within a physical stream. It is also intended to be used like a weak hash so that a collision is very unlikely when multiplexing different streams, which eliminates the need for continuous recalculation of page headers at every multiplexing step.

The following 4 bytes are the page sequence number within the stream. Its a Page counter that lets you know if a page is lost. The, in comparison to other container formats, large Number of 32 bits also allows direct UDP unicast/multicast with Ogg handling reordering and reassembly.[1]

The next 4 bytes, starting at the 23rd byte of the page, is the CRC checksum of the page. Because the value of this field changes the result of the check is computed with this field equal to zero.

Next, the 27th byte of each page specifies the number of segments it contains which ranges from 0 to 255. This is also the size of the following segment table in bytes. Each byte of the segment table provides the length of a segment.

Each segment can be up to 255 bytes in length and is bounded by the page. If a segment is less than 255 it marks the end of a packet, the next segment will begin a new packet. If a packet ends on a multiple of 255, it will end in a segment 0 bytes long. If the last segment of the page is 255 bytes then the last packet is continued on the following page.

Editing with pages

One of the common uses of Ogg pages is for editing Ogg files without the loss of quality or processing expense involved in transcoding.

Any series of pages within a stream can be preceded by the stream's header pages (pages with an absolute granule position of 0) and be decoded properly by media players. This technique can be used to losslessly crop a media file.

Multiple cropped segments can be appended to each other with a process known as chaining provided that the serial numbers of these segments are modified to unique numbers. New content can also be inserted between these segments.

References

  1. ^ a b c Montgomery, Christopher (2010-04-27). "Monty - In Defense of Ogg's Good Name". people.xiph.org/~xiphmont. http://people.xiph.org/~xiphmont/lj-pseudocut/o-response-1.html. Retrieved 2010-05-02. 
  2. ^ "ogg-multiplex". http://xiph.org/ogg/doc/ogg-multiplex.html. Retrieved 2011-03-02. 

External links



Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • Ogg Writ — is a text phrase codec used with the Ogg encapsulation format. It was initially designed to provide subtitles for Ogg Theora videos, but is also useful for song lyrics with Ogg FLAC or Vorbis, transcripts with Ogg Speex, or any other place where… …   Wikipedia

  • Ogg Skeleton — Ogg Skeleton  потоковая структура данных, используемая в медиа‐контейнере Ogg с несколькими дорожками, и содержащая дополнительную информацию, полезную, в первую очередь, для их синхронизации. Формат появился позже основных кодеков,… …   Википедия

  • Page — may mean:Apprentice, assistant, errand boy*Page of Honour, the chilvalric and ceremonial position at a royal court in older times. *Page (servant), a traditionally young male servant. **Canadian Senate Page Program or Canadian House of Commons… …   Wikipedia

  • Ogg — For other uses, see Ogg (disambiguation). Ogg Filename extension .ogv, .oga, .ogx, .ogg, .spx, Internet media type video/ogg, audio/ogg, application/ogg …   Wikipedia

  • Ogg Squish — OggSquish was one of the first names used for the Ogg project developed from 1994 by the Xiphophorus company (now Xiph.Org Foundation). Ogg Squish was also an attempt from the Xiphophorus company to create a royalty free lossless audio… …   Wikipedia

  • Ogg — В этой статье не хватает ссылок на источники информации. Информация должна быть проверяема, иначе она может быть поставлена под сомнение и удалена. Вы можете отред …   Википедия

  • Ogg — Pour les articles homonymes, voir Ogx. Ogg Extension .ogg, .ogv, .oga, .ogx Type MIME video/ogg, audio/ogg, application/ogg Développé par Xiph.org Type d …   Wikipédia en Français

  • .ogg — Extension de fichier .ogg, .ogv, .oga, .ogx Type MIME video/ogg, audio/ogg, application/ogg Développé par Xiph.org Type de format Format conteneur Conteneur de fichiers …   Wikipédia en Français

  • OGG — Cette page d’homonymie répertorie les différents sujets et articles partageant un même nom.   Sigles d’une seule lettre   Sigles de deux lettres > Sigles de trois lettres   Sigles de quatre lettres …   Wikipédia en Français

  • Ogg Media — Pour les articles homonymes, voir OGM (homonymie). Ogg Media (OGM) est un format de fichier conteneur vidéo (extension *.ogm) capable de gérer un flux vidéo (Theora, Xvid ou DivX), une ou plusieurs pistes son (Ogg Vorbis, Ogg Vorbis 5.1, AC3, MP3 …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”