A file/stream format developed by Xiphophorus (Xiph.Org Foundation). Name derives from the Netrek term (as described by the Jargon File).

File name extension is .ogg, though some use .ogg only for Vorbis audio and use .ogm ("Ogg Media") for ogg streams containing video and audio. Note that this is merely a convention at the time - Xiph.org folks recommend use of .ogg for everything! IANA-approved MIME type for all Ogg content is application/ogg. (Previously, application/x-ogg and audio/x-ogg were used.)

The stream format is described in Xiph's documentation and also in RFC 3533 ("The Ogg encapsulation format version 0"), and the MIME type is described in RFC 3534 ("The application/ogg Media Type").

Ogg format is similar in purpose and usage to RIFF (commonly called AVI and WAV after the file extensions) or QuickTime, and quite possibly good enough to be mentioned in the same same sentence.

Ogg files can contain just simple raw data on package, but it also provides frame multiplexing mechanism and "landmarks" for seeking. Multiple logical bitstreams of different types are allowed in a same physical bitstream (so you can have video, multiple audio streams, subtitles, whatever, all in the same file). I've been told that the support for variable bitrate content is far better than that of RIFF AVI format. The metadata support is also pretty nice, clearly better than certain hacks in the MPEG side...

There are several types of data that can be wrapped inside of an Ogg file, and number is likely to grow in future:

  • Ogg Vorbis compressed audio - this is the most famous thing it's used for at the time being. Quality-wise, kills MP3 dead while keeping the file sizes about the same or smaller.
  • Speex - very low bitrate audio compression, optimized for speech.
  • FLAC - audio with lossless compression.
  • Just about any video data that is supported by Windows...
  • Reports indicate that some people have used DivX/XviD video within ogg streams, but I don't have the details or have seen this yet "live"...
  • AC3 audio.
  • Ogg Tarkin - the video compression codec in development. As of yet, this is not really supported because there's nothing substantial yet =)
  • VP3 (through above-mentioned AVI support thing) and Theora video - Theora is a video codec, based on VP3, which appears to compete quality-wise fairly decently against Sorenson and MPEG4...
  • MIDI music data
  • MJPEG compressed video

There's a library for handling this file format, simply called libogg.

(It might be noted that at this phase, most Ogg-using programs assume your Ogg file contains only Vorbis data. For example, ogg123 says that Ogg FLAC file "may be corrupted" and doesn't even suggest that file has something else... Ah, the eternal problems of wrapper formats! There is a program called 'ogminfo' that can be used to find out what streams are there in a file.)

Xiphophorus' home page (http://www.xiph.org/ogg/) has more information on the format and has information on Vorbis and Tarkin.