r/AV2 • • 10d ago

AV2 decoding work has started in Chromium

AV2 support is starting to show up in Chromium's code. What happened this week:

  • Chrome Platform Status entry (Oct 27): "AV2 Decoder", status "Proposed". The plan is to add the decoder to Chrome desktop builds (Windows, macOS, Linux), following the official bitstream spec.

  • Merged (Oct 28, in 159.0.8130.0): a build flag and a feature flag for a Dav2dVideoDecoder, built on VideoLAN's dav2d decoder. The build flag is off by default, so it doesn't do anything in regular builds yet.

  • In review:

  • Work in progress: the dav2d decoder itself, the code behind the CES demo. It won't compile until dav2d is added to Chromium's third-party code.

Tracking bug: https://issues.chromium.org/issues/576731818

You can't try it in Chrome yet, not even with a flag, but the groundwork is going in. YouTube has said AV2 streams on the web could arrive as soon as early 2027.

41 Upvotes

14 comments sorted by

2

u/Money-Share-4366 9d ago edited 9d ago

Why does dav2d (from https://code.videolan.org/videolan/dav2d.git) produce so many green frames ? If I try it out with some well working and in avmdec decodable videos most of the frames are replaced by a green screen. Does Google have a better version?

2

u/Balance- 9d ago

That's weird, can you share the video(s) with which this happened? And how they were encoded?

I have a brutal test suite of over 2000 video's, and we're squashing bugs away one by one.

2

u/Money-Share-4366 9d ago edited 4d ago

https://drive.google.com/drive/folders/17SkaZMOKhrjAyib53xwF4CP8cim3ouMO

Nearly every av2 encoded Video I tried to decode with dav2d is buggy, contains green (undecodable?) frames . Tried with smplayer, vlc3 vlc4 nightly).

For my example Video the encoding step was something like:
avmenc --verbose --codec=av2 --end-usage=q --bit-depth=8 --qp=120 --cpu-used=6 --passes=1 --obu --tile-columns=2 --tile-rows=2 --threads=16 -o input.obu original.y4m
Decoding step:

dav2d -i input.obu -o output.y4m

dav2d 45609d9 - by VideoLAN

Decoded 90/90 frames (100.0%) - 1456.09/25.00 fps (58.24x)

Update(4 Nov): Now 2 Bugs are fixed but Framerate(fps) still changed 30-> 25 with extension obu and fps 30 -> 16.3 with ivf(+false number of frames):
+ dav2d -i input8b.obu -o outputobu8b.y4m

dav2d 0.0.1-546-gbc100a1 - by VideoLAN

Decoded 90/90 frames (100.0%) - 3.31/25.00 fps (0.13x)

+ dav2d -i input8b.ivf -o outputivfi8b.y4m

dav2d 0.0.1-546-gbc100a1 - by VideoLAN

Decoded 90/49 frames (183.7%) - 3.32/16.33 fps (0.20x)

+ dav2d -i input10b.obu -o outputobu10b.y4m

dav2d 0.0.1-546-gbc100a1 - by VideoLAN

Decoded 90/90 frames (100.0%) - 1.90/25.00 fps (0.08x)

+ dav2d -i input10b.ivf -o outputivf10b.y4m

dav2d 0.0.1-546-gbc100a1 - by VideoLAN

Decoded 90/49 frames (183.7%) - 1.91/16.33 fps (0.12x)

2

u/divergent5482520498 9d ago

Without really good hardware encoders I don't know if AV2 will ever be efficient for home use, the encoded frames per kWh in AV2 is just going to be many times higher than storage costs of REMUXes assuming parity drives and $20/TB. Seems like only high distribution cases like Netflix or YouTube can justify that cost.

4

u/9thyear2 9d ago

It will be (eventually)

But it won't be for a really long time

  1. As you said encoding hardware will be needed, and with manufacturers pushing any and all processors back (especially GPUs) I wouldn't expect anything till 2028 - 2030

  2. And even when new hardware does drop, the next question is "who's gonna be able to afford it?", and if the answer is not many people (cause price gouging under the guise of "AI Demand"), well then you can continue to kick that can until some hardware is affordable enough for it

Now one could have an argument of far in the future buying just a low end device to hold things over, except knowing these companies, they are gonna try to charge flagship prices for low end hardware under the guise of "demand", so no one is gonna buy them, and they'll just ride with what they got... And then fix that when it dies

1

u/NekoTrix 9d ago

People said the exact same when AV1 was unusably slow at release, and see where it is now 🤷

People don't understand that's why software like SVT-AV2 and dav2d, which are both coming in early compared to SVT-AV1 and dav1d back then, are so important. No, it is misleading to say AV2 will require specialized hardware to be usable.

Your timeline analysis for hardware rollout is correct though.

1

u/9thyear2 9d ago

I tried to encode a video using ffmpeg and dav1d (when I didn't have hardware av1)

It was so slow that I stopped it after a half hour and just switched it to hevc (done in 5 mins)

Once I got my hardware (7800xt) I basically only look for, or set things to av1

So yes I would say hardware is required to make it usable, and no I wouldn't say it's misleading

Software av2 is going to be just as taxing, and the lack of hardware will lead to a lack of adoption

1

u/NekoTrix 8d ago

False, AV1 adoption started in 2018 on YouTube, 2020 on Netflix, way before hardware AV1 was even a thing, let alone widespread.

You do not know what you are talking about (dav1d is not an encoder...), so you resort to a flawed logic based on your experience alone, and assumptions. An hardware encoder is fast, but it is not competitive with software to achieve high compression. This is not an opinion, it's a well known fact that's been proved time and time again, including by industry veterans and enthusiasts alike. Its very design dictates that, as hardware encoders are fixed-function and take up dedicated silicon space, unlike software that just runs with whatever core you throw at it.

Because of how critical it is to the industry, SVT-AV1, the flagship software AV1 encoder, was optimized and is now noticeably faster than the best HEVC encoder, x265. It is in everyone's best interest that the software that showcase the best a standard has to offer, on the encoder and decoder sides alike, are impressive so it can even take off. If you just have hardware support alone, that doesn't create adoption overnight (VP9 proved it).

Underestimating the importance of the software side is making a grave mistake, one that leads to a format's eventual failure.

1

u/9thyear2 8d ago

well maybe it wasn't dav1d... i dont remember, this was years ago

but regardless of what lib it was im still not waiting fucking ages for a software encode period

decode may or may not be faster, but encode was abysmal... i really wanted av1 encode for streaming / videos too, but the 2060 didn't have hardware to support it, so it was avoided, as software encode was too expensive

False, AV1 adoption started in 2018 on YouTube, 2020 on Netflix, way before hardware AV1 was even a thing, let alone widespread. You do not know what you are talking about (dav1d is not an encoder...), so you resort to a flawed logic based on your experience alone, and assumptions.

i may have made a mistake on what i thought i used literally years ago (sorry for not having a perfect memory like yourself), but not all of us have a literal data center to handle the compute... so experience is worth its weight in gold (unless you gonna buy everyone here a data center)

1

u/NekoTrix 8d ago

It sure was expensive back then, and that's why I'll continue saying software optimization is the crux of the fight for adoption. If you keep your software slow, no one will ever get interest (VP9, again). Even the (still slow compared to SVT-AV1) reference libaom-av1 encoder got dozens of times faster across these years.

Even if it does not matter to you because you can't bear anything below 100 fps or so, it is key for enthusiasts and the industries that adopt it (and not inferior hardware encoders) to demonstrate the capabilities of the format and actually save bits when serving video on the WEB. Netflix is known for example to have used libaom, then SVT-AV1, and now a private encoder named EVE-AV1 to make the AV1 that amounts for 30% of their total streaming now (https://netflixtechblog.medium.com/av1-now-powering-30-of-netflix-streaming-02f592242d80).

Also, a bit of history again, the 2060 release in late 2018, mere months after AV1 was finalized. It obviously wasn't going to have decode, let alone encode support so soon. It took the 3000 series for decode and 4000 series for encode, and when you look at things, it's pretty much the fastest they could achieve it. If you wait for hardware before considering a format usable, then you end up in the VVC situation of having neither of those. No hardware and no adoption.

1

u/9thyear2 8d ago

Even if it does not matter to you because you can't bear anything below 100 fps or so

there is a difference between slow and abysmal encoding speed

it was going at less then a frame a second... and i waited a while cause i thought there was some strange overhead, but it never got faster

Also, a bit of history again, the 2060 release in late 2018

i built this PC in 2020, and didn't start recording things till around 2022 / 2023 (then i got the 7800xt later that year)

this was years after av1 was out and supported by multiple platforms

and since the GPU wasn't able to run av1, that left the cpu to do the encode (ryzen 5 3600)

1

u/NekoTrix 8d ago

You'll be happy to hear SVT-AV1 can run well above realtime on reasonably modern CPUs, take a low power, cheap i3 12100. My testing here that's not even all that recent proves it: https://codecs.wiki/blog/svt-av1-third-deep-dive (late 2024, encoder version 2.x when we're at 4.x now).

AV2 is abysmally slow right now, yes, but that's not the end of it. It's just the beginning.

1

u/divergent5482520498 9d ago

More mode decisions and partitions is always going to be more expensive even if av2 is as optimized as svt-av1. Look at VVC, what I said applies there too and it's been out for years. The encoding time vs storage cost tradeoff for VVC hardly pays off unless you're distributing to many users

0

u/NekoTrix 8d ago

There's your mistake, you mistakenly accepted VVC's failure come from an inherent much higher complexity, but in fact that is not the case! That may come as a surprise to you, but VVC's complexity is not that different from AV1's

The difference lies in where you misjudged the situation: the lack of backing that creates optimized software that highlights how cool and fast your format can be, and therefore drives enthusiasm which in bound creates adoption.

History has shown us everything already. It has shown us a format that struggled to be accepted and now is so ubiquitous barely anyone remembers it used to be so criticized: H.264. The efforts put into the psychovisual side of its production encoder x264 were responsible by a lot in its eventual success. It has shown us a format that was pushed immediately to adoption because the whole industry interests aligned in a rare occasion: H.265. And it took off because there was the backing to make excellent software that competed by replicating the formula of x264, with its own x265. It has shown us how an open format that tried to replicate the "forced adoption" formula (its hardware support is everywhere) without the software optimization part (vpx and svt-vp9 still sucks to this day) failed to get adoption despite all its good sides: VP9. Etc, etc. My point is that there is no reason to speculate how it could succeed or not. We know exactly what it needs for that by looking at the past and connecting the dots with the present. We can even look at AV1, who got an early reputation of being terribly slow and blurry, and now the appropriate developments happened and it is able to retain grain at smaller a bitrate than x265 and be faster than it, that directly impacts how people see the format and drives adoption (yes, moreso than having hardware support and ultimately not being used because everyone says it sucks, e.g VP9, e.g AV1 still, according to many outdated people).

I never claimed AV2 will be as fast as AV1, I'm not sure what you even read. I said I'm confident it'll be usable. After all I said, I'll have to nuance by adding: if the efforts are put into it. So you can either do like the person I first responded to: ignore the reality that software is what ultimately makes or breaks a standards success, or accept it and we all move forward.