top | item 31317989

Ask HN: Why does nobody support h.265/HEVC anymore?

165 points| formerly_proven | 3 years ago

It seems that right now there is no browser that supports h.265/HEVC even on hardware that can decode it - "Old Edge" used to, but "New Edge" does not. Neither Chrome nor Firefox support it (actually, both of those refuse to use any form of hardware decoding at all on my Windows box, only Edge uses it for VPx and h.264 - and of course every media player).

The only exception is Apple with Safari.

Why is this? h.265 can do a lot better than h.264 in some scenarios, but certainly isn't worse.

And why, oh why, is debugging hardware video acceleration still such a nightmare, even on Windows? Firefox doesn't even seem to have it in about:support any more!

And why is hardware video acceleration only a problem with browsers? I've never had any kind of problem with it with any media player, regardless of OS. It just works. But browsers - it seems to never work OOTB. Except for Edge, apparently. Which I thought was just a Chromium reskin with MS tracking.

168 comments

order
[+] akersten|3 years ago|reply
Because the US endorses the concept of "essential patents," meaning you need to pay a licensing fee to be lawfully allowed to perform the math that transforms data into A/V content.

Never to mention the two blatant issues with this, being:

1) video codecs are the exemplary "we'll patent math and there's nothing you can do about it" scam, since that's literally all a video codec is

2) a process being "essential" to a particular outcome (i.e. no other way to do it) was the main motivation mathematics was explicitly excluded from patentability in the first place, so the idea of "essential patents" just underlines the absurdity of the entire system

Anyways, yearly reminder that software patents are a blight to innovation and a scourge on our industry, and no you won't change my mind.

[+] cmrdporcupine|3 years ago|reply
I mean, is a video codec really just "math"? There's a binary payload description and algorithms involved for applying said math as well.

I'm no expert in the field, so I'm actually asking in good faith here...

[+] GekkePrutser|3 years ago|reply
That doesn't explain why the browsers don't offer hardware decoding but only software decoding. Both implement the same specification. One is just faster (and in hardware which I assume has said license fees paid by the processor manufacturer).

In fact looking at it this way it would be easier to implement it in hardware as you don't just offload the decoding but the whole licensing rigmarole too.

Edit: oops this was already mentioned. Sorry the thread is so long I lost the overview.

[+] Razengan|3 years ago|reply
> video codecs are the exemplary "we'll patent math and there's nothing you can do about it" scam, since that's literally all a video codec is

Most software is literally all math.

[+] HPsquared|3 years ago|reply
It's not just math. It's a process that can be described in mathematical language.
[+] hitovst|3 years ago|reply
"IP" isn't property.

Also, only decentralizing, open source, individual empowering, tech, isn't anti-human.

[+] dordoka|3 years ago|reply
Software patents should not be a thing... but the US neoliberalism fucked it up for everyone.
[+] nceqs3|3 years ago|reply
Every country in the world "endorses" the concept of "essential" patents. It's called a patent.
[+] zepolen|3 years ago|reply
> that's literally all a video codec is

Go on then, make a better video codec, as it's just math.

[+] theandrewbailey|3 years ago|reply
H.265 requires getting a license from at least 2 patent pools[0], and who knows how many other patents are out there waiting to get sued over.

If you want a new cross platform video codec, check out AV1.[1]

[0] https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding#P...

[1] https://aomedia.org/av1/

[+] msbarnett|3 years ago|reply
The licenses have already been paid for the hardware implementation, that doesn't explain, eg, Chrome's refusal to leverage hardware decoding (and stop burning so much power on laptops).
[+] grishka|3 years ago|reply
I've yet to see any hardware decoder supporting AV1. And while you can decode with software, at the cost of using obscene amounts of CPU cycles for extended periods of time which not all devices are designed to sustain, forget about software encoding. Encoding is just not going to happen without a hardware accelerator.
[+] formerly_proven|3 years ago|reply
But if an application merely uses the graphic's drivers API to decode a stream, presumably the GPU vendor (and therefore the buyer) already paid for those licensing costs? Otherwise the hardware wouldn't support h265, right?
[+] tomputer|3 years ago|reply
FFmpeg and VLC seem to use (lib)x265 for H.265 content.

Is a license also required if the x265 codec is used? Or does that depend on whether the software is for commercial use?

[+] babypuncher|3 years ago|reply
This explains why browsers do not include their own software decoder, but they should not need a license to use the decoders provided by the host platform.
[+] dopa42365|3 years ago|reply
New Edge supports it, if you have the h265 extension from the microsoft store (cmd "start ms-windows-store://pdp/?ProductId=9n4wgh0z6vhq"). It's also the only (?) browser that supports AC-3 audio. Thanks for nothing, Dolby.

There's barely any content though (possibly premium VODs on Netflix etc).

Bilibili (kinda like Chinese youtube) offers HEVC (and AV1) playback, if your browser supports it. Example: https://www.bilibili.com/video/BV1Q44y1372Q

In general it's kind of a moot point by now, just go with AV1.

[+] babypuncher|3 years ago|reply
My problem with AV1 is that hardware support for it is far from ubiquitous. I can load up a file I encoded with x265 on any of my devices from the last 6 years and be sure that it will play back smoothly without eating battery. The only device in my house with hardware AV1 support is the RTX 3080 in my desktop. So for the time being, I encode all my blu-ray rips with x265.
[+] formerly_proven|3 years ago|reply
> In general it's kind of a moot point by now, just go with AV1.

You don't always get to decide. E.g. IP cameras will generally support both h.264 and h.265 these days, with HEVC doing vastly better than AVC, yet if that output has to go near a browser, instead of through dedicated software... SOL. Can't do anything with it. The hardware can, the software can't.

And AV1 is decode-only anyway, and only supported in the newest platforms. CPU decoding is just not a reasonable solution.

[+] Sunspark|3 years ago|reply
It's odd that the browser supports AC-3 but the MS video player does not unless you pay for the codec, while all the other video players include it.

Going with AV1 is not an option for the vast majority of people as it requires hardware support. If you try using AV1 on a computer that didn't come with a hardware decoder for it, your machine will crawl.

I force h264 in YouTube for this reason instead of using VP9.

[+] anaisbetts|3 years ago|reply
I'm not sure if this is the case. Current Edge Dev (102.0.1245.3) reports "No" for HEVC, even with the extension installed. Old Edge based on EdgeHTML/Spartan would indeed play HEVC content
[+] nabakin|3 years ago|reply
> In general it's kind of a moot point by now, just go with AV1.

Safari doesn't support AV1 though. I'll stick with AVC until it does

[+] NelsonMinar|3 years ago|reply
FWIW the pirate scene supports it; a lot of video release are H.265 (marked "x265" usually). H.264 is still more popular in general, particularly for TV. There's still no AV1.
[+] resfirestar|3 years ago|reply
Actually it’s not just browsers, HEVC can’t be hardware decoded out of the box on Windows applications that rely on Media Foundation, you have to open the Microsoft store and pay $0.99 for the privilege of using those codecs.
[+] pornel|3 years ago|reply
Another thing to consider is that whenever a format works in "all" browsers (for some small values of "all" that devs care to test in), it becomes a de-facto part of the Web platform, and browsers end up having to support it forever.

This makes browser vendors very cautious about adding anything, because even if it's easy now, it's may haunt them later. Maybe they could use HW accell on current-gen GPUs, but what if the next-gen GPUs move to a newer codec and drop H.265? Browsers will still be expected to play existing web content encoded in the old codec, but now with a patent liability and no hardware to subsidize it.

[+] karmakaze|3 years ago|reply
Another question is why don't browsers support MKV container format?

From an arbitrary search "The Matroska project is supported by a non-profit organization and is a fork of the Multimedia Container Format. It was first announced to the public at the end of 2002 and is a completely royalty-free open standard that's free for both private and commercial use."

[+] astrange|3 years ago|reply
They do; WebM is MKV.

General MKV support is approximately impossible because the subtitle format is extremely complicated and not specified. libass only implements it by being bug-compatible to an old piece of Windows software.

Also, MKV isn't a great file format; the way it does timestamps is all wrong for instance. It stores them as decimals when they're naturally rational fractions, so it's a strange choice for an archival format since it literally cannot be accurate.

[+] scottlamb|3 years ago|reply
The frustrating thing IMHO is that IP security cameras support H.264 and H.265, while browsers support H.264 and VP9/AV1. It's good that they have one codec in common, but I'd prefer they share a modern one.

I think much of it is geopolitical. Browser vendors are mostly in the West, can't just ignore the patents, and don't want to pay for the patents. Camera and chipset makers are mostly in China and simply ignore patents and licensing. (They don't honor LGPL/GPL conditions either.)

[+] ac29|3 years ago|reply
Give it time. HEVC hardware support was available before AV1 hardware support. I think thats the only reason - realtime encoding of these modern codecs necessitates hardware support on a device like a security camera.
[+] ksec|3 years ago|reply
>Browser vendors are mostly in the West, can't just ignore the patents, and don't want to pay for the patents.

Google already pay for it via their hardware business.

[+] gjsman-1000|3 years ago|reply
HEVC has a long and complicated history.

With H.264, it was easy - one patent pool. Any questions? Contact MPEG LA. How much did it cost? About $2 or so per device, no problem. Did you spend more than (IIRC) $14 million on licensing each year? It's free past that point. As for open-source software like Firefox, Cisco actually struck a deal to pay all the royalties if you used their OpenH264 decoder (they needed H.264 to be widely supported for WebRTC), so Firefox and other software was able to use the binary of that and have Cisco covering the royalties for them.

With H.265, everything splintered. There are three patent pools: MPEG LA, Access Advance (formerly known as HEVC Advance), and Velos Media. Between them, you have to pay royalties on the hardware, the software, and a royalty per-item created past a certain point. Some had royalty caps, others did not and would rack up royalties indefinitely and unpredictably high. Some patent pools had you licensing patents available in other pools, so you were paying twice for the same patents. And some major patent holders (such as Technicolor) weren't in any pools, so you needed to approach them manually and hash out a deal on your own which could have as favorable or unfavorable terms as they pleased. Also, Cisco (not surprisingly) said they weren't paying the royalties for an OpenH265, as it was only a ~30% improvement for a exponential increase in royalties, easily several times or more as much as H264. Bloody hell.

So, it shouldn't be a surprise that Windows decided, screw it, you're paying $0.99 if you want HEVC, but we're not supporting it with every Windows license because that could easily cost hundreds of millions of dollars because of the lack of caps. Apple used their sheer market power to get HEVC on all their devices mainly for HEIC (HEVC for images), which reduces storage space needed for photos and iCloud costs, and once you have it on every iPhone, adding macOS is cheap. Presumably this is because Apple struck a deal with the patent holders individually and didn't need to accept the ludicrous patent pool terms. Did I mention that Access Advance alone operates their patent pool at an absurd 40% margin for its directors? (Yes, 40% of Access Advance's pool royalty, which is already the highest of any pool by far, is pure profit for the pool itself rather than going to patent holders. It's asinine!)

You might wonder why in the world H.265 licensing fell apart so badly. The answer is, well, streaming. H.264 got its first release in 2003, before YouTube or internet video was really a thing. HEVC was released in 2013 and patent holders were eager to extract rent from Netflix (distribution royalties), PC Makers (hardware royalties), Microsoft and Apple (software royalties), content producers (per-title royalties), basically everyone involved had a royalty somewhere because they thought HEVC was going to be the best thing ever for reducing streaming costs and people would pay for it. They didn't.

The only real place H.265 lives on is in 4K Blu-ray... and Next-Gen TV / ATSC 3.0 which is going to allegedly hopefully replace ATSC 1.0 for OTA Antenna-based TV Transmissions someday. Though, unlike the first digital transition, it's not mandated by the FCC and it also requires licensing HEVC, Dolby AC-4, and a billion other standards so... maybe it will die of patent exhaustion.

[+] ZeroGravitas|3 years ago|reply
With H.264 they retained the right to renegotiate the terms every 5 years. It was only after Theora and VP8 got some traction that they pledged to not alter the terms for the rest of the patent term.

AAC audio hit the exact same problem. Apple refused to support it until they dropped some of the more ridiculous licencing fees.

Even physical DVD players got shafted by MPEG patent prices becoming a significant share of the entire device costs in later years.

It's always been a scam. It always will be a scam. Exactly like the social networks that are so open and friendly till they've got you locked in. That's the whole business model.

HEVC lived and died by licence fees.

[+] floatboth|3 years ago|reply
h.265 also lives on in open source software other than browsers. VideoLAN has been ignoring the whole licensing disaster because "Neither French law nor European conventions recognize software as patentable" for ages :P
[+] jl6|3 years ago|reply
> The only real place H.265 lives on …

Surely Apple devices count as a real place? I expect there are a lot more iDevices than 4K Blu-Ray players.

[+] ksec|3 years ago|reply
Part of the reason why I gave up commenting on video codec. 90% of what you wrote here is inaccurate to say the least.

The terms for HEVC on MPEG-LA and Access Advance are freely available on their website. If any one wants to look at the cap aka the limit on per company / entity basis you are free to do so.

One could be against patent as an idea or its system all you want. But an objective truth does not change simply because you are against it.

[+] yencabulator|3 years ago|reply
> The only real place H.265 lives on is [...]

Funnily enough, the pirate seas have lots of h265 booty. Easy for that crowd, nobody cares about the patents there.

[+] teekert|3 years ago|reply
This is also behind heic? Right? Man what a pain, I love hdr and Live Photos but anywhere outside the Apple ecosystem it is pain. I really wouldn’t mind paying some dollars for some codecs to just be able to see my pics in Windows, Linux, Nextcloud etc.
[+] projektfu|3 years ago|reply
Windows 11 appears to read HEIC in the photos app.
[+] ZYinMD|3 years ago|reply
I'm under the impression that VP9 is in the same generation with H265 (in terms of video size and encoding/decoding performance) but VP9 is free and open, so as a consumer, I'll happily accept if everybody just uses VP9.
[+] rowanG077|3 years ago|reply
You are completely right. I have never gotten HW accel to work in ANY browser. It's honestly baffling that hobby project level video player get this to work without a hitch but Google and Mozilla can't. Even of decades.
[+] ksec|3 years ago|reply
I wonder if there is a term similar to Rust Evangelism Strike Force for AOM. But generally speaking AOM supporter refuse to accept anything but AOM. This isn't just the case with patented video codec like HEVC or VVC. But even something like JPEG-XL.

I would not be surprised if whole team of Google engineers threaten to quit if the company were to support HEVC in their browser.

One could also argue, in the context of Internet video, [1] HEVC doesn't actually provide that much cost saving. The cost of bandwidth have reduced by 90%+ in the past 10 years. And we should see continue cost reduction in the next 10 years. While the cost of storage is extremely slow if not risen due to the usage of NAND. Hence there isn't really a need to switch. H.264 is still the most efficient video codec in terms of complexity / compression. ( May be MPEG-5 EVC is better in this scenario, but it is still very new )

[1] Video codec has lot of usage outside of internet, HN and internet/Tech comments tends to have a world view where everything is internet and ignore broadcast or other media usage.

[+] Vladimof|3 years ago|reply
probably a patent issue... I love x265 for the video file size and a decent video quality
[+] silicon2401|3 years ago|reply
Can someone help me understand why my windows 10 laptop with the latest VLC can't run x265 video files, but my windows 10 desktop with the latest VLC can? My desktop definitely runs circles around my laptop, but I'm not very well versed on video tech, so I haven't been able to figure out what the issue is on my laptop.
[+] throwaway67743|3 years ago|reply
The other problem is like competing codecs (vpx comes to mind), they all require much more resources for little gain, both for encoding and decoding - even in hardware vp9 requires more than h264 (and 5), patents are not the only reason.

Also with a million competing codecs which do you choose....

[+] sally1620|3 years ago|reply
One of the main advantages would be hardware accelerated encode/decode, but because every manufacturer supports it differently most software refuses to use it. And once you go to software encoding, why not use a more efficient and open codec.
[+] heavyset_go|3 years ago|reply
H.265 works for me in Firefox using hardware acceleration via VA-API.