Readit News logoReadit News
Posted by u/formerly_proven 4 years ago
Ask HN: Why does nobody support h.265/HEVC anymore?
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.

akersten · 4 years ago
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 · 4 years ago
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...

MobiusHorizons · 4 years ago
The specification for the format (which is what is patented) describes the mathematical relationship between the binary payload and the uncompressed picture data. The actual implementation of the encoder / decoder is copyrighted and may also be patented, (which seems to be what you are alluding to), but with patent encumbered formats, the real issue is that the specification itself is patented.

Practically this means that every encoder / decoder for patent encumbered formats has to have some form of licensing just to interact with the format even if they somehow reverse engineered the specification and built a cleanroom implementation (at least as far as I understand it, IANAL)

akersten · 4 years ago
Everything you can instruct a computer to do is just math, yes. "Instructions on how to use the math" is, unsurprisingly, also more math.

https://en.m.wikipedia.org/wiki/Lambda_calculus

nceqs3 · 4 years ago
Here is a list of the essential patents from the main pool: https://www.mpegla.com/wp-content/uploads/hevc-att1.pdf

Find a single US patent that "claims" maths as GP argued. It doesn't exist.

Spooky23 · 4 years ago
If you’re against patents, yes.

If you’re gainfully employed doing math things that turn into codecs, no.

Patents suck, but they also serve a purpose.

GekkePrutser · 4 years ago
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 · 4 years ago
> 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.

MobiusHorizons · 4 years ago
IMO the real issues caused by patent encumbered formats is that what is patented is not the software itself, but the format. So instead of patenting a specific implementation of an encoder or a decoder, what is patented here is the relationship between the bits on disk and the pixels on the screen. I think that's what the quoted text is trying to get at.
alex_smart · 4 years ago
The Church Turing thesis basically states that any systematic procedure can be encoded into math. Software can be encoded as math, yes, but music can be encoded as math. Life can encoded as math (which is what your DNA is).

I really don't understand how the parent commenter fails to see that this makes "X is math" basically a meaningless statement because it is always trivially true and makes their position "math shouldn't be patented" completely untenable.

adrian_b · 4 years ago
That is why previously software could not be patented and it still cannot be patented in many countries.
HPsquared · 4 years ago
It's not just math. It's a process that can be described in mathematical language.
hitovst · 4 years ago
"IP" isn't property.

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

dordoka · 4 years ago
Software patents should not be a thing... but the US neoliberalism fucked it up for everyone.
nceqs3 · 4 years ago
Every country in the world "endorses" the concept of "essential" patents. It's called a patent.
yarg · 4 years ago
No.

A patent covers a way of doing things.

An essential patent covers the way of doing things.

Essential patents in general fail the obviousness test; they cover the solution that most experts in the field would reach in solving the given problem.

zepolen · 4 years ago
> that's literally all a video codec is

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

formerly_proven · 4 years ago
Nobody said math is simple.

Also, isn't that just AV1? (it does seem optimized for the particular niche of streaming vendors though: minimizing bandwidth at all costs)

theandrewbailey · 4 years ago
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/

gjsman-1000 · 4 years ago
Three patent pools, and some major companies that you need patents for aren't in any of them. Also unlike H.264, there was no limit to how much you could spend on licensing every year. And that was only the beginning of the disaster.

https://news.ycombinator.com/reply?id=31318663&goto=item%3Fi...

ksec · 4 years ago
>there was no limit to how much you could spend on licensing every year.

Both MPEG-LA and HEVC Advance offer Max Cap per year.

msbarnett · 4 years ago
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).
jitl · 4 years ago
Chrome and Mozilla both want their competitor format AV1 to “win”.

Plus, partial support is a burden - one of the patent holders might come by and ask you to prove you didn’t accidentally violate one of their patents while fastidiously only using that approved hardware. I think there’s a lot of lawyer risk there below the waterline.

devwastaken · 4 years ago
I don't buy the patent argument. AV1 is not unique, it would not be hard to find some similarities in the math and argue infringement of one of tens of thousands of patents these companies sit on. The companies simply don't want to upset the largest tech companies, though apple already buys from them.
zamadatix · 4 years ago
Chrome leverages hardware decoding in general it just doesn't support h.265 at all, hardware or software.
znpy · 4 years ago
The correct way to see this is probably that licenses have already been patented for the existing implementations, and dropping support for future ones means money saving.
grishka · 4 years ago
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.
adrian_b · 4 years ago
The devices with hardware AV1 decoders have begun to appear this year.

For example the new Rockchip RK3588 (for cheap computers with ARM CPUs and for TV top boxes) has a 4k @ 60 fps hardware AV1 decoder and the new Intel ARC GPUs also have hardware AV1 decoders.

There are some new chips for smartphones that will have hardware AV1 decoders.

The NVIDIA GeForce RTX 30 Series GPUs have hardware AV1 decoders, but I have no experience with them, as the most recent NVIDIA GPU that I use is an older RTX 2060 Super.

It is not known yet for sure whether the next generation of AMD GPUs will have hardware AV1 deoders. If they would not have it, they would remain the only new GPUs without hardware AV1 decoders.

formerly_proven · 4 years ago
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?
galad87 · 4 years ago
Right, but neither Google neither Mozilla wants to support it even if they don't need to pay a cent.
AshamedCaptain · 4 years ago
That's actually not entirely clear to me. Which is another reason to avoid H265 altogether....

I mean, even if say Chrome started using the hardware decoders, do you think someone from the MPEG-LA would _refrain_ from suing Google since "they're just using the Windows API"? It's already not rare to have to pay both for the hardware _and_ the software in this world.

mimsee · 4 years ago
Perhaps there are software patents involved in the codecs and a license for those is different from the hardware ones
tomputer · 4 years ago
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?

jasode · 4 years ago
>FFmpeg and VLC seem to use (lib)x265 for H.265 content.

copypaste of previous comment:

The FFmpeg project does not distribute binaries with unlicensed or illegal code. E.g. if you want ffmpeg to use libdvdcss for decrypting DVDs or use libfdk-aac to encode aac/m4a without paying license royalties to Fraunhofer, the end user has to download those components and build a custom ffmpeg binary on their own. No legitimate website will host ffmpeg built with the "illegal/unlicensed" libraries. E.g. When the popular Zeranoe website hosted ffmpeg executables for download, it was only built with the free GNU components and was missing x265.

The VLC project says they can include libdvdcss because they are a French company instead of American. E.g. The USA-based Microsoft removes DVD playback from Windows 8 but France-based VLC does not: https://www.zdnet.com/article/if-vlc-can-ship-a-free-dvd-pla...

pornel · 4 years ago
ffmpeg/x265 don't own the patents, so their license has no right to grant you them.

Beware that using ffmpeg/x265 may be illegal if you're in a country that recognizes software patents. You need to pay patent fees even if you wrote the software 100% yourself. You need to pay even if you independently invented the same algorithms later than the patent was filed.

To quote Carmack:

> "The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying."

babypuncher · 4 years ago
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.
creshal · 4 years ago
- Neither Linux nor Windows provide one, due to licensing costs

- Most browsers do not deem it worth the risk of relying on host software decoders, as the plug&play infrastructure behind them usually translates into "nobody feels responsible for patching anything" which translates into incalculable vulnerabilities

That leaves MacOS (why bother when Safari exists), iOS (dito), and Android (why bother when Android users don't spend money), and trying to use hardware codecs without stepping on patents enough to make lawyers smell blood (why bother).

dopa42365 · 4 years ago
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 · 4 years ago
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.
metalliqaz · 4 years ago
My GTX980 did not support HEVC decoding in hardware, and as a result it played like crap on my system. The Nvidia cards have only supported it since the GTX 10 series. That isn't very old IMHO.
formerly_proven · 4 years ago
> 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.

m3galinux · 4 years ago
It's not just browsers. One popular Windows-based video surveillance platform has hardware decode support for H264, but it's software only for H265; that's on both Windows clients and Android mobile. That means your H264 cameras show up instantly but H265 takes a few seconds per stream, and too many of them on one screen means you're skipping frames. At least two companies I installed these for decided to double their storage instead of taking the perceived UI performance hit.
Sunspark · 4 years ago
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.

cesarb · 4 years ago
> If you try using AV1 on a computer that didn't come with a hardware decoder for it, your machine will crawl.

My computer doesn't have a hardware decoder for AV1 (as shown by "vainfo"), yet AV1 videos play perfectly fine on it, both within the browser (including on Youtube) and outside it. Playing the AV1 demo (https://demo.bitmovin.com/public/firefox/av1/) on the browser at its maximum resolution uses only around half of the CPU.

dopa42365 · 4 years ago
You can easily watch 4k AV1 videos on any recent 6+ cores CPU.

So, not an issue unless you're using hardware from 2015 or so? In which case you're unlikely watching a ton of 4k+ content anyway.

anaisbetts · 4 years ago
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
dopa42365 · 4 years ago
Drop some local h265 mp4s into your edge browser, works fine for me with the extension.
nabakin · 4 years ago
> 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

dopa42365 · 4 years ago
Remember: those h264 artifacts aren't real, they can't hurt you!
NelsonMinar · 4 years ago
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 · 4 years ago
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 · 4 years ago
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 · 4 years ago
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 · 4 years ago
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.

karmakaze · 4 years ago
Interesting about the relation between WebM and MKV found in google search:

"Many Web browsers support WebM, which is a restricted version of MKV. The most important restriction is in the allowed video codecs. WebM video uses only the VP8 and VP9 codecs, which are open and royalty-free. All WebM files are MKV files, but not all MKV files are consistent with WebM"

So the question comes back to supported codec moreso than container format.

mmis1000 · 4 years ago
MKV can literally contains anything includes but not limited to text based effected subtitle, image based subtitle, multi alternative audio channel, chapter separated video and even font.

And the used codec also isn't even limited. H265 10bit + flac 96khz? Fine. You can pack it as long as you want. And it's your own problem to play it. And that is basically why you see youtube-dl merges best audio + best video into MKV. Because it is the one only format that allow you to merge something like vp9+opus into playable single file.

It is basically a 'one format rule them all' format. The browser is unlikely to actually properly implement all of them. (In fact, there are only a few players actually implement all of them outside of players on windows) And even browser does want to implement everything, there isn't proper API for browser to expose these capabilities to the DOM and JavaScript to properly control them. (I think we are unlikely to see browser support native multi audio track video)

nabakin · 4 years ago
I guess because adding full support would be a pain and the average consumer doesn't use it anyway
scottlamb · 4 years ago
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 · 4 years ago
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.
hedora · 4 years ago
How much time? The codec licensing shitshow was already going strong before web browsers were a thing.
ksec · 4 years ago
>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.