165 points · by formerly_proven · 4y ago · 168 comments
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.
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.
I'm no expert in the field, so I'm actually asking in good faith here...
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)
Patents on processes and methods are pretty common. Dismissing it as "they just patented some math" and then falling back to saying "oh, lambda calculus" -- I think you can do better :-)
But, yes, I'm sure the patents suck.
Find a single US patent that "claims" maths as GP argued. It doesn't exist.
> 1. For a bitstream comprising a first video picture, a second video picture, and a third video picture, a method of decoding comprising: computing a particular value that is based on (i) a first order difference value between an order value for the third video picture and an order value for the first video picture, and (ii) a second order difference value between an order value for the second video picture and the order value for the first video picture; computing a particular motion vector for the second video picture based on the particular value and a motion vector for the third video picture; and decoding at least one video picture by using the computed motion vector.
That certainly sounds like math to me.
If you’re gainfully employed doing math things that turn into codecs, no.
Patents suck, but they also serve a purpose.
A patent for a drug is just chemistry, which is also just math with a specific ruleset…
Patents are designed to protect work, especially work where most of the effort is in the research / discovery rather than the implementation.
Implementing a video decoder is relatively easy coming up with the algorithms to encode/decode the video efficiently and effectively however is a lot of work.
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.
Most software is literally all math.
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.
The numbers used to encode some information are mathematical objects and they can be transformed using mathematical functions. You can encode the image of a flower in a bit string and you can compress the image by applying a mathematical function. That does not mean that the flower is a mathematical object.
The sequence of bases of a DNA molecule from the flower records some information about the structure of that DNA molecule, but it is neither the DNA molecule nor enough information to completely clone a living cell (the various cloned animals from experiments are not identical copies, they combine features inherited from the source of the DNA with others inherited from the source of the anucleated cells used to make the clone, the nucleic DNA is the major source of information about a living cell, but not the only one; it is like the source text of a C compiler that still needs a lot of extra information in order to bootstrap it into an executable compiler).
When patent claims are analyzed, it is easy enough to determine if they refer to mathematical methods or to physical things, even when the language of the claims is intentionally confusing.
Originally the concept of patent was applicable only to physical devices, which could be built and demonstrated to work as claimed.
However the acceptance rules have been relaxed in time, allowing more and more abstract patent claims, until it became possible for the first time to patent software, first in USA, and then also in other countries, usually as a result of pressure either from USA or from industry lobbies.
Also, only decentralizing, open source, individual empowering, tech, isn't anti-human.
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.
You have absolutely no idea what you are talking about. An essential patent is declared essential to a standard (of which there are many). Take 3GPP, companies like Qualcomm, Apple, Ericsson, Huawei, etc. all spend hundreds of million of $ developing each release of the 3GPP cellular standard. During this development process often times patents are filed (based on the companies contributions). As part of joining 3GPP you have to agree to license this IP on fair, reasonable and non-discriminatory (FRAND) terms. The patents are almost never obvious, as you can see from the lengthy debate over each feature and all of the associated proposals at each 3GPP meeting.
For example, what good is the perfect communication codec if every operator must each pay top dollar?
Go on then, make a better video codec, as it's just math.
Also, isn't that just AV1? (it does seem optimized for the particular niche of streaming vendors though: minimizing bandwidth at all costs)
If you want a new cross platform video codec, check out AV1.[1]
[0] https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding#P...
https://news.ycombinator.com/reply?id=31318663&goto=item%3Fi...
Both MPEG-LA and HEVC Advance offer Max Cap per year.
EDIT: HEVC / Access Advance does have a cap if you put their branding on any product you make containing HEVC technologies - including, oddly, 4K Blu Ray discs (see LOTR Extended Edition 4K, it has the HEVC logo on the box, as if literally anyone cares about HEVC as a brand). If you don't put their logo on your products, no caps.
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.
https://news.ycombinator.com/reply?id=31318663&goto=item%3Fi...
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.
But it wasn't, so they'd be letting the entire internet be held to ransom if they supported it.
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.
Is a license also required if the x265 codec is used? Or does that depend on whether the software is for commercial use?
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...
Not the case. See https://web.archive.org/web/20200916062932mp_/https://ffmpeg...
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."
- 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).
Some hardware comes with the codec pre-purchased (my laptop does). I don't think I've ever heard of anyone buying a codec in the MS Store, though.
I think most Android phones come with HEVC support. Mine did, anyway; I suppose it's up to the vendor to choose if they want to support it. Apps like VLC will also play the codec just fine. My camera app even records in h.265. This is a phone from Xiaomi, which not exactly known for their great software packages and compatibility.
I'm pretty sure Safari already supports h.265 because Apple switched to HEIF pictures while the rest of the world still just uses JPEGs for everything, and HEIF is pretty close to a single h.265 frame packaged as a picture. Not even Apple would be so foolish to switch default formats on their mobile devices and not support it across their software products.
Browsers don't feel like paying license fees over downloads of their free products and I can't blame them. Mozilla's h.264 decoder is only published along with it because Cisco had reached the license fee cap (which doesn't exist for h.265) and they decided to use their license so that Firefox can play videos freely.
I think Apple and physical disks formats are the only players heavily invested in h.265 right now. AV1 hardware decoding support is slowly coming along, so soon enough everyone can just use AV1 and be free of the proprietary patent bullcrap.
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.
It is perfectly reasonable for hardware this old or older to still be in use. But by virtue of being standard in pretty much all new hardware for 6-7 years now, HEVC support is far more ubiquitous in 2022 than AV1.
More importantly, I cannot feasibly bring my RTX 3080 with me on a plane. When loading up movies before I travel, I need them in a codec supported by my phone or tablet. HEVC has fit that bill for years now, and will continue to do so until AV1 support has become ubiquitous in mobile hardware and my current devices have been retired.
Software decoding should also work on a $100 cpu.
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.
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.
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.
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.
The machine does not feel slow to me. I have a fast SSD in it and lots of RAM so it is actually quite responsive. It just can't handle certain things like AV1.
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.
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."
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.
"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.
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)
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.)
Google already pay for it via their hardware business.
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.
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.
Surely Apple devices count as a real place? I expect there are a lot more iDevices than 4K Blu-Ray players.
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.
Then tell me where I am wrong.
> If any one wants to look at the cap aka the limit on per company / entity basis you are free to do so.
No, you are not, if you had more carefully read my argument. There are three patent pools, and a bunch of non-aligned companies whose patents you also need. HEVC can be properly called out as not having a cap even though some of the patent pools involved have caps. Velos Media, as far as leaks go, is widely believed to have no cap (and they have patents from Qualcomm and Sony, you can't really live without them) - and it is reasonable to believe the privately negotiated deals with the non-pool-affiliated companies (like Technicolor being a big one) also do not have caps. Velos Media's pool is pretty necessary and has no public documentation at all for what it costs.
Thus, HEVC can rightly be called a product without caps as far as can be reasonably told, unless you were to privately negotiate with all of the patentholders yourself. In a similar vein, HEVC / Access Advance said that anyone can build an open-source implementation of HEVC for free, but that is useless propaganda because MPEG LA and Velos don't agree.
Funnily enough, the pirate seas have lots of h265 booty. Easy for that crowd, nobody cares about the patents there.
https://www.microsoft.com/en-us/p/heif-image-extensions/9pmm... + https://www.microsoft.com/en-us/p/hevc-video-extensions/9nmz...
> Linux
https://github.com/strukturag/libheif (includes gdk-pixbuf loader and nautilus thumbnailer)
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.
Since then (when they decided that Blu-Ray drives weren't going to be standard in PC) there has been a decoupling. HEVC is a consumer electronics standard, the PC industry is going towards VP9, AV1 and other royalty free codecs.
Up until HEVC most codecs had one patent pool you could pay a royalty to and be good. HEVC had the problems that two entities claim to control essential patents
To this day, the only official way to play 4K Blu Ray on a PC is to get a 10th gen Intel and play back using Integrated Graphics using one of the internal drives made by a drive manufacturer who was utterly shafted by this nonsense.
(It's got to hurt more though that 4K Blu Ray's new and improved DRM was, despite all this, broken less than a year after release. If you are a drive maker, knowing your drives are useless on modern PCs because of broken DRM that Blu Ray developers still insist is necessary must be the most infuriating thing ever.)
I would hazard a guess that your laptop probably doesn't have a hardware H265, or that the H265 file you're using doesn't match up to the decoder module (eg 8 vs 10 bit, or color space, etc). It is then falling back to software-decode or hybrid mode, and then it doesn't have enough oomph to do the file.
AMD APU's started getting h.265 support around the same time.
Low powered laptops without HEVC hardware decoding will probably struggle.
Also with a million competing codecs which do you choose....
2. The idea of patenting algorithms themselves seems to fly in the face of free speech. An algorithm is a disembodied mathematical thing, and not a device for selling. The same logic that allowed PGP to be exported as a book despite export laws would seem to apply to patens on algorithms.
3. An industry that is harmful to the free development and operation of business has sprung up where firms (that don't do anything economically or socially productive) buy a lot of patents up and then file nuisance law suits to get revenue streams for their investors.
(Disclaimer I am the inventor on a couple patents; I had prepared my notes and list of innovations on the systems involved for the meeting with the lawyer filing the patent, and the discussion never got to any of the innovations involved, so there is no way that the patents were awarded for innovation.)
Relative works for over 10 years as patent examiner, now a team manager, for EU: they are ordered to approve as many patents as possible. Having more patents is considered progress and innovation, more patents approved is a KPI. Unless they are ridiculous or illegal, they have to approve it and it is the job of people that are affected to fight to cancel the patents.
There’s something better and no one cares to try.
Who tracks who has bought or not bought it? Should users/software devs/hardware makers pay? For potentially billions of users/software copies/devices across many national jurisdictions.
I click the x265 video link. And now the browser/OS/hardware have to do a dance to determine if I am allowed to watch the video or not.
Or because that is a big hassle, don't bother. Use x264 until AV1 is supported.
Relying on every user to honorably-do-the-right-thing AND every OS/browser/video software to coordinate to make it happen is foolish. Nice in an ideal world, doesn't work in practice.
Don't get me wrong. I am all for the maker of the codec getting some monetary reward for their clever work. But this is a dumb way to do it.