HydrogenAudio

Lossless Audio Compression => FLAC => Topic started by: Cromulent on 2012-12-31 18:32:59

Title: What is the advantage of using the Ogg file container for FLAC encoded
Post by: Cromulent on 2012-12-31 18:32:59
I've been busy re-ripping my CD collection to FLAC files for archiving purposes and have noticed the --ogg command line option in the flac man page. What is the purpose of this? Obviously I know the audio is still lossless but why would I want to use Ogg FLAC streams rather than native FLAC streams?
Title: What is the advantage of using the Ogg file container for FLAC encoded
Post by: Kohlrabi on 2012-12-31 19:04:49
For applications which can only read FLAC encapsulated in Ogg and not natively (I don't know of any, though). Or, to show your love for Ogg.
Title: What is the advantage of using the Ogg file container for FLAC encoded
Post by: ktf on 2012-12-31 22:20:39
(I don't know of any, though)

iTunes, when used with the QT plugin, only supports FLAC in OGG.

With OGG, FLAC supports more than 8 channels for example (by muxing several streams together). More information on OGG mapping is provided here: http://xiph.org/flac/ogg_mapping.html (http://xiph.org/flac/ogg_mapping.html)

It says:
Quote
The original FLAC format includes a very thin transport system. This system of compressed FLAC audio data mixed with a thin transport has come to be known as 'native FLAC'. The transport consists of audio frame headers and footers which contain synchronization patterns, timecodes, and checksums (but notably not frame lengths), and a metadata system. It is very lightweight and does not support more elaborate transport mechanisms such as multiple logical streams, but it has served its purpose well.

The native FLAC transport is not a transport "layer" in the way of standard codec design because it cannot be entirely separated from the payload. Though the metadata system can be separated, the frame header includes both data that belongs in the transport (sync pattern, timecode, checksum) and data that belongs in the compressed packets (audio parameters like channel assignments, sample rate, etc).


In short, it makes it possible to embed FLAC layers into muxing containers, according to the page. The problem is that FLAC is pretty redundant (for streaming for example, it is possible to jump in at about any point) while these are features that a container usually provide. FLAC's native 'container' is too much entangled with its data.
Title: What is the advantage of using the Ogg file container for FLAC encoded
Post by: Cromulent on 2012-12-31 22:37:19
Ah, thanks for the information. That makes some sense. I guess I don't need to worry about it in that case since I am just using FLAC to archive my music. I'll be using Ogg Vorbis to actually listen to it on my phone.