Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've always felt like H.264 hit a great sweet spot of complexity vs compression. Newer codecs compress better, but they're increasingly complex in a nonlinear way.


Doesn't every state of the art codec do that, including H.264 versus previous?

Also I haven't seen charts of decode difficulty, but as far as encoding goes, codecs a generation more advanced can crush H.264 at any particular level of effort. The even newer codecs can probably get there too with more encoder work. https://engineering.fb.com/wp-content/uploads/2023/02/AV1-Co...


Generally yes, but I wasn't only talking about compute costs. Mentally grokking H.264's features and inner workings is a lot easier than newer, better codecs.


H.264 will probably never die, especially once all the patents expire in a few years.


H.262 has a long future too. New DVDs and OTA broadcasts (at least for ATSC 1.0) will probably end at some point, but the discs won't go away for a long time, even if disc players are less and less popular.


…you mean MPEG2?


H.262 == MPEG-2 Part 2 Video == ISO/IEC 13818-2. Video codecs are fun because multiple standards bodies publish their own version of the same codec. The ITU-T publishes the H.26x specs, and ISO/IEC publish the other xxxxx-x specs.

Pesonally I like the ITU-T because you can get the specs for free from them. ISO/IEC demand $242 for a copy of ISO/IEC 23008-2 (also known as MPEG-H Part 2 or HEVC). But ITU-T will give you H.265's spec (which is the same codec as ISO/IEC 23008-2) for free: https://www.itu.int/rec/T-REC-H.265


This is true, but I think I settled on either VP8 or VP9 because it's already widely supported, and it's part of webm, so people will maintain support just for backwards compatibility.


When do they expire?


According to https://meta.wikimedia.org/wiki/Have_the_patents_for_H.264_M..., probably September 2027.

There are an additional two patents on that list that expire in 2028 and 2030, but it's not clear if they apply. So probably November 2030 at the latest.


It also benefits from the extremely optimized encoder x264, which has many easily approachable tunings and speed/compression presets.

I’m not sure I’d trust x265 to preserve film grain better than x264 —tune film unless I gave x265 much, much more time as well as pretty similar bitrate.


x265 has a specific "--tune grain" mode specifically for video with a lot of film grain.


Apologies, I did miss that. However it seems to still underperform.

See this thread, screenshots on the first page.

http://forum.doom9.net/showthread.php?p=1947856#post1947856

I was remembering from this a couple years ago, but focused on the parameters shown and missed that they were derived from --tune grain.


But with hardware acceleration for both encoding and decoding of HEVC it feels like less of a problem IMO.


Video piracy is pretty much all in HEVC


Uhh, not in my experience. Its extremely difficult to find h265 sources for a large majority of content. Its basically a meme where if you tell people you want to try and get h265 by default, they talk down to you like "why would you do that".

From https://trash-guides.info/Misc/x265-4k/

> Something like 95% of video files are x264 and have much better direct play support.


That info seems a little out of date. The utility of h.265 at resolutions below 1080p can be questionable, but everything these days is 1080p or 4k.

Hardware support has also been ubiquitous for a while now. iPhones have had it since 2016. I usually "move on" to the next codec for my encodes once I run out of hardware that doesn't support it, and that happened for me with h.265 in 2019. My iPad, laptop, and Shield TV are still holding me back from bothering with AV1. Though with how slow it is, I might stick with h.265 anyways.


The guide isnt saying 95% of source content is h264. Its saying 95% of files you would download when pirating are h264. The scene, by and large, is transcoding h265 4k to h264 720/1080. The 4k h265 is available but its considered the 'premium' option.


The scene maybe, but outside of the scene and into general uploads I'd say it's more like 80% h265.


Most 1080p encodes I see on pirate bay are h.265 these days.

But frankly, most of what "the scene" produces it trash. I gave up on waiting for proper blu-rays for the remaining seasons of Bojack Horseman and pirated them a few weeks ago, and all the options were compromised. The best visual quality came from a set that was h.265 encoded with a reasonable average bitrate, yet the quality still did not reflect the bitrate at all, with obvious artifacting in fades and scenes with lots of motion. I usually get much better results at only slightly larger file sizes with my own blu-ray rips.

I'm pretty sure the key difference is that I go for a variable bitrate with a constant quality, whereas most scene groups want to hit an arbitrary file size for every episode regardless of whether or not that is feasible for the content. Every episode in this set is almost exactly 266 MB, whereas similar shows that I rip will vary anywhere from 200 to 350 MB per episode.


Yeah, tv shows are tough. I should caveat that I'm talking mostly about movies. I find a _lot_ more 265 content for tv shows. I also am generally on usenet rather than torrenting.


That makes sense, a 20-40% space savings means a lot more for 6 seasons of TV than it does for one 2-hour movie.


> Hardware support has also been ubiquitous for a while now.

With how limited browser support for h265 is, I always have to encode an h264 version anyway.

At that point I just encode a 720p h264, a 1080p h264, and a 4K HDR AV1 encode of all media I store.


That's on the browser vendors.

Google added HEVC support to Chrome in 104. It relies on decoders exposed by the host OS, negating the need to license a software decoder.

There's no reason Firefox couldn't do the same.

EDIT: Apparently, similar support showed up in nightly Firefox builds late last year, hidden behind `media.wmf.hevc.enabled`


> There's no reason Firefox couldn't do the same.

> It relies on decoders exposed by the host OS, negating the need to license a software decoder.

Windows requires you to pay (!) to get access to h265 decoding. Someone needs to license the decoder at some point, and that means you'll have to pay for it one way or the other.


But the GPU vendors already provide this directly (Nvidia, Intel, and AMD). It can absolutely be done at no extra cost to the user. There are also open source software decoders that can be installed and play nice with WMF.


> But the GPU vendors already provide this directly (Nvidia, Intel, and AMD). It can absolutely be done at no extra cost to the user. There are also open source software decoders that can be installed and play nice with WMF.

Somehow I doubt that Nouveau or the in-kernel AMDGPU have paid the license fee for HEVC decoding, or that it works well with WMF...


We're just whittling down to a smaller and smaller subset of users. 99.9% of users shouldn't be made to go without just because 0.1% of users can't have it.

Though even then, ffmpeg is open source and decodes hevc just fine. I get why browser vendors would not want to bundle ffmpeg, but that shouldn't stop them from leveraging it if the user already has it installed.


> Uhh, not in my experience. Its extremely difficult to find h265 sources for a large majority of content.

Sounds like you need some new sources. For now content I generally see x264 and x265 for just about everything. 264 isn't going anywhere because many older design set top boxes (including those still running Kodi on Pi3s) don't have hardware decode support, but 265 has become the default for 4K (which older kit doesn't support anyway) with 1080 & 720 being commonly available in both.

Admittedly some of the 265 encodes are recompressions of larger 264 sources and sometimes bad settings in either encode (including just choosing an already overly crunched source) show through, but that isn't common enough to be problematical (my usual complaint is that encodes like that strip subs, though that is useful: avoiding 265 encodes with no subs avoids the other issues mostly too).

Few are going back and making 265 encodes for older sources, so that may be an issue you've faced, but if that content has a new BR release or other re-release (like when B5 got a slightly remastered version on one of the streamers) then you'll get both formats in the common resolutions.


That's not my experience at all.

I mean I've gone all 4K/HDR a number of years ago, and all streaming 4K and disc 4K is HEVC. So all the piracy content is WEB-DLs or UHD disc rips of that and it is often not re-converted, but even if it it tey still use HEVC.

H.264 is a fine codec, but it doesn't support HDR and also really starts to show its weakness in efficiency at 4K resolution. At 1080p SDR it fairs much better vs HEVC.


I think the big switch will happen once most people have TV's that can do 10bit color and true HDR. H264 can definitely do 10 bit but I'm not sure how well it handles higher dynamic range content (or if it even can) but H265 definitely can.


I feel like the switch from AVC (h.264) to HEVC (h.265) has already happened. It's used in 4k blu rays, most premium streaming services, and hardware support has been ubiquitous for at least 6 years.


Not really. Only 4k content and anime seems to use HEVC/h265. Anything lower resolution has stuck to h264 for the time being.


But anything made in the last few or more years is 4K now and everything I watch is 4K, so all I find is HEVC stuff for everything.

Sure, if you are going to go get an older show that's pre 4K/HDR or a movie that isn't on UHD disc yet, then it will be H.264 of course.

But if you primarily watch newly made 4K/HDR content, it's all been HEVC for years now.


Again, depends on your source content. Obviously 4k/HDR is H265. Plenty of shows are still 1080p source though even today. Not the 'flagship' shiny ones, but there's a lot more 1080p max source content. And for those, the proper format is H264, and still is what is released today.


FWIW IIRC yts.mx began offering H.265 on standard resolution films about a year or two back.


Yeah, and most people consider stuff off yts to be of poor quality. Encodes are bad and do not meet standards.


MPEG 5 EVC Baseline, arguably the improved / refined version of H.264, actually compress better while having the same complexity, Both in terms of mental model and computational cost.

Somewhat unfortunate that never became anything.


Twitch... I just had DiVX vs Xvid flashbacks




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: