Live data from Hacker News

AV1 video codec gains broader hardware support

fullystacked.net

161–170 of 210 posts

Re: AV1 video codec gains broader hardware support

#161

Earlier quoted context omitted.

Chicken & egg problem. No AV1 videos -> no pressure to add hardware support -> difficult to justify encoding videos in AV1

I thought Google was the main one behind AV1. Couldn’t they use their position as one of the world’s biggest video platforms to break that chicken egg loop?

They have. They literally threatened to pull their support from devices if they don't implement the codec in hardware. Roku's spat with Google was a big-ish story when that happened.

I don't know how that can be viewed as a good thing.

Re: AV1 video codec gains broader hardware support

#162
post #31

Earlier quoted context omitted.

> improve upon HEVC on every metrics Color me the skeptic here, but which benchmark(s) are we talking about? Even h264 vs h265 is not a settled matter - if we truly consider every possible metric, including e.g. SW encoding.

I'm interested as to why it isn't a settled manner. In my experience, H265 files tend to strike really nice compression ratios (in the same vein, after an AV1 transcode, I'm typically left gobsmacked). (Or were you talking more about latency? In that case I have to defer to someone with more knowledge.)

h265 has about 20% lower bitrate than h264 at a very similar perceptible quality, but encoding several variants (adaptive streaming) quickly becomes more taxing on the hardware, and support for decoding h264 in hardware is both more ubiquitous and less expensive. As a concrete example, the 2018 generation of Amazon Fire TV sticks supports h265 but gets really hot, so when an adaptive stream offers both h264 and h265, the Fire TV picks the former. We were experimenting with detecting Fire TV serverside to give it a h265-only HLS manifest (the cost savings on the CDN would be sweet), but ultimately decided against it - the device manufacturer probably had a legitimate reason, be it stability or longevity.

I don't quite understand the industry push for AV1. I appreciate that it's patent-unencumbered, but it makes very little sense from business perspective, as you still need to support h264 and/or h265 for devices that can't decode av1 in hardware (and let's agree that forcing software decoding for video should be criminal). So you add a third codec variant (across several quality tiers) to your stack, cost per minute (encode, storage) goes up, engineering/QA effort goes up... Where's the value? Hence my original question, is AV1 really that much better to justify all that?

Re: AV1 video codec gains broader hardware support

#163
post #160

Earlier quoted context omitted.

Shaders have little benefit for anything with "compression" in the name. (De)compression is maximally serial/unpredictable because if any of it is predictable, it's not compressed enough. People used to want to write them because they thought GPU=fast and shaders=GPU, but this is just evidence that almost noone knows how to write a video codec.

That's not really true; the motion estimation stage is highly parallel. Intel's wavefront-parallel GPU motion estimation was really cool. Real world compression algorithms are nowhere close to optimal partly because it's worth trading off a little compression ratio to make the algorithm parallel.

IIRC x264 does have a lookahead motion estimation that can run on the GPU, but I wasn't sure I could explain this properly.

That said, I disagree because while motion estimation is parallel, motion coding is not because it has to be "rate distortion optimal" (depending on your quality/speed tradeoff.) So finding the best motion for a block depends on what the entropy coder state was after the last block, because it can save a lot of bits by coding inaccurate/biased motion.

That's why x264 and ffmpeg use per-frame CPU threading instead (which I wrote the decoding side of) because the entropy coder resets across frames.

Re: AV1 video codec gains broader hardware support

#164
post #24

Earlier quoted context omitted.

+1 Indeed. Compared to other standards in streaming media, I'd say that AOMedia has found adoption a lot quicker. h265 (HEVC) was all but DoA until years after it's introduction Apple finally decided to embrace it. It is still by no means ubiquitous, mostly due to patent licensing, which significantly drives up the price of hardware in single digit dollars price range. Anecdotally, consider that Apple's HTTP Live Str…

> Compared to other standards in streaming media, I'd say that AOMedia has found adoption a lot quicker. h265 (HEVC) was all but DoA until years after it's introduction Apple finally decided to embrace it. Well, there's now H.266 as well: * https://en.wikipedia.org/wiki/Versatile_Video_Coding

MPEG realeased three codecs that year, as well as VVC there was EVC and LCEVC:

https://en.wikipedia.org/wiki/Essential_Video_Coding

https://en.wikipedia.org/wiki/LCEVC

Note EVC and LCEVC are two entirely different approaches to codecs despite the similar names.

Re: AV1 video codec gains broader hardware support

#165
post #118

Earlier quoted context omitted.

That might be, but on (most?) Chromium browsers you have to install h264ify to force-disable AV1/VP9 on devices that have no AV1 hardware decode. What is even more annoying is that you can only do a full disable. You can’t disable AC1/VP9 video decode but leave image decode intact.

What I'm saying is in an ideal world web content should be able to detect whether some codecs are not hardware-accelerated, and so such workarounds should not be necessary. Of course, lots of naive web content might just check if it's supported and use it anyway... but surely the big sites like YouTube get this right? Software decode has its uses - if you just want a small GIF-style looping clip, hardware support doe…

google is far more interested in not paying royalties than your battery life on youtube

Re: AV1 video codec gains broader hardware support

#166
post #139

Earlier quoted context omitted.

What sort of file sizes are you getting for 720p video in AV1? Are there any other relevant parameters that you tweak, e.g. framerate?

It's there in the comment, both my filesize and the command verbatim. I don't do anything else other than what's in the powershell script.

Thanks, not sure how I glazed over that. :)

Re: AV1 video codec gains broader hardware support

#167
post #103

Microsoft Edge does support AV1, but weirdly only through a Microsoft Store extension [1], even though Chrome has support built-in. This actually really sucks because in practice hardly any normal consumers would bother to install a strangely named extension, and so web developers have to assume it's largely unsupported in Edge. Safari ties support to a hardware decoder, which I suppose is understandable to avoid acc…

> Safari ties support to a hardware decoder, which I suppose is understandable to avoid accidental battery drain from using a software codec I still have a pretty deep dislike for Google for turning on AV1 for everyone in Chromium. It’s the ultimate “fuck you, I care more about my bottom line than your user experience”. Edit: and clown HN rears its head again. I guess cutting users their battery life to a third is wo…

Stop using Google software and services if they annoy you so much. Vote with your browsing habits.

Re: AV1 video codec gains broader hardware support

#169

AV1 hardware support is great and all, but what streaming services actually support it? Twitch did a pilot back in 2020 and the video quality was fantastic. They still haven't rolled it out.

Possibly worth noting that the encoding speeds for AV1 have improved out of all recognition over the past few years. Depending on what Twitch were using, even back in 2020 it might have been orders of magnitude slower than encoding other relatively modern formats. Today that is no longer true and in some circumstances encoding AV1 seems to be faster than almost anything else since H264. So if hardware decoding is also improving, it’s certainly possible that more services could potentially use AV1 now or in the near future.

(Source for the above is just some personal experiments. I happened to be doing a load of benchmarking with video codecs this weekend, as we’re hoping to start using AV1 for a website I run.)

Re: AV1 video codec gains broader hardware support

#170

Earlier quoted context omitted.

That looks like a pure marketing slide to me. I don't think it would make sense to actually have separate dedicated silicon for these.

It is a pure marketing slide. The M3 variants floorplans don't look anything like that, as can be seen on other pictures of the dies. That being said, it's pretty common to have dedicated silicon for video codecs. It normally takes the form of a little DSP with custom instructions to accelerate operations specific to the codec.

> The M3 variants floorplans don't look anything like that

Maybe I'm misunderstanding what you're saying, but the slide is of an A17, not an M3 chip.

Post reply on HN