this post was submitted on 14 Sep 2023
27 points (82.9% liked)

Asklemmy

43943 readers
87 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy πŸ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_[email protected]~

founded 5 years ago
MODERATORS
top 20 comments
sorted by: hot top controversial new old
[–] [email protected] 66 points 1 year ago* (last edited 1 year ago) (2 children)

Ogg is a lossy formar, Wav is not. They are not compatible.

The question should be "Flac or Wav?" And the answer is Flac, unless you need some kind of old compatibility.

[–] [email protected] 15 points 1 year ago (3 children)

what does lossy mean and why flac

[–] LucasWaffyWaf 28 points 1 year ago* (last edited 1 year ago) (3 children)

Edit: Check the replies to my post for corrections and clarifications.

I'll answer your question and more.

Lossless quality: The highest quality you can practically get, where it's as close to a 1:1 recreation from the studio as reasonably possible.

Lossy quality: The audio is compressed in a manner where you get the majority of the sound, but slight, fine details are lost to lighten up on file size. Heavy compression can greatly alter overall sound quality, but it's not the early 2000s anymore, we don't need to compress music that hard to get an album or two to fit on a 128 mb card.

.wav: Lossless, uncompressed file. Full quality, full file size.

.flac: Lossless quality, but with some compression, to minmax file size to audio quality.

.mp3: Lossy compressed. Small file size with reduced audio quality.

.ogg: Lossy compressed. Basically just an alternative to the .mp3 standard.

[–] [email protected] 15 points 1 year ago

Your answer is correct but I am going to needlessly nitpick: Actually, OGG is just the name of the container format. The audio stream inside a .ogg file is usually using a format called Vorbis. However, .flac files also use an OGG container afaik, they just have different file format convention. Same goes for the newer Opus audio format which usually uses .opus despite also being packaged in an OGG container. In any case, it wouldn't be entirely wrong to name a FLAC or Opus file .ogg.

Side note: Opus is the future but sadly not yet widely compatible outside browsers. FLAC is great and more widely established but also has its support deficits. MP3 and WAV are still the most widely compatible formats sadly.

[–] [email protected] 8 points 1 year ago

Lossless quality: The highest quality you can practically get, where it's as close to a 1:1 recreation from the studio as reasonably possible.

Nitpick: lossless would actually bit-identical to the original. The trade-off in compression level is based on how much processing is required to compress/uncompress it. The audio fidelity remains the same; 1:1.

[–] TheCheddarCheese 4 points 1 year ago (1 children)

quick question, when i looked through the source files of some of the videogames i own most of them store the music as ogg and not mp3, is there a specific benefit of one over the other?

[–] [email protected] 5 points 1 year ago

They don’t have to pay any license fees to use it.

It can also hold more than audio, although it is more common now to use other extensions like ogv.

[–] [email protected] 13 points 1 year ago

Basically if you rip a CD to WAV, you're getting a 1:1 rip of the audio that takes up the same amount of space. A 75 minute CD will take up 650mb as a WAV rip.

Lossy compression means that some data is basically thrown out to improve the compression ratio. It might sound the same to most people, but something is missing, and you can't reconstruct the original anymore. You can easily get a 10:1 compression ratio with near-CD quality audio. Ogg is a lossy format with high compression and good sound quality.

Lossless compression means that the resulting file is compressed in such a way that all of the data is still there. You can convert the compressed file back to the exact original file. The compression here is closer to 4:1 generally. FLAC is lossless and the sound is exactly the same as the source.

[–] [email protected] 4 points 1 year ago

Lossy means that the compression gets rid of the finer points of data to save on space that usually wouldn't bee too noticeable in the music. Lossless keeps all the data

[–] [email protected] 4 points 1 year ago (1 children)

I thought ogg had multiple formats, some of which weren't lossy.

[–] [email protected] 1 points 1 year ago

It can hold FLAC and PCM.

[–] [email protected] 26 points 1 year ago

Depends on what counts as "better".

Better quality? WAV, since it's lossless.

Better efficiency? OGG (well, Vorbis) since it compresses pretty well, but you'll still get a (minor) loss in quality.

That said, both of those formats are old news and should only be used if you have weird, specific compatibility needs. For lossy compression, OGG/Vorbis has been succeeded by Opus; it's what YouTube uses, compresses fantastically, and is supported by damn near everything. For lossless, FLAC (Free Lossless Audio Codec) is still the gold standard: you can reduce file sizes by as much as 60% with literally zero loss in quality. If you can, use one of those.

[–] [email protected] 15 points 1 year ago

For what? wav is your lossless container. Pretty much universally recognized. Think of it like RAW for photos. ogg is lossy and more appropriate for most use cases, but is not universally recognized and not available on all devices.

[–] [email protected] 15 points 1 year ago

Not a good comparison. Wav is lossless, ogg is lossy. If it's for general listening, ogg. If it's for storage or reconversion, wav. And let's be honest, in most cases you'd want to convert wav to flac if you go that route.

[–] Chainweasel 14 points 1 year ago
[–] cbarrick 12 points 1 year ago* (last edited 1 year ago)

Wav is more or less "raw" audio. It is typically not compressed.

Ogg Vorbis is a lossy compressed format. It reduces the "quality" of the audio in exchange for a smaller file. More often than not, the change in quality is not perceptible to the human ear.

Other lossy compressed formats include MP3, AAC, and Ogg Opus. There's plenty of neuance to compare between these lossy formats. But if you don't already know about them, just assume Ogg Opus is best, Ogg Vorbis and AAC are the same, and MP3 is worse. AFAIK Spotify uses Ogg Vorbis, but they may have upgraded to Ogg Opus by now.

FLAC is a losslessly compressed format. It compresses the raw audio without changing the quality at all. All lossless formats are the same quality as Wav. The only differences between the lossless formats are the size of the file and the CPU cost to decompress the data.

Have more questions about codecs? Just ask! I'm not an expert but I do know a decent bit about this stuff.

[–] [email protected] 6 points 1 year ago* (last edited 1 year ago)

.wav files store volume levels (typically, but often higher) as a 16bit value 44100 times a second (again, typically, but often higher). This allows frequencies up to 22050Hz to be stored without losses. A lot of this is useless information, because most people don't hear anything above 16kHz, which only gets worse with age. Other parts of this might be useless information because of complex low frequency interaction with the inner ear which occlude some higher frequencies (psychoacoustics was a long time ago, can't explain it in detail). .ogg and .mp3 filetypes, among others, use that to simply cut frequencies that (probably) aren't heard. This process saves a lot of data, but results in lower resolution, especially in the higher frequencies (look up comparisons for 128kBit/s vs 320kBit/s MP3, you'll hear the difference immediately on pretty much anything other than phone speakers.)

If file size is an issue, .ogg is great, if quality is the most important, go for .flac, as flac files also don't loose any quality while having file sizes between the two, though compatibility might be a problem on older systems.

[–] Pietrasagh 0 points 1 year ago

None, FLAC is

[–] [email protected] -1 points 1 year ago (1 children)
[–] [email protected] 1 points 1 year ago