OGG - Ogg Vorbis Audio
An OGG file is an open, royalty-free container that normally holds Vorbis audio. You meet it in open-source software, game soundtracks and sound archives.
Ogg is an open container format from the Xiph.Org Foundation, a non-profit that builds royalty-free media technology. A file ending in .ogg is almost always Ogg carrying Vorbis, a lossy audio codec designed as a patent-free answer to MP3, so people tend to say Ogg Vorbis and mean the pair together. You meet these files in open-source software, in game soundtracks, in language and pronunciation archives, and on sites that did not want to license anything in order to host audio.
A container with a codec inside
Ogg itself compresses nothing. It is a wrapper that chops a media stream into pages, each carrying a checksum and a position marker, so a player can verify the data, skip to a point in the middle, and even follow a live broadcast that has no end. Several streams can be interleaved in one file, which is how audio and video travel together. Besides Vorbis, Ogg can carry Opus, FLAC, Speex and the Theora video codec, which is why Xiph recommends the extension .oga for Ogg audio that is not Vorbis and .ogv for video.
Vorbis, the codec normally inside, is lossy: it converts short blocks of the waveform into frequencies and discards detail a listener is unlikely to miss, and what it discards never comes back. It is variable in bitrate by nature, spending data where the music needs it and easing off in quiet passages. It also relies on codebooks that each file carries in its own header, which is part of why its quality held up well against MP3 at the same size.
What metadata an OGG file carries
Vorbis keeps its tags in a dedicated header packet using Vorbis comments, the same scheme FLAC uses. A Vorbis comment is simply a field name, an equals sign and a value in plain text, which makes the system unusually flexible: field names are not restricted to an official list, and the same field can appear several times, so a track credited to three performers just has three ARTIST lines.
The recommended names cover what you would expect: TITLE, ARTIST, ALBUM, TRACKNUMBER, DATE, GENRE, DESCRIPTION, COMPOSER, PERFORMER, COPYRIGHT, LICENSE, ORGANIZATION, VERSION and ISRC. Two of the standard fields carry personal information by design and are worth pointing out. LOCATION is meant for the place where the recording was made, and CONTACT is meant for how to reach the person or organisation behind it, which in practice means an email address or a personal website. Neither is filled in automatically, but recording and field-work tools do use them.
Beyond the standard names, expect whatever the software chain added. ENCODER gives the exact program and version that made the file, and you may also find replay gain measurements, identifiers linking the album to an online music database, and a COMMENT field holding anything at all that a person typed. Cover art is unusual here: instead of a structure of its own it is stored as an encoded picture inside a comment field. Older files sometimes have an ID3 tag stuck on the front by a tagger that did not know better. Players may ignore it, but a metadata report will still show you what it says.
When to use OGG
Ogg Vorbis is a sound choice when licensing matters, when you are shipping audio inside software or a game, or when you simply want good lossy quality without paying anyone. Browsers and desktop players handle it well. Its weakness is hardware: car stereos, older phones and many portable players expect MP3 or AAC, so a file that plays perfectly on a laptop can be invisible on a dashboard. Within Xiph's own family, Opus is now the codec to reach for on new work, and it travels in the same Ogg pages, which is why those files use the .opus extension.