Hacker News

Favorites Setup
Comment by HugoTea | original | FFmpeg 9.1's new AAC encoder
[−]HugoTea · 2026-07-01 Wed 17:12 UTC · link
>FFmpeg's AAC DEcoder is busted with regards to stereo PNS, and the bug may be in other AAC decoders too, so we work around it in the encoder. Since no other encoder used PNS, the bug was not found until now.

I don't know what PNS is, but I bet this has been bothering someone's niche use-case for 20 years

[−]mcoliver · 2026-07-01 Wed 17:25 UTC · link
[−]dcrazy · 2026-07-01 Wed 18:20 UTC · link
Hah, this sounds like the audio equivalent of Netflix’s grain reconstruction.
[−]BoingBoomTschak · 2026-07-01 Wed 19:30 UTC · link
Netflix's or AV1's FGS?
[−]dcrazy · 2026-07-01 Wed 20:39 UTC · link
Netflix developed it as a member of AOM.
[−]lesscraft · 2026-07-01 Wed 18:49 UTC · link
The issue was twofold, on one hand, using TNS on top of PNS meant the noise that got inserted was shaped by TNS, which is nonsense since the decoder generated the noise, not the encoder. This made PNS explode. The second, biggest issue was that using PNS in combination with any stereo tools resulted in noise leaking in both channels equally, ruining stereo imaging. So the best and only thing to do was to enable PNS only if the band in both channels is noise (or is sufficiently non-tonal and masked).