FFmpeg 9.1's new AAC encoder(hydrogenaudio.org) |
FFmpeg 9.1's new AAC encoder(hydrogenaudio.org) |
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...
If you want flexibility without fully transcoding both audio and video, Opus is your friend
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+.
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!)
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.
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?
- 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...
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
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.
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).
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?
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're using libaom, try switching to libsvtav1. It's still slow, but it's slooow instead of slooooooooow.
But it is nice to hear that you have been thinking of us, too.
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.
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.
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.
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).
It just feels wrong when HN commenters downvote comments that try to clear up legitimate confusion.
I’m not in this space anymore but as of Android 5-6 era aac and bt is offloaded to hexagon dsp on qualcomm device.
Traditionally Bluetooth audio meant decoding and reencoding it into a crappier codec before transmission. So it's an efficiency and quality win.
I think some Google Pixel Bud Pro earphones do this for Opus but that is rarer (there's a few other codecs that have been done like this over the years by different manufacturers).
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.
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.
I think that's really the question with this work: up-sampling to 48k, not down-sampling to 44.1k.
No matter the process, whether naive fourier transform based, or any possible algorithm that is smarter and tries more things, it cannot make up the true values in all cases, since that data is simply not in the signal.
Ancient methods treated sound as a sum of band limited pure sinewaves, which it is not, and you can claim you reconstructed up to that model, but it's pretty bad, and fails even theoretically for the reasons I posted elsewhere.
So you then start doing all sorts of signal processing, but none can actually reproduce all sounds, and most (all?) methods make tradeoffs - what error do you accept for what gains?
And if you optimize a system for one rate, and don't do it to cover all other sample rates you want to handle well, then you will make some rates worse and some better.
Well designed signal processing has to be careful to handle all the ranges it cares about.
And no one who knows or has worked in these areas would simply drop in a new system that is untested for major uses for such a widespread tool as ffmpeg. Precisely because they understand the nuances in these things.
On Opus vs. AAC specifically, there's a long history of studies like https://www.researchgate.net/publication/301428302_Perceived... to help answer that question. (There are interesting charts at the top of page 1175.)
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 ).
Our software follows redirs and somehow we got a 302 to our own IP. Perhaps it is someone's idea of a bot detector?
Your approaches are, ride a comment (as you did, 9 hours, no response, likely didn't read) or lean on a frequent flyer (the only privilege I have is increased ability to [dead] obvious spam not caught by filters - but it gets my emails seen)
I sent them an email in past minute - Good Luck! (YMMV)
* 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.
But all the advantages come down to professional or editing use cases. There's next to zero advantage to using it as a storage format for listening. Just like 24 bit audio (do you have an amp with 96dB SNR?).
Just personally, I have seen little evidence (personally, professionally, or academically) that there is any advantage for lossless audio for consumer applications. For professional applications there are plenty, and it's endlessly tiring to convince people that "no, actually I need 96kHz for my use case."
Where the audiophiles have _some_ argument here is the design of reconstruction filters which I've heard alleged can perform better in the audible frequency range if the stop band is outside of it. But I have never personally tested this, nor cared enough to. But the theory is sound.
Whether or not it's perceptible depends on what you're measuring, though. In theory, there should be perceptual differences in sound localization if your DAC's reconstruction filter is at 24kHz vs 48kHz since it will change the group delay in a critical frequency region, where you'll get sound at >~2kHz arriving later at the lower sample rate. I think it would be extremely hard to test this though, because humans are really shitty at sound localization to begin with, and practically speaking most recorded material is processed to shit in that frequency range to intentionally decorrelate the channels for the perception of "width."
This a truly bizarre statement. On the one hand, of course higher sampling rates are lower latency for the same block size measured in samples. But all sampling rates have (almost [0]) identical latency for the same block size measured in time and lower sampling rates allow less computation for those shorter blocks.
[0] If you are concerned about needing to know future samples in order to calculate the actual signal amplitude at a time between samples, then (a) this matters less at higher sampling rates and (b) this is at most a small number of samples and we're talking about block sizes that presumably exceed, say, 5, so this isn't really a big deal.
I think the advantage of lossless audio is for archival: rip once, archive as lossless; then you can reencode your library with the latest and greatest lossy encoders over time, or just use the lossless if your player can manage it, cpu and storage is less of a limiting factor for players than 20 years ago.
I don't know how many people are actually managing their libraries these days though, so I dunno if makes a huge difference.
And if your goal is latency, it makes far more sense to change the block size rather than the sample rate.
> But all the advantages come down to professional or editing use cases.
That sounds about right.
Unless you also have a pretty decent monitoring system the group delay of the speakers isn't going to be consistent so the filters before them wouldn't matter all that much...
Even in that case I would have a hard time believing that any human in a blind test would be able to perceive a group delay of even 360deg above 2k...
You are talking about sub milliseconds differces in the time frequency content arrives at the ears, just tiling your head slightly will have a greater impact...
But for the end result 48kHz is more than necessary. I can’t even hear any frequency above 17kHz.
For capturing analog signals, 2.5X is enough headroom.
The 5X recommendation is probably for digital signals where the frequency refers to the baud rate, not the highest frequency coming through. A fast switching digital signal will have components with higher bandwidth than the fundamental. Using a higher multiple of samples (assuming the bandwidth is there) will let you see the shape of the waveform and rise and fall times better.
And even if you could, would the frequencies that all humans lose with age really be all that essential for the enjoyment of music? We are talking about frequencies most instruments won't even produce unless severely abused.
For some reasons in audiophile-land the magic is always in some elusive outer realms and never right there where the important stuff happens. They spend a fortune on speaker cables, while often not giving a second thought on room acoustics beyond the cosmetic. The magic sparkle is all the way in the ultrasonic, while their listening spaces have deep nulls in the mid-range due to comb filtering from reflective surfaces caused by a lack of acoustic treatment.
I love music (enough to have mixed it for a living) and to me it is very clear how the priorities are ordered when it comes to audio fidelity:
1. Room Acoustics
2. Speakers
3. Electronics & Digital
Going from the back: Assuming you don't get the cheapest of the cheapest and don't abuse the gear by making it do things it wasn't build for electronics and digital audio nowadays is transparent. That means, it essentially sounds the same if operated within spec. Even a 0,50 € IC will have distortion figures so staggeringly low it is below human perception and equipment is getting better still. A decent opamp can have distortion figures like 0.005 % THD with a linear frequency response all the way up to radio frequencies. There can be challenges with driving very weird speakers or headphones, but if you hsve the right combination of gear it doesn't have to be expensive to be indistinguishably good in it's audio performance.
This means speakers are way more important thsn the electronics before it. Their distortion numbers are multiple magnitudes higher (in the ball park of 3% THD), their frequency response is inherently problematic (often many dBs up and down even in expensive speakers), they will hsve different beaming characteristics st different frequencies, small speakers lack bass, placement is essential, etc. So getting good speakers is important.
But all of this is dwarfed by the impacts acoustics. The position of the speakers alone makes a huge difference. The impact of an acoustically untreated space is severe: you can get a completely smeared time response with deep nulls of 20dB and more while other frequencies are highly resonant. Even a budget speaker won't have problems of that magnitude.
So get some ok electronics, even more ok speakers, but invest the bulk of the money/time into the setup of the room itself.
Many adiophiles have that priority list reversed. Room acoustics suck. You need to measure a lot, add ugly absorbers in inconvenient places, can't place speakers where they look nice and conserve space, but need to place them where they work well acoustically, there is no ideal solution and everything is a compromise. So buying a gold plated HDMI cable and imagining the improvement appears to be better. Only that you might be doing it in a room where a positional difference of a few centimeters changes the frequency response of the listening position massively.
Yes, but not for high-bitrate music applications.¹ For example, Opus 1.2 really improved the quality of music encoding at 32–48 kbps. Opus doesn't have to be great at everything to be great at what it does, just like AAC-LC doesn't have to be. (¹Opus 1.6's experimental Opus HD looks very promising for this!)
Apple's and Fraunhofer's closed-source AAC-LC encoders have seen regular, minor quality tuning, and they benefit from the research and engineering work that have been done for the AAC family of encoders (HE-AAC for bitrates down to ~48 kbps, HE-AAC v2 to 32 kbps, xHE-AAC below that).
If the OS/platform doesn't use it that could be another thing, but those chips do offer audio coded decoding, including aac
Also to your point, this is why compliant peak meters use a mandatory 4x upsampling at 48k.
https://en.wikipedia.org/wiki/Unified_Video_Decoder added around H.265 in UVD 6.0
Seems like Nvidia doesn’t support JPEG in NVDEC.