448 points · by ledoge · 4mo ago · 151 comments
Don't get me wrong, this sort of thing is a valuable exercise and we are better off with better encoders for these older codecs. But look at the numbers for Opus on this benchmark. It simply blows all the AAC encoders out of the water even at 64 kbps.
https://developers.google.com/youtube/v3/live/guides/ingesti...
YouTube serves vp9 but it always re-encodes my videos as AV1. Annoying.
(I would upload as AV1 but the encoder is slooooooooow.)
If you want flexibility without fully transcoding both audio and video, Opus is your friend
Everyone I've seen complaining about slow choppy playback in DaVinci Resolve appears to be using long-GOP codecs which require a massive amount of processing to decode. It's something like playing out two seconds of video to access every single frame.
Whether you like it or not, AAC is still the standard.
Not only is the new AAC Encoder also royalty-free, the AAC-LC codec itself has been declared by Redhat as patent free ( all patent expired ).
But it is nice to hear that you have been thinking of us, too.
Still having a good quality and default aac encoder is great. Though I don't get why it is mainly CBR.
It also uses less battery on my Rockbox'd Clip+.
But would you really store new material encoded in Vorbis just to be able to play it on an old device? Vorbis can sound fine, even at lower bitrates like 128k or 96k, but Opus would sound much better. So perhaps then use Vorbis at higher bitrates like +192k? I prefer Vorbis to Aac but at that bitrate minor intricacies of the container format become more important than the codec because audio quality wise they are near indistinguishable.
https://nothings.org/stb/stb_opus.html
This essentially causes opus to never be used in games or in things in stores that may have issues with specific licenses.
The licensing restriction is unfortunate, but only restrictive for those with very specific goals, under normal conditions BSD is a wonderful license for game devs since you’re free to use the code and only have to add an acknowledgement somewhere.
I suppose a public domain game might hit the same limitation, though as a non-lawyer I would guess the chance of anyone with standing trying to sue anyone implementing from this spec is realistically zero (though I don’t fault stb for being unwilling to roll those dice!)
And it's not as though libopus is an outlier in using a BSD license. A lot of other commonly used libraries have similar licenses; a few examples that come to mind which are likely to show up in games are zlib, curl, Lua, and SDL.
https://www.audiokinetic.com/en/community/blog/a-guide-for-c...
The intent of the legal language in that spec is pretty clearly that you have to use the BSD license if you copy that code, but if you merely read it to understand the spec then you don't.
>Clean-room design is usually employed as best practice, but not strictly required by law.
As the article points out, if this was actually true then we could change the licensing on code examples found in RFCs to fix the issue, but there doesn't seem to be any actual issue here. Imagine a world where simply reading some code caused licensing issues...
Been around a lot longer than Claude Opus.
I take it you mean this Opus (https://en.wikipedia.org/wiki/Opus_(audio_format)) not that Opus (https://en.wikipedia.org/wiki/Claude_(AI)).
I read almost all the way through your comment thinking there was a decent probability you were saying this new AAC encoder was written with Claude Opus.
You don’t need to be in the audio codec dev space to have heard of one of the most widespread audio codecs of the last decade (used by YouTube, WhatsApp, SoundCloud and added to WebM in 2013).
So maybe Core Audio will continue to be the best when TVBR is available, but I'm hopeful the new FFmpeg encoder will be "good enough", especially if more folks find and contribute problem samples to help tune it.
(1) Lossy codecs are transparent at half the file size (or less) of FLAC/ALAC.
(2) AAC (strictly, AAC-LC) is universal, where FLAC and Opus are not yet there.
I don't know what PNS is, but I bet this has been bothering someone's niche use-case for 20 years
Is 48kHz really the standard nowadays?
Abstract:
> A sampling frequency of 48 kHz is recommended for the origination, processing, and interchange of audio programs employing pulse-code modulation. Recognition is also given to the use of a 44.1-kHz sampling frequency related to certain consumer digital applications, the use of a 32-kHz sampling frequency for transmission-related applications, and the use of a 96-kHz sampling frequency for applications requiring a higher bandwidth or more relaxed anti-alias filtering. This revision further quantifies the preferred choices for higher sampling frequencies.
Edit: From my personal perspective, 44.1kHz is a legacy minor annoyance
44100 Hz had reasons no longer really needed (storing audio in 3 samples per line in VHS: 490 lines × 3 samples × 30 GPS = 44100 sample/s).
Qualitywise both are more than enough snd 99.99% of people would not be able to tell it apart in a blind test. Higher sample rates than 48kHz only needed when you want to pitch down ultrasonic recordings (of whales, bats and other such animals for example).
Aside from this higher than 48 kHz sample rates may have only downsides, like increased size and potential distortion in the ultrasonic frequency range that has sidebands in the audible range. Yet there is a persistent, but unscientific "more-is-better"-crowd in the HiFi-sector.
44100 was chosen for CD, as 20kHz upper limit of human hearing, doubled for Nyquist theorem, plus a 10% guard band so that anti-aliasing filters don't have to be made of magical fairy dust, plus a bit (maybe to make it relatively prime with something else in the system).
The first digital audio systems encoded the audio as a black-and-white video signal on video tapes. 44100 HZ was selected at it was the highest sampling rate achievable on both NTSC and PAL video tapes.
There are numerous use cases for higher sample rates that go beyond this but it's hard to talk about it without starting flame wars filled with junk science.
This was of course fixed in Opus.
44.1kHz, isn't that what lameMP3 uses as default?
- CBR only
- Only optimized for 48khz sampling
Not being able to do quality-based variable bitrate encoding is a major gap, and since all of the CD audio in the world is at 44.1k sampling, that seems like a huge miss too.
>>...use 48Khz if you want the best quality.
>Yet most of the worlds audio is 44KHz...
It is not possible to convert 48 khz to 44 khz without approximation. And there is incredible room to design filters that have great response at frequency X but terrible at a nearby frequency, since most of filter design is about where to stash the noise. That noise can add perceptible beats to audio.
And don't try some silly Nyquist limit stuff - none of that is actually correct in actual filtering. The initial simple reasons are that that stuff assumes infinitely precise, mathematically perfect sample values - impossible since these are PCM. They assume infinitely periodic inputs, also false (and there's an entire industry of trying to find window functions to smooth lack of periodicity, also with flaws and tradeoffs). For perfect reconstruction, they use sinc, which has infinite support, which is not computable. So people think they'll use some windowed sinc, which again then fails to do reconstruction fully.
After these ancient, and in practice lacking, ideas, modern filter theory and practice has invented generalized sampling, which has provably (from math and in practice) better signal reconstruction. And even that is only the tip of an iceberg of knowledge.
These codes don't simply "work in the frequency" domain as if this is old school DFT stuff. Even in that domain, your claims don't work. These codecs also do psycho-acoustic modeling, to be able to decide which data to drop, alter, increase, or decrease, to get following bitratres to encode at target. Again, these type of filters and models can be terrible at 44, but awesome at 48.
So yes, they do need to test before putting this into the world's most used by far audio/video transcoder.
So yes, is is cynical, apparently driven by ignorance.
Its the same with speakers and headphones. People think its the component quality, but it’s mostly competency in overall audio physics and the ability to tune well.
AAC-LC, the earliest version of AAC has been declared as patent free or all patents expired by Redhat for many years already.
AAC-LC was always designed for 128Kbps+ in mind. There are other AAC like HE-AAC and xHE-AAC aiming at lower bitrate.
The current best AAC-LC encoder is done by Apple's Core Audio and most people uses it via qaac. I had always wished Apple to open source it. But now we don't even need that to happen.
The test was done with CBR. So this is extremely promising. Assuming the author is willing to spend more time for VBR I am sure there are plenty of room for improvements.
I wonder if the code follows FFMPEG as LGPL2 or could there be a BSD version.
For music, there is very little reason not to use 256Kbps AAC or even higher bitrate. You get maximum compatibility with near no loss of quality. Last time the group listening test there were only a few samples where 256Kbps AAC-LC failed to match Opus.
Youtube did switched to 256Kbps AAC for a while. Only to returned back to 128Kbps Opus.
I hope there can be further improvement to be made with the encoder.
Link should be: https://hydrogenaudio.org/index.php/topic,129691.0.html
Our software follows redirs and somehow we got a 302 to our own IP. Perhaps it is someone's idea of a bot detector?
* quick email to HN@ycombinator.com with a "Help Me please!! and link ( mods can edit link in and sideline (hide) these comments )
* Just live with the rotting fish head of public boo boo (we've all made mistakes, as the Dalek said whilst climbing down off the dustbin)
* I can kill the whole thing dead.