250 points · by dcgudeman · 4y ago · 213 comments
As comment 19 of the bug report says, "This bug is not about to implement HEVC in Chrome", and "Chrome does already support the native HEVC decoder for progressive download videos using the HTML5 <video> tag on Android". The issue description notes that as of Feb 2015, "Playing plain HEVC mp4 files in Chrome/Android/Nexus5 works fine".
This new fix just corrects the handling of HEVC in the Chrome's Media Source API (formerly known as "Media Source Extensions").
<rant>On the other, I'd prefer to not see further adoption of HEVC and instead see increased deployment of VP9 and AV1 wherever possible. Let MPEG-LA and the other HEVC patent pools+holders... well I'll leave the rest to your imagination. Future looking, no one should even touch VVC/H.266.</rant>
Unfortunately the above rant does not address the gap in hardware support between HEVC and AV1 for efficient accelerated decoding. Codec support is a difficult game to balance. I'm hopeful that by the time AVC/H.264's patent pools fully expire later this decade we'll all have moved on to newer and better (non-royalty patent-unencumbered) things.
(That said, I agree with you. I think a codec being royalty free is a very good reason to prefer it to other codecs.)
Keep in mind that upwards of 95% of people will read comments but not post any themselves (and to address an obvious retort, sure, it'll be a different 95% for each submission). So the general "tone" of the comments absolutely impacts public perception, especially now that practically no-one consumes straight-news without social media commentary.
Redditors use identical arguments: "we're different people!" when their website is the most groupthink-y of all.
I think maybe you're responding sarcastically to yourself while eating this burrito.
Just reading about the historical context of AV1 it all feels like huge dirty lawyer battles involving troves of money thrown around, with the user as a hostage indirectly footing the bill in the end so we can't just ignore all the drama.
I would want to side with Google on the open side they seem to be championing, but there's no way it doesn't come with huge side effects that we will pay sooner or later.
All to say, it's looks like a complicated enough matter that opinions will be devised and all options might not be great, some just being more acceptable than others.
Well, you know how it is, some complaints are wrong and some are right.
However, pirates do care about file size and quality, as demonstrated by the adoption of 10-bit H.265. So AV1 should be coming, eventually.
There is surely a lot of low-effort GUI handbrake encodes online. But most of the """well-respected""" piracy groups put a surprising amount of effort into filtering and such to correct artifacts, both due to the compression and due to the source material itself.
A lot of these people are using tools like VapourSynth with a variety of scripts they've put together and x264 or x265 directly rather than ffmpeg. The scripts themselves are typically Python, but often rely on loads of native modules. You can see a couple of guides about some of the processes they perform:
- <https://silentaperture.gitlab.io/mdbook-guide/introduction.h...> (all video content)
- <https://guide.encode.moe> (anime-focused)
And some links to the kinds of filtering code pirates write for movies/tv/anime:
- <https://git.concertos.live/OpusGang/EncodeScripts> (MANY VapourSynth and AviSynth scripts for both live-action content and anime)
- <https://github.com/Beatrice-Raws/encode-scripts>
And while not directly related to the encoding side of things, but if any of that is interesting, in addition to the encoding side of things, pirate fansubs also get pretty complex, particularly for anime since, unlike the unstyled SRT subs most people come across for foreign movies online, anime fansubs tend to use ASS [1] subtitles with lots of styling to accomplish things like cleanly replacing Japanese text in a letter someone is reading or adding non-distracting subtitles for background text (e.g., signs on buildings, etc) [2].
To do a lot of that, though, these subtitles often pack fonts into the video container to allow the media player to render things as expected without resorting to "hardsubbing" (i.e., pre-rendering the subtitles into the video itself)—which is one of many reasons container formats like Matroska (MKV) is so popular in those communities.
An interesting thing to see come out of that is that I have noticed some fansubbing groups move to proper build tools, like Gradle, to automate portions of their workflows. As an example, SubKt, a Gradle plugin, allows them to essentially have CI/CD for their subtitling projects by doing integrity checks on the fonts, linting the subtitles/fonts to ensure the selected fonts actually have glyphs for all the text, templating and merging so that different team members can work on things like the script/timing while another does styling, and then packaging and publishing tasks to bundle everything up into an MKV at the end and upload the result to torrent sites.
If any of that is interesting, here are some links to SubKt + some real-world finished projects making use of it:
- <https://github.com/Myaamori/SubKt>
- <https://github.com/Kaleido-subs/Joshiraku>
Regarding 'why' AV1 and other codecs like VP8/VP9 or VVC haven't really been used:
1. Many of the private trackers have fairly strict rules in terms of standards (e.g., due to lack of hardware support, perceived differences in quality, etc., many don't allow <4K HEVC encodes at all, except in edge cases like when a streaming platform releases a new show in HEVC-only), so individual encoders and groups aren't always free to use whatever codecs they please.
2. Many seem to find x264 easier to tune for certain types of media than x265, and even more so compared to AV1 and others.
3. Many seem to believe that insert codec tends to produce worse results in certain circumstances or for certain content, so they will stick with x265 (or even x264 for the same reasons)
4. Many find that, to truly achieve the same picture quality produced by x265, compression ratios often end up much worse than people claim, and thus the significant slow-down in encoding speed and loss of hardware support is not worth the minor reductions in size.
#4 is likely the most common reason, as it was/is the same with those who prefer x264 over x265; HEVC video is definitely not "half the size" if you want it to look comparably good. And so, especially in the past with older hardware, it simply wasn't worth the tradeoffs; it's worth remembering that, in the case of piracy groups which distribute over P2P networks, no one is paying AWS and co. exorbitant amounts of money per terabyte of data transferred.
These sites run off of 'free' bandwidth provided by users and cheap unmetered servers from companies like Hetzner, OVH, LeaseWeb, etc -- saving 10-30% in bandwidth often is not worth it at the expense of doubling your encode times (or significantly worse than doubling, in the case of AV1 and VVC) and alienating the people watching on older hardware.
EDIT:
Also, I figured it'd be worth noting as well that RE: my points on encoding speeds and such, while hardware decoding may help adoption in the piracy communities, I don't foresee hardware-accelerated AV1/VVC encoding making much of a difference in the near future; even today, virtually none of these groups use solutions like NVENC for HEVC due to the fact that the software HEVC encoders produce better results (so pirates that encode such content typically have just come to accept the slower encodes now that good CPU compute is much cheaper than in the past).
---
[1]: <https://en.wikipedia.org/wiki/SubStation_Alpha>
[2]: <https://streamable.com/d21iq> (this is genuinely a toggleable subtitle and not something baked into the video!)
A video of just 10min would take many hours, on the other end h265 encoding is slow but doable.
Edit: just retried on my laptop:
0.6fps with a 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz Using the lastest version of ffmpeg with the sample from the wiki: ffmpeg -i input.mp4 -c:v libaom-av1 -crf 30 -b:v 0 av1_test.mkv
It's that slow that I don't even get the file size to change on disk, still 0 I guess the ffmpeg encoded buffer is still too small to be flushed out after a minute.
If you have a newish Intel CPU they're supposed to have good AV1 hardware encoding support. See SVT-AV1. (which ffmpeg also supports: https://trac.ffmpeg.org/wiki/Encode/AV1#SVT-AV1 )
https://netflixtechblog.com/svt-av1-an-open-source-av1-encod...
Here's a guide with some various options for using it with ffmpeg: https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/Docs/F...
But also yes, as others are pointing out, this is a problem rapidly being addressed and is not atypical for new media formats.
I'm not sure what might be wrong on your end, but it sounds like ffmpeg's default configs might not be well-optimized yet if you can't encode in real time.
This picture is a little old now but it should get across the point of why libaom isn't a meaningful speed test.
It can be set to go faster, but the default speed is only one notch faster than on this chart.
I'm rooting for AV1 just the same as everyone else, but it's still nowhere close to HEVC in terms of hardware support, or even general quality/efficiency. It's just going to take some more time.
Royalty-free matters less when it turns out these bad actors can punish people for it. It's a little worrying frankly.
(As for America, ATSC 3.0 / NextGen TV uses… HEVC. Better than MPEG-2, I guess.)
For Video, H.266 / VVC is just technically superior in every single way. For Images, JPEG Xl is the best for 95%+ of use cases. For audio, we have a AAC-LC, literally as ubiquitous as MP3, true patent free, and at 128+kbps, 95% of cases as good as the state of the audio codec.
And yet we end up in a world where the only accepted choice is AV1 for video, AVIF for images and Opus for Audio.
--- ¹ good is subjective, I earn my money as a freelance audio engineer, so I should have the ears to notice anything wrong with it.
EDIT: looks like opus is actually the successor to Vorbis.
Many SoCs support hardware acceleration for VP9 decoding. http://wiki.webmproject.org/hardware/socs
AV1 reputedly is 30% more efficient than HEVC, important for a number of cases, such as more efficient use of bandwidth over cellular. For FaceTime over cellular Apple today uses the HEVC codecs if available on source and destination phones.
In software AV1 is very resource intensive.
My guess is that the next shot is with a TSMC N3E chip, which _may_ debut with iPhone 15 Pro. There's been conflicting reports if N3E will be ready when Apple needs it - September 2023 if it's for iPhone 15.
N3E based M3 Macbook Pro with hardware raytracing and hardware accelerated AV1 decode/encode would be nice.
But out of nowhere and 9 years after its release, they add support to the mother of all royalties HEVC codec.
Probably had some kind of deal to benefit their android partner Samsung, since they own pretty much most of HEVC patents.
https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding#P...
Also, support for HVEC in existing devices is already there and not going anywhere: https://news.ycombinator.com/item?id=33339193
(I noticed this long ago when an older iphone wouldn't show imessage images directly from newer phones that were sending images in heif)
Apple made a big deal about HEVC and HEIF starting in 2017. It’s been integrated into macOS, iOS and tvOS since then.
The Camera app on iOS has defaulted to storing photos in HEIF since 2017 or 2018.
High Efficiency Image File Format—https://developer.apple.com/wwdc17/513
HEVC Video with Alpha.—https://developer.apple.com/wwdc19/506
Create image processing apps powered by Apple Silicon—https://developer.apple.com/wwdc21/10153
> That’s where the catch is, unfortunately. The biggest drawback is that HEVC with Widevine DRM is not supported at this point, only clear, unprotected content. It’s unclear whether Google has plans to add support for this in the future or not.
That was my first question. I hoped against hope that it wasn't a trojan horse for some new DRM.
Surely they are going to add Widevine support at some point, but I can't help but rejoice a bit to hear that the latest/greatest coding doesn't support DRM. Even the possibility of a DRM-free future is a wonderful dream.
This isn't true at all. True, HEVC doesn't support Box level encryption like MP4 does, but nothing is stopping anyone from just AES encrypting an entire fragment, as has been used for years with HLSe. The fact that MP4 uses box level encryption is one of the stupidest tech-related things I have ever seen. It forces anyone who wants to decrypt (or encrypt) to write a full MP4 parser, instead of just utilizing existing encryption tools on some "dumb bytes". Once people realize that you can just use HLSe method with HEVC, websites can then pull the keys from the M3U files and just return them from Widevine license requests instead.
MP4 encryption, specifically Common Encryption addition to ISO BMFF has two levels of partial encryption.
- Each frame's media bytes are encrypted independently of other frames. MP4 boxes themselves are not encrypted. This is done so that applications can parse container metadata such as codec params and timestamps without depending on the secure decrypt and decode layer.
- Each frame consists of codec protocol messages such as NAL Units for H.264 and HEVC, OBUs for AV1, and uncompressed and compressed headers and tile headers for VP9. Subsample encryption leaves message headers unencrypted, but encrypts their contents. This is done for efficiency of the secure decode hardware. Clear and encrypted byte ranges are stored in MP4 boxes.
MP4 encryption of course fully supports HEVC using both mechanisms.
Widevine in general supports HEVC. The Widevine module in Chrome has to include a decoder for each supported codec. They probably skipped HEVC to avoid increasing download size for users.
I’m not sure why you’re comparing a codec to a container format?
MP4 is seriously one of the easiest binary formats to parse, and even if you couldn't use an existing parser it would probably be the simplest part of whatever you were actually building.
Unless you've written a Widevine client, downloaded from DASH, parsed MP4, decrypted MP4 samples, then reassembled the decrypted fragments, then you're really not in a position to be making this claim. I have done all the above, and the MP4 parsing was by far the most difficult part of the process, and that includes parsing Protocol Buffers for use with Widevine. The sheer volume of different box types is what makes it difficult. Over 100 types, see for yourself:
Maybe they have moved to av1 and I just don’t know it. Either way the quality of the piracy scene has always seemed vastly better than legitimate channels, up until Netflix.
And since web streams are in h.264 and h.265, that's what the torrents are in too. It's not about preference, it's about the source.
(And the web streams are in h.264 and h.265 because that's what people have the most hardware decoders for, which preserves CPU usage and battery life.)
It's supper frustrating in 2022 to need to switch to my Fire stick just to play UHD(R).
Edit: Except with the Netflix windows app; it will do it.
It's hard to see HEVC as anything else than a legal liability.
To play HEVC files.
> when AV1 exists?
In case your files aren't AV1, or in case you don't have the hardware to play AV1.
Not a mystery is it?
Hardware IP people are paying licenser people, with consumers eventually paying hardware IP people.
> "Why use HEVC(pay) when AV1 exists ?"
Because HEVC has hardware support, right now, so it's faster.
> "Why care about AV1 if everyone is paying ?"
People don't much.
I actually think the truth is the exact reverse. HEVC has easy-to-license patent pools. A couple of clicks and done.
The patent situation surrounding AV1 is complex. It claims to be a free format but multiple entities claim patents that cover it. A submarine patent lawsuit seems likely.
This can be said about anything. Sounds like FUD. There hasn't been a successful lawsuit yet, right ?
The Alliance for Open Source Media (the group behind AV1) is the subject of an ongoing investigation by the European Commission[1] who, per the article, appear to be threatening those who distribute software decoding with a fine of 10% of global revenue.
According to this article[2], Sisvel, the patent group claims its licensing for AV1 is
> more convenient than licensing from individual patent holders, which in this case include companies like Philips, GE, NTT, Ericsson, Dolby and Toshiba
So, yes there is FUD around AV1, but as FUD goes, it’s pretty legit considering the players and their “nationality ”.
[1]https://www.reuters.com/technology/exclusive-eu-antitrust-re...
[2]https://www.cnet.com/tech/mobile/patent-group-wants-a-new-to...
Going to add that I don’t have any knowledge of the legitimacy of the patents involved, and think the legitimacy of software patents generally is often questionable.
Why would it come to a lawsuit ? Companies would simply just pay the royalty.
That's how it has been for previous codecs.
Frankly, I don't believe this, if only because HEVC has been around for much longer, and if this was going to happen, it already would have.
The patent pool situation is a little messy, as there are two possible pools, but given how ubiquitous the codec is now, most companies seem to be figuring it out.
It is the default video format of iPhones and the standard for Torrents.
Compared to HEVC, AV1 is still relatively new hence it suffers limited hardware support. Again it is key to note that Intel, AMD, Nvidia, Qualcomm, and most hardware manufacturers already had support for the incumbent HEVC. That means that a hardware accelerated encoder can run HEVC 5x faster than AV1.
And…
A vast majority of devices in the market; phones, TVs, tablets, cameras, browsers, professional-grade applications, etc come with a built-in ability to decode HEVC. Even those coming from the founding fathers of the AV1 codec have added support for HEVC.
Shameful.
That seems high. What resolution and frame rate is the video? And which decoder are you using? dav1d is a highly optimized software decoder so that's the one to try:
https://code.videolan.org/videolan/dav1d/
It's used in Firefox, Chrome, ffmpeg, etc.
That shouldn't be the case. I play AV1 (via dav1d, software) w/o issue on much weaker CPUs than that (a zen1 laptop cpu and a haswell i7). The CPU is mostly idle.
Why would there be legal liability when it's just passing through to the existing hardware decoder?
> Great feature, but where is the necessary hype!?
There is surely no need for any hype for dead end technology.
You might have an older Mac without the necessary hardware decoder.
> HEVC is only supported if the underlying device has an HEVC hardware decoder.
Does your computer have hardware HEVC decode?
The h264 has a free software decoder so your browser can play it no matter your device supports it or not
https://www.lambdatest.com/web-technologies/hevc-support-on-...
It appears not..
My "new features in this update" section is often 6+ months delayed - as in I will have had access to a feature for 6+ months before seeing it in Chrome release notes.
"Quietly" fits perfectly in this case if it didn't do either of those, when it's actually a huge deal.
The top of the Chromium blog [1] currently says "Find the release notes for Chrome Beta 107 here." and they point to [2].
Which is definitly not marketing treatment -- it's deep in the weeds of changes for CSS, JavaScript, HTML, and so forth.
It's obviously not including every change made, but it does seem like it's intending to be fairly comprehensive in terms of new relevant changes for developers.
They just can't be bothered to recap the changes?