AV1 video codec gains broader hardware support
fullystacked.net
fullystacked.net
I think it's high time the web had a single audio and video codec choice that is both open and widely supported, which is why I've proposed support for AV1 and Opus for the Interop 2024 effort [2] [3].
[1] https://apps.microsoft.com/detail/av1-video-extension/9MVZQV...
[2] https://github.com/web-platform-tests/interop/issues/485
[3] https://github.com/web-platform-tests/interop/issues/484
It may very well be that the troll doesn't have a solid case, but you don't hook any fish if you don't get your line in the water
Also, can't whole AOM pool resources to annihilate those trolls? They'll all benefit from it. So this doesn't make sense.
So while fighting them in court is costly since it requires research of prior art and doing all the necessary work to invalidate those junk patents, it's still often a proper tactic to destroy them.
You can't counter sue Sisvel as Sisvel is just a patent pool, they don't make products.
Expecting more than thousand patents to apply to AV1 is totally bs.
And searching for applicable patents opens you to more liability, so you just gotta go in blind and hope for the best
A very nice initiative!
Feels like we've been lagging behind on development in this area for some time. And with a wider support (in both hardware and software) more actors should be able to enter this field in the future.
I really hope this gets enough traction in a near future!
https://stackoverflow.com/questions/75459594/why-doesnt-edge...
I bet the same licensing issues are also holding back AV1 on edge.
This is extra bad when you consider what Microsoft does to pressure people into using Edge, despite Edge itself being literally Chromium with features disabled.
Jesus wept, this is just a still frame from any of: h.265, AV1, or VP9. Those, or a JPEG XL file.
None of these work in general, especially outside of the Apple moat.
Oh, sure, you can buy a $4000 flagship Nikon camera that can output HDR files in HEIF format, but they won’t open on Windows and look garbled on Apple devices.
This is so stupid now that the iOS version of Adobe Lightroom can edit HDR photos and export them in three formats… none of which can be viewed as HDR on any iOS device! I’ve never ever seen this kind of retardation before — software that is this fundamentally incompatible with the only OS it runs on!
I go on this rant approximately annually. It’s been about a decade. I expect to be stuck using SDR JPG for another decade at this rate.
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 worth it as long as Google saves a little bandwidth?
[1] https://developer.mozilla.org/en-US/docs/Web/API/Media_Capab...
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.
Software decode has its uses - if you just want a small GIF-style looping clip, hardware support doesn't matter much, and it's nice to have one codec that can be relied upon to work everywhere.
A lot of older hardware isn’t _too much slower_ than today’s with the exception of these codecs wasting system resources.
Why do you think so much in browsing has been offloaded to users via JS?
https://b3148424.smushcdn.com/3148424/wp-content/uploads/202...
In practice a combined Av1/H264/etc. decoder core is most likely. A lot of logic would be shared.
The die area is very modest, but the hard part is building it in the first place.
Encoding is more area, but should still be peanuts for Apple SoCs.
There are also likely opportunities for additional efficiencies when you make a custom {en,de}coder for your system. I suspect (but haven't confirmed) that the typical Intel/AMD/Nvidia/Apple multi-function media engine isn't just a collection of completely independent encoder/decoder blocks for each codec but a kind of simplified specialized microcoded CPU with a collection of fixed-function blocks which can be shared between different codecs. So it could have blocks that do RGB->YUV conversion, Discrete Cosine Transforms, etc. and you can use the same DCT block for AV1, HEVC, and AVC. Maybe you can also create specialized efficient ways to transfer frames back and forth with the GPU, for sharing cache with the GPU, etc.
I believe the team we worked with at Arm during AV1 standardization is no longer there, which is too bad. They were really great guys to work with.
Your suspicion is mostly correct, though obviously you cannot share too much of the DCTs as these must be bit-exact and are different for each of the standards. But especially things like the compressed tile cache for reference frames used in motion compensation are extremely complicated (to save memory bandwidth and power) and entirely shareable. The SRAM used for line buffers is also a lot of area and shareable. And so on.
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.
I'm guessing this is a distinct region of the chip and not integrated with CPU/GPU since they scale up by replicating those blocks and wouldn't want to redundantly place that hardware. Having it separate also allows a team to work on it independently.
I think the relative size of the media engines is accurate in that slide, so then it comes down to how large the ProRes parts are in other chips. They are probably a couple of the unlabeled regions next to the performance cores in the M1 Pro die shot below, but I don't know which.
https://images.anandtech.com/doci/17019/M1PRO.jpg Taken from: https://www.anandtech.com/show/17024/apple-m1-max-performanc...
And video decoding/encoding is definitely at least GPU-adjacent, since it usually also involves scaling, color space transformations etc.
Maybe I'm misunderstanding what you're saying, but the slide is of an A17, not an M3 chip.
The A17 floorplan looks nothing like that either.
On a GPU, you didn't have an option to interleave normal program stream with specialized partial-decoding instruction. You put encoded frame in and you get decoded frame back, the media engine was separate block from compute.
Though this is also changing; see Intel GuC firmware, which has (optionally) some decoding, encoding and processing based on compute.
see also:
https://www.thurrott.com/forums/microsoft/windows/thread/you...
Which seems to be claiming the software fallback has been suddenly yanked, temporarily breaking YouTube which fixed it by serving VP9 instead but maybe AV1 hardware decode is still working?
What you see is that they implement different features with Google obviously wanting the browser to be a full blown OS. So they added things like MIDI support and web pages being able to access the battery.
The problem with many of those features is that they have been shown by researchers to either (a) be insecure or (b) allow web pages to uniquely fingerprint your device. This is obviously an anathema to everything Apple believes in.
[1] https://caniuse.com/?compare=chrome+121,edge+118,safari+17.2...
https://stackoverflow.com/questions/75459594/why-doesnt-edge...
Although the thread is about AVIF (the image format based on AV1) I bet the same licensing issues are also holding back AV1 on edge.
https://support.google.com/youtube/answer/7444635?hl=en#zipp...
I have a 3080 so I hadn't the chance to test AV1 yet. Is the latency difference significant as reported by VD ?
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.
https://d1qg7561fu8ubi.cloudfront.net/blog/BD-rate_fiugure5....
Lower and to the left is "better"
Edit: resolution on that graph image is terrible but they've been sharing it for a while in slide decks so you can probably find better quality by following links from here:
https://networkbuilders.intel.com/blog/svt-av1-enables-highl...
Kind of like what AV1 does with film grain or various audio codecs do with filler audio that's roughly the right "texture" even if not accurate to the original signal.
edit: this is on top of the basics all working fast and well. You could argue that many competitors "overfit" to metrics and they had the wisdom or correct organisational incentives to avoid this.
(Or were you talking more about latency? In that case I have to defer to someone with more knowledge.)
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?
As for the business perspective, major streaming services pay major dollars for transferring data. You could probably pay for every part of the AV1 project multiple times over on the money saved by a moderately lowering of Netflix's outbound data.
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 Streaming protocol (till version 6) relied on MPEG2TS, even though Apple lay the groundwork for ISO/IEC 14496-12 Base Media File Format aka MP4. The reason was that chips in the initial Iphones had only support for h264 using mpeg2 transport streams, and even mp4 -> mp2 transmuxing was considered too resource intensive.
No? You're talking in terms of PC / phone hardware support only. HEVC was first released June 7, 2013. The UHD Blu-ray standard was released less than 3 years later on February 14, 2016 - and it was obvious to everyone in the intervening years that UHD Blu-ray would use HEVC because it needed support for 4k and HDR, both of which HEVC was specifically designed to be compatible with. (Wikipedia says licensing for UHD Blu-ray on the basis of a released spec began in mid 2015.)
This sounds like you might be confusing that MPEG2TS might have something to do with the video encoding instead of it solely being the way the video/audio elementary streams are wrapped together into a single contained format. The transport stream was designed specifically for an unreliable streaming type of delivery vs a steady consistent type of source like reading from a dis[c|k]. There is nothing wrong with using a TS stream for HLS that makes it inferior.
Not wrong, but a bit surprising. As you mention, transport streams are designed to operate over unreliable connections (like satellite or terrestrial transmission). Reliability is not an issue with with HTTP or TCP.
Other than being archaic, some disadvantages are that TS has somewhat more overhead than (f)MP4 and poor ergonomics for random access / on the fly repackaging caused by continuity counter, padding, PAT/PMT resubmission timing, PCR clock.
If it were up to me to design a streaming protocol like DASH, HLS, Flash, or SmoothStreaming I'd instantly choose mp4 (or plain elementary streams). I wouldn't even consider TS or PS unless some spec forced me to.
We seem to be confusing what reliable means here. Yes, HTTP/TCP can reliably transmit data in the fact that if packets are missed they will be resent so that you can be assured that the data will eventually be delivered. However, that doesn't do well for real time streaming of data that is necessary to be received in order. That's why UDP was made.
>If it were up to me to design a streaming protocol like DASH, HLS, Flash, or SmoothStreaming I'd instantly choose mp4 (or plain elementary streams). I wouldn't even consider TS or PS unless some spec forced me to.
Well, it's a good thing we didn't have to wait for you to come around and design a streaming protocol and we've been able to use it for the past ~20 years with the technology that was available at the time. Perfect is the enemy of progress.
Sure, but UDP was not part of the HLS draft https://www.rfc-editor.org/rfc/rfc8216
> Perfect is the enemy of progress.
Touché ;-)
What I meant to point out as odd about Roger Panthos and co.'s decision to build HLS on top of Transport Stream containers is that Apple had already laid the foundation for MP4 with QuickTime.
Since HTTP live streaming was never about anything but HTTP, container capabilities like auto-synchronization offered by mpeg2TS were moot. It would therefore seem logical for Apple to build HLS upon what they already had with QuickTime + iso2 fragments. That was more or less the route Adobe/Macromedia had taken with Flash streaming.
Yet, the choose mpeg2TS (initially only muxing AAC and h264). The reason, historically seems to have been driven primarily by the capabilities of the iphone hardware which supported this out of the box! Separate transport streams for audio and video, WebVTT, elementary stream audio were added much later, and fragmented MP4 was introduced only once HEVC was bolted on.
I'm all for favouring what exists over what's perfect; it's just odd that Apple choose to (initially, at least) regress to 90s technology while rest of world had already adopted superior container.
Well, there's now H.266 as well:
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.
(Lack of) a compelling use case certainly played a role. Sure, reducing bandwidth is in itself a noble (and potentially profitable) goal but why fix it if it ain't broken? Ie.: the h264 infrastructure for HD was already there, working fine.
Another factor was that HEVC was full of new patents and the patent pool licensing costs hadn't yet settled.
Really? Muxing generally doesn't require one to decode the actual data - merely shuffle around blocks of data with memcpy() so should be really cheap.
So indeed, repackaging mp4 <-> mp2 containers is pretty trivial. Nevertheless, Apple initially choose mpeg2TS because it conveniently allowed them to shove the reassembled media segments straight into the dedicated AV chip.
The licensing shenanigans of H265 was a big motivator for creating AV1, a royalty free codec.
The person who benefits from a more efficient codec tends to be netflix/youtube (lower bandwidth costs), and they are far far removed from the chipmaker - market forces get very weak at that distance.
Netflix doesn't benefit since their catalog is orders of magnitude smaller.
Luckily the effort behind the David software codecs kept up the rollout momentum.
Well the basic answer is that, making an efficient hardware encoder and decoder, within power budget and die space, all while conforming to standard because you wont have much of a chance to correct it, and implementing it into the SoC design cycle which is and always has been at least three years minimum, is a lot harder than most software engineer at Google and AOM would thought.
HEVC was finalized in 2013. AV1 was finalized in 2018, and has just finally started getting a robust ecosystem of software and hardware.
Basically, it was the push to 4K (and especially HDR) that caused HEVC to roll-out. In 2016 4K Blu-rays started coming out and they were all HEVC 10-bit encoded. It took a couple more years before dedicated streaming devices and lower-end smart TVs bothered to start including HEVC support as standard because at first 4K content was uncommon and the hardware came at a premium.
Now that it's mostly the de-facto standard, we see HEVC support in basically all streaming devices and smart TVs.
AV1 didn't have any sort of resolution change or video standard change to help push it out the way HEVC did, so it's basically rolling out as the parts get cheaper due to pressure from streaming giants like Google and Netflix rather than due to a bottom-up market demand for 4K support.
Apple ships probably more devices than anyone, and given that the patent pool is huge as mentioned odds are overwhelmingly that it costs them money to support HEVC / HEIC, not the reverse. That theory also is dubious.
Remember when everyone was yammering for VP8 support? Then it was VP9 support? Now it's AV1. Sometimes it takes a while to shake out. By all appearances AV1 is a winner, hence why it's finally getting support.
This is a nit that doesn't negate your main point: Apple may ship more complete devices than anyone, but Qualcomm makes up significantly more of the SoC manufacturer market share[1] at 29% vs Apple's 19%
[1] https://www.counterpointresearch.com/insights/infographic-q2...
No AV1 videos -> no pressure to add hardware support -> difficult to justify encoding videos in AV1
Roku's latest devices to support AV1, so I guess either the price came down, they struck a deal, or Roku just lost to the market pressure after Netflix pushed for AV1 as well.
I don't know how that can be viewed as a good thing.
Intel, AMD, Nvidia, and other ARM chipmakers for phones, TVs, streaming sticks and such were quicker to pick it up.
Or maybe we should have written codecs to be amenable towards GPU shader implementation...
To some extent the PS3 did this; the Cell SPEs were fast enough to implement Blu-ray and streaming video playback in software and they made several updates over the life of the PS3.
They are, but programmable GPU shaders are nearly always more power expensive than fixed function purpose specific silicon. It's why many key aspects of GPUs are still fixed function, in fact, including triangle rasteriziation and texture sampling/filtering.
I think, at least, that one of the biggest use-cases for encode is game streamers (is this right?), they should have decent dGPUs anyway, so their iGPU is just sitting there.
Intel used to write hybrid encoders (that used some fixed function and some iGPU shader) for their older iGPUs.
So the answer is yes... if you can fund the right group. But video encoders are hard. The kind of crack developer teams that can pull this off don't grow on trees.
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 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.
So yes, the answer depends most on whether you care about licensing. Both in terms of royalities and also implementations.
--
[1] https://www.mainconcept.com/hevc - for the casual user most easily accessed by purchasing Adobe Media Encoder
I tested NVENC, X265, and DaVinci Resolve Studio’s H265 encoder.
x265 was best by far. What more am I missing on?
Now things like NVENC are even worse in terms of compression. Any GPU accelerated encoder trades compression efficiency for speed. Even x265 with the slowest presets will demolish any GPU encoder in terms of compression, including the MainConcept paid one when it's run in GPU-accelerated mode. This is unfortunately not explained in GUIs like Adobe tools. They just have a checkbox or dropdown to select GPU acceleration, but don't mention that it's not just acceleration - a different algorithm will be used that can't achieve the best compression.
GPU accelerated compression can still be very useful for scenarios where you need speed (e.g. have a deadline) or just don't care about quality (e.g. will publish it only on social media where it will be recompressed anyway). However when you have time to wait and want top quality, the slowest CPU-only code path will always win.
--
[1] One good public resource is the Moscow State University page http://www.compression.ru/video/codec_comparison/index_en.ht... -- They do regular comparisons of various codecs and some results are available for free. A bit in HTML form and more in some of the PDFs. Deeper insights are unfortunately paid.
Seems strange that we have so much compute power in GPU, but no algorithms to use it well for encodes
AV1 is supported by almost all web browsers: https://caniuse.com/av1
And iOS Safari is arguably the most important browser at all since iPhones are disproportionally used amongst video content creators.
This is a huge plus in fansub anime scene. 10 years ago, majority of anime are in H264 (720p/1080p 8bit) which is normally 1±GB for each episode that are consist of 25 min. If I want to watch one anime, it will consume about 20 GB of space. Now, majority of them are in HEVC (1080p 10bit) which are about 300± MB for each episode.
But only a small fraction of users actually create content and need accelerated encode. And Apple especially I think is unlikely to use AV1 for their video recording, given their investment in other formats for that use-case.
I concur. The raison d'être for AV1 is (lack of) patent license royalties. These apply to user devices as well as services. Think Google: Android as well as YouTube cost fortunes in AVC/HEVC licenses, so here AV1 makes sense.
On the other hand, Apple sells expensive hardware and has no problem ponying those licenses. Soon after adopting HEVC they doubled down with Dolby Vision which technically adds very little on top of standard HDR features already available in HEVC and AVC but present serious interop problems for device come with shiny Dolby stickers.
And their encoders (at least on macOS in the past) usually don’t yield results comparable to software or dedicated quality-optimized encoding ASICs, so if I wanted high quality at low bitrates I’d have to reencode offline anyway.
It would be nice to have it available for video conferencing or game streaming, though.
Also note that HEVC had a considerable head start (5 years?) so performant encoder (or even energy efficient decoders) took a while to catch up. Recent ffmpeg versions offer a lot of options, you'll find that even a basic comparison is PhD-level difficult ;-)
Thank you for pointing this out. This thread is a mess of claims at the moment because this simple fact is under-recognized.
There are two accepted ways to compare codecs+settings: either (a) you perform a subjective comparison with the human eye using the same bitrate for both codecs, or (b) perform an "objective" metrics-based comparison where you match measured quality and compare the ratio of the bitrates.
If you're looking only at 1080p SDR 8-bit video, even h264 is already commonly used at bitrates that can approach transparency to the source (visually lossless to the human eye) when encoded well. For example, a typical Blu-ray bitrate of ~30 Mbps can achieve transparency when well-encoded for most sources.
The reason measures like "30%" are misleading is that if you try to match h264 performance at these high bitrates, you won't get anything close to 30% improvement (with HEVC over h264, or AV1 over HEVC). It can be negligible in a lot of cases. In other words, the improvement ratio from increasing the complexity of your media codec depends on the target quality of the encodes used in the test.
AV1 achieves significant improvements ("30%") over HEVC only at the lowest qualities, think YouTube or Twitch streaming. At high bitrates, e.g. something acceptable for watching a movie, the improvement can be much less or even insignificant, and at near-transparency a lot of AV1 encoders actually seem to introduce artifacts that are hard to eliminate. AV1 seems heavily optimized for the typical streaming range of bitrates, and claims about its supposed improvement over HEVC need to be understood in that context.
You're right about VP9 though, definitely faster to decode, though there are trade-offs (video quality, encoding performance) when compared to HEVC.
Here's my script if you're interested in trying it out on your content.
param (
[Parameter(Mandatory=$true)]
[string]$sourceDir,
[string]$destDir = $sourceDir
)
$ffmpegPath = 'C:\Users\sergi\Downloads\ffmpeg.exe'
Write-Output "Starting conversion..."
Get-ChildItem $sourceDir -Include *.mp4,*.avi,*.mov,*.wmv,*.flv,*.webm,*.mkv -Recurse | ForEach-Object {
$newFileName = $_.BaseName + '-av1-720p' + $_.Extension
$destPath = Join-Path $_.Directory.FullName $newFileName
Write-Output "Converting $($_.FullName) to 720p AV1..."
& $ffmpegPath -i $_.FullName -vf scale=1280:720 -c:v libsvtav1 -crf 30 -preset 7 -c:a libopus -b:a 96k -ac 2 $destPath
}
Write-Output "Conversion complete."
And I just invoke it against a folder to recursively convert stuff. .\av1-convert.ps1 -sourceDir 'D:\Movies to convert\'
As soon as there's something that can decode AV1 that's like an nvidia shield I will replace both of my shields. So far nothing like that exists to my knowledge. Even Roku 4k Pro's say "AV1" support in their spec but they still trigger transcoding on plex when doing a playback.https://www.androidtv-guide.com/streaming-gaming/av1-android...
On my shield's I play 4k remux's from a plexshare.
(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.)
It will on M3 Macs and iPhone 15 Pro and Pro Max.
Compared to H.265/HEVC, AV1 has no patents and so anyone can implement it without worrying about licensing (there seem to 3+ groups that need to be paid off).
The trade-off is that it is more computation intensive than H.264 (as is H.265).
Seems that there's now also H.266/VVC:
* https://en.wikipedia.org/wiki/Versatile_Video_Coding
Short 2023 article on H.266 versus AV1:
* https://www.winxdvd.com/video-transcoder/h266-vvc-vs-av1.htm
* Wide browser support.
* High performance open source software decode available on x64 and ARM
* High performance open source software encode available, tuned for multicore cloud encoding
* default support for film grain emulation which alone can save about 30% bandwidth when content requires it.