Author Topic: Optimal codecs / settings for quality  (Read 1280 times)

LedHarvest

  • Newbie
  • *
  • Posts: 15
After a few hours of reading and experimentation, I thought I'd share what I've learned:

1. Opus is the best lossy format today - e.g. https://commons.wikimedia.org/wiki/Opus_(audio_codec)#Spectrograms_in_comparison

It produces higher quality at lower bit rates / file sizes than other formats, especially MP3. It's also being actively developed (last release a few days ago), unlike LAME / MP3 which appears to be deadware (last updated 2017).

Latest win32 builds - https://github.com/Chocobo1/opus-tools_win32-build

2. You may hear benefit from using WASAPI (exclusive, event mode) - Preferences... Player... Output mode. DirectSound (despite the name) goes through Windows and may be 'improved' by Windows' filters. I think I can hear an improvement on my system using WASAPI.

Obviously this all depends on the users' ears / equipment. No need to point out the blindingly obvious... again. :)

Zak

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 2463
[Opus is] also being actively developed (last release a few days ago), unlike LAME / MP3 which appears to be deadware (last updated 2017).
That isn't really a fair assessment.

The LAME encoder has been in development for over a quarter of a century.
Hundreds or more likely thousands of very clever people will have examined its source code in that time, so it's probably already about as optimised as it's ever going to get.

Also, one of the reasons Opus receives updates is because of its excellent aptitude for real-time communications.
Think of programs like FaceTime and Skype where audio needs to be encoded, transmitted and decoded with minimal latency to allow for natural conversation.
As such, all of the improvements in the latest version(s) relate to things like packet loss recovery and improved low-bitrate speech quality.

There's no harm in updating to the latest version of Opus to use at home, but rarely will it include any noticeable improvements to the audio files in your music library.
Bee excellent to each other...

LedHarvest

  • Newbie
  • *
  • Posts: 15
it's not a question of being "fair". It's just a statement of fact. LAME is deadware and Opus is actively developed and employing modern techniques and tools - e.g. Machine Learning (https://opus-codec.org/demo/opus-1.5/) - that weren't available while LAME was being developed from 1998. Assuming current trajectories remain the same then Opus is just going to keep extending its already significant lead.

Using Opus will result in quantitively better results - higher quality music at lower file sizes. Even if that hurts LAME's feelings.

MotleyG

  • Full Member
  • ***
  • Posts: 144
it's not a question of being "fair". It's just a statement of fact. LAME is deadware and Opus is actively developed...
LAME is not deadware, there are millions of users that benefit from it every day.

Using Opus will result in quantitively better results - higher quality music at lower file sizes.
Subjective, but use it if you prefer. That is your choice. Be sure your player of choice supports Opus though, there are many that don't. MP3 on the other hand is pretty much universally supported, even with iTunes. Besides, with huge amounts of storage available at affordable pricing, why aren't you considering a lossless format like FLAC? Then you don't have to worry about any compression issues at all.

Even if that hurts LAME's feelings.
I'm sure LAME will be fine without you.

Zak

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 2463
Opus is actively developed and employing modern techniques and tools - e.g. Machine Learning (https://opus-codec.org/demo/opus-1.5/)
Again, these have zero benefit to people using Opus for music on their home computers and portable devices.
That's why the demonstrations of the new features in the Opus 1.5 release notes are for speech encoded at bitrates between 6 and 12 kbps.
The release notes also state that these new features are disabled by default - so unless you're downloading the source code, enabling them and compiling it yourself they won't even get used.

Without diving too deep, the Opus release history shows that the last release which may have had any improvements for regular users was 1.3, released in 2018, though it was more likely 1.1 released in 2013. It's a good example of (mostly) getting it right the first time - an advantage MP3 didn't have.

Using Opus will result in quantitively better results - higher quality music at lower file sizes.
This is true - assuming your setup supports Opus decoding.

But there are literally millions of older devices in the world that don't, which means MP3 isn't going away anytime soon.
LAME certainly isn't "dead" - even if it isn't being updated - and Opus isn't "extending its already significant lead" above what it already had a decade ago.
Bee excellent to each other...

LedHarvest

  • Newbie
  • *
  • Posts: 15
LAME is not deadware, there are millions of users that benefit from it every day.

I'm sure LAME will be fine without you.

You don't understand what 'deadware' means in this context - no longer developed or supported by its creators... and acting like you're personally insulted by that fact. Weird!

LedHarvest

  • Newbie
  • *
  • Posts: 15
...these have zero benefit to people using Opus...

You've cherry picked the bit that is not a benefit and ignored the bit that I was very clearly referring to - "higher quality music at lower file sizes"

It's very bizarre how this seems to be causing offence!!

frankz

  • Sr. Member
  • ****
  • Posts: 3876
...I was very clearly referring to - "higher quality music at lower file sizes"

Back when smaller file sizes mattered, this mattered.  Storage is so cheap now that the race for who's the best at squishing a file down in size without wrecking the SQ isn't a thing any more.

Today it's all about compatibility and portability and being future-proof.  Efficiency in compression is a very academic discussion.

People should use whatever they want.  I don't know why everyone gets so evangelistic about it.  It doesn't sound better if more people use it with you.

hiccup

  • Sr. Member
  • ****
  • Posts: 7902
Lots of good info and some sensible opinions in this thread.
Let's focus on it providing information, and it not becoming some Microsoft vs. Apple discussion?

Back when smaller file sizes mattered, this mattered.  Storage is so cheap now that the race for who's the best at squishing a file down in size without wrecking the SQ isn't a thing any more.
True for the largest part, but for e.g. older mp3 players and (even current) smartphones I think it is still a valid consideration.
Especially since very often you can't expand their storage after you bought the device.

Roughly speaking, you can have an OPUS library that occupies about 60% disk size compared to its mp3 equivalent.
(and will sound at least as good)
That can be useful for people wanting to get as much of their music on their devices as possible.
And, transferring will take less time.

Another aspect that I think has not been mentioned in this thread is that OPUS uses the same tagging protocol as FLAC.
(Vorbis Comment vs. ID3)
Which is also newer and more versatile and less restricted.

Zak

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 2463
You've cherry picked the bit that is not a benefit ...

Yeah, nah. You declared LAME (and by extension MP3) as "dead" and stated OPUS is better because recent releases use machine learning.
I'm telling future readers of this thread that those OPUS features aren't going to improve their home listening experience.

...and ignored the bit that I was very clearly referring to - "higher quality music at lower file sizes"

Um... you ignored the bit where I directly acknowledge the very thing you say I ignored:

Using Opus will result in quantitively better results - higher quality music at lower file sizes.
This is true - assuming your setup supports Opus decoding.

It's very bizarre how this seems to be causing offence!!
I'm not offended. I'm clarifying some details.
If for no other reason than because about once a month someone will start a thread asking:

I read that MP3 is dead and OPUS is awesome. Should I re-encode all my 20 year-old MP3s in OPUS?
Bee excellent to each other...

sveakul

  • Sr. Member
  • ****
  • Posts: 2475
As far as file size goes, I have found that conversions made from the same FLAC original end up in the same size vicinity, and to my ears all equally transparent from the FLAC, when encoded at V0 MP3, 256k Opus, or CVBR 256k Apple AAC.  A good compromise between "storage is cheap" and "size sometimes does matter" when lossless is still kinda big but you want overkill on sound quality.  Then it's all about just device compatibility with format.

hiccup

  • Sr. Member
  • ****
  • Posts: 7902
As far as file size goes, I have found that conversions made from the same FLAC original end up in the same size vicinity, and to my ears all equally transparent from the FLAC, when encoded at V0 MP3, 256k Opus, or CVBR 256k Apple AAC.
If you find mp3 V0 (approx. 240k) to be 'transparent', you will probably also find OPUS VBR 140k to be 'transparent'.
In my testing, to my ears these two perform on the same level. (and SPEK feels the same ;-)
Some have said that OPUS generally will perform equal to mp3 at half the bitrate. Maybe not completely true, but I don't think it is far from the truth.

I am using OPUS VBR 140k as my 'weapon of choice' for my portable devices, which sounds exceptionally good and saves me approximately 40% disk space compared to using 'good quality' mp3.
 
Last Edit: March 17, 2024, 03:50:59 PM by hiccup

sveakul

  • Sr. Member
  • ****
  • Posts: 2475
As far as file size goes, I have found that conversions made from the same FLAC original end up in the same size vicinity, and to my ears all equally transparent from the FLAC, when encoded at V0 MP3, 256k Opus, or CVBR 256k Apple AAC.
If you find mp3 V0 (approx. 240k) to be 'transparent', you will probably also find OPUS VBR 140k to be 'transparent'.
I agree.  My main point was the the file sizes resembling each other with those encoding parameters, especially as many use mp3 V0 ( I THINK mp3's from Amazon use that, but haven't bought one from there in a while).  You get no-worry quality overkill in all cases. especially from OPUS.

Gendji

  • Full Member
  • ***
  • Posts: 126
Is it me or do the spectrograms linked in the first post Opus Spectrograms in comparison look weird?

The first one looks like a wall of sound, (the winner of the "Loudness War"), and the rest have weird blocks.

Never seen something like that with my own sound files using Spek.

hiccup

  • Sr. Member
  • ****
  • Posts: 7902
Is it me or do the spectrograms linked in the first post Opus Spectrograms in comparison look weird?
I also don't really understand those spectrograms.
They are not explained very well, e.g. not specifying bitrates per spectogram.
I get the impression that he 'Frankensteined' some of these spectograms, in an attempt to show different bitrates in a single spectogram?
So maybe each image is constructed of parts of different bitrates?  I have no idea.

Anywayz, I think that spectograms like these are predominantly good for showing how codecs handle frequency ranges.
Many of them cutting off information above a certain threshold. (which makes perfect sense if we—or the older majority of us—are being honest)
OPUS seems to be good at preserving higher frequencies, even at lower bitrates.

But just looking at a spectogram will not tell you how good one will sound against another to human ears.
(as much as I would hope that I could rely on that myself  ;-)

If you are using spectograms to look for bad dynamics (wall of sound), I am not sure what would be a reliable visual clue to look for.
Frequency range will not be it for sure.
Maybe colouring, density?
 
Last Edit: March 20, 2024, 11:23:47 PM by hiccup