Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The biggest advantage for having a good AAC encoder isn't efficiency, it's that for nearly the past 2 decades the de facto standard for live streamed video has been RTMP with H.264 video and AAC audio. There is basically no support for any other codecs. If you want to send a video stream to Youtube or Twitch, you will be sending H.264 and AAC. If you want an idea of how ubiquitous this is, I just checked in OBS and it will not even let you select different video and audio codecs in streaming mode, it just (correctly) assumes that anybody who's streaming will be streaming H.264 and AAC.


YouTube actually supports H.265 and VP9 ingest, depending on the streaming protocol. I can actually stream 4K@60 H.265 from my Mac Studio with < 5% CPU usage due to the hardware encoder support in OBS.

https://developers.google.com/youtube/v3/live/guides/ingesti...


Nice, glad some sites are finally trying to move forward. It looks like they only support H.265 video with AAC audio, so this should still be helpful for people who are streaming H.265. https://developers.google.com/youtube/v3/live/guides/hls-ing...


yeah I use vp9 with opus for uploads by choice, it's great!

YouTube serves vp9 but it always re-encodes my videos as AV1. Annoying.

(I would upload as AV1 but the encoder is slooooooooow.)


> (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.


Also the fact that hardware-accelerated AAC and even full AAC offload is ubiquitous in modern-ish hardware. I think my rice cooker can play AAC audio


No one really offloads AAC, apart from Apple. Opus can be decoded on very cheap microcontrollers entirely in software using the reference library.


There absolutely does, Android did with low power audio. They even goes a step further by offloading bluetooth processing into DSP.

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.


You might be referring to this but on top of hardware decode some Bluetooth setups can send the actual AAC file to the headphones and decode it there.

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).


On a microcontroller doing nothing else sure. But on a phone, a tablet, a laptop, you absolutely want hardware decode to preserve your battery life.


That's their point though. Basically no modern phone/laptop/tablet other than Apple offloads audio decoding (of any codec) to hardware. You can check this on Android phones by installing the Codec Info app.


Snapdragon chips do (used in many/most androids), Samsung own exynos also does iirc.

If the OS/platform doesn't use it that could be another thing, but those chips do offer audio coded decoding, including aac


Yeah no. All chips in computers, tablets, etc. have hardware decode. Intel chips have hardware decode. AMD, Arm, Raspberry Pi, what have you.


I’m pretty sure no x86 chip has hardware decode/encode for audio. Together with dGPUs, they tend to have decoders for JPEG and decoders/encoders for H.264, H.265, AV1 and sometimes VP9.


They have hardware decoders for JPEG? I have never heard of this and it seems overkill considering how simple it is to decode.



There’s also https://en.wikipedia.org/wiki/Intel_Quick_Sync_Video#Hardwar...

Seems like Nvidia doesn’t support JPEG in NVDEC.


Audio decode is extremely cheap. It's true that a hardware implementation will be more efficient, but really not a whole lot more.


on a 30MHz microcontroller


Sample accurate editing is with AAC is a pain though. Especially if you also have video, because frame rates are usually incompatible.

If you want flexibility without fully transcoding both audio and video, Opus is your friend


Editing with any playback-only format like AAC or H.264/5 is a pain.

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.


Opus is your friend as long as the software you’re using supports it—besides, Apple’s AAC-LC can beat out Opus in low bitrates scenarios.

Whether you like it or not, AAC is still the standard.


Plus, at 96+ kbps (assuming an Apple-quality AAC-LC encoder) Opus loses its quality advantage. So at higher bitrates, the benefit of choosing Opus is that encoders/decoders are royalty-free.


Am I reading that chart wrong? I see Opus ahead across every bitrate.


The evaluation tools used are helpful for encoder development, but at best they're imperfect proxies for human perception, and their predictions are often inconsistent with the human experience. I assume that statements like "apparently the best AAC encoder" aren't meant to be taken too seriously, since everybody who does this stuff knows that ABX/MUSHRA tests with real humans is what tells the tale.

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.)


That paper was published in 2014. The reference Opus encoder has certainly had a number of improvements that affect sound quality since then, whereas very few AAC implementations have.


> The reference Opus encoder has certainly had a number of improvements that affect sound quality since then…

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).


>So at higher bitrates, the benefit of choosing Opus is that encoders/decoders are royalty-free.

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 ).


The RTMP protocol comes from Adobe Flash which only supported a limited set of codecs, the only still useful ones being H264 and AAC. Nobody published the needed protocol extension "enhanced RTMP" until 2022 and it still isn't supported widely. RTMP is not a generic container for any codec, like Mastroska - RTMP is tightly coupled to the codec.


I think often of how all it would have taken was a bomb for the 10 or so people that years ago at some browser vendor consortium out of pure self centeredness went „nah lets fragment“. We could have saved many many collective years, electricity and eyeballs simply watching the most basic content.


At one point in I think 2012 three of us who normally all live in different countries were riding in the same car in Australia. We advised the driver to be extra careful (she was dating one of us, so incentives were aligned).

But it is nice to hear that you have been thinking of us, too.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: