Live data from Hacker News

Comparing H.265 (HEVC) and H265 video file size

janstechtalk.blogspot.com

71–80 of 121 posts

Re: Comparing H.265 (HEVC) and H265 video file size

#71

The main hurdle for adoption, aside from onerous patents, is waiting for hardware acceleration to be common place. What is the current state of h.265 hardware accel? Does it come with everything yet like h.264 does?

I think basically all of Intel and NVidias current offerings have hardware 265 decode. But AMD GPUs still only do h.264 (which might be a patent thing, or might just be that their target market doesn't really care. I know I don't, my gaming PC is plenty powerful to just software decode H.265 anyway, although the power efficiency gains would be nice)

The mobile market I have no idea about.

EDIT: I was wrong about AMD - see replies.

Re: Comparing H.265 (HEVC) and H265 video file size

#72

Earlier quoted context omitted.

h.265 makes files smaller than h.264 for a given bit rate. So an h.265 I-frame will be smaller than an h.264 I-frame. If it's a mostly static computer screen, then you can get even better encoding effeciency by using a longer GOP structure so the I-frames are spread out even futher. Of course, the trade of is seeking gets worse, but works out great for push play and watch type of deliverables. h.264 can do this as we…

> h.265 makes files smaller than h.264 for a given bit rate. You mean for a given CRF ("crf" isn't an official term, it's what x264/x265 call their fixed quality mode). "Bitrate" is literally how big the file is.

Huh? No, I mean for a given bitrate. If I encode a video at 500kbps that is the bitrate. A video at 500kbps in h.265 should be the same visual quality as an h.264 at 1000kbps.

Filesize is literally how big the file is. Bitrate is how much data can be used over a window of time.

Re: Comparing H.265 (HEVC) and H265 video file size

#73

The main hurdle for adoption, aside from onerous patents, is waiting for hardware acceleration to be common place. What is the current state of h.265 hardware accel? Does it come with everything yet like h.264 does?

I think basically all of Intel and NVidias current offerings have hardware 265 decode. But AMD GPUs still only do h.264 (which might be a patent thing, or might just be that their target market doesn't really care. I know I don't, my gaming PC is plenty powerful to just software decode H.265 anyway, although the power efficiency gains would be nice) The mobile market I have no idea about. EDIT: I was wrong about AMD…

> But AMD GPUs still only do h.264

Ryzen 4750U on a T14 reporting in:

    vainfo: VA-API version: 1.10 (libva 2.10.0)
    vainfo: Driver version: Mesa Gallium driver 20.3.4 for AMD RENOIR (DRM 3.40.0, 5.11.4-arch1-1, LLVM 11.1.0)
    vainfo: Supported profile and entrypoints
          VAProfileMPEG2Simple            : VAEntrypointVLD
          VAProfileMPEG2Main              : VAEntrypointVLD
          VAProfileVC1Simple              : VAEntrypointVLD
          VAProfileVC1Main                : VAEntrypointVLD
          VAProfileVC1Advanced            : VAEntrypointVLD
          VAProfileH264ConstrainedBaseline: VAEntrypointVLD
          VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
          VAProfileH264Main               : VAEntrypointVLD
          VAProfileH264Main               : VAEntrypointEncSlice
          VAProfileH264High               : VAEntrypointVLD
          VAProfileH264High               : VAEntrypointEncSlice
          VAProfileHEVCMain               : VAEntrypointVLD
          VAProfileHEVCMain               : VAEntrypointEncSlice
          VAProfileHEVCMain10             : VAEntrypointVLD
          VAProfileHEVCMain10             : VAEntrypointEncSlice
          VAProfileJPEGBaseline           : VAEntrypointVLD
          VAProfileVP9Profile0            : VAEntrypointVLD
          VAProfileVP9Profile2            : VAEntrypointVLD
          VAProfileNone                   : VAEntrypointVideoProc

mpv also reports "Using hardware decoding (vaapi)." when I try to play an HEVC file.

Re: Comparing H.265 (HEVC) and H265 video file size

#74

Earlier quoted context omitted.

I think basically all of Intel and NVidias current offerings have hardware 265 decode. But AMD GPUs still only do h.264 (which might be a patent thing, or might just be that their target market doesn't really care. I know I don't, my gaming PC is plenty powerful to just software decode H.265 anyway, although the power efficiency gains would be nice) The mobile market I have no idea about. EDIT: I was wrong about AMD…

> But AMD GPUs still only do h.264 Ryzen 4750U on a T14 reporting in: vainfo: VA-API version: 1.10 (libva 2.10.0) vainfo: Driver version: Mesa Gallium driver 20.3.4 for AMD RENOIR (DRM 3.40.0, 5.11.4-arch1-1, LLVM 11.1.0) vainfo: Supported profile and entrypoints VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointVLD VAProfileVC1Simple : VAEntrypointVLD VAProfileVC1Main : VAEntrypointVLD VAProfil…

Ah it looks like I was mistaken, they've had h265 encoding and decoding support for a while. Not sure where my brain got this idea from, I even have an AMD gpu atm.

https://en.wikipedia.org/wiki/Unified_Video_Decoder

https://en.wikipedia.org/wiki/Video_Core_Next

Re: Comparing H.265 (HEVC) and H265 video file size

#75
post #36

Earlier quoted context omitted.

Right, so that's 2 of the top 10 and 4 of the top 20 gpus per the steam hardware survey, representing 10% of steam users: https://store.steampowered.com/hwsurvey But I don't think desktops are the problem anyway as opposed to laptops/tablets. Desktop cpus are perfectly capable of decoding h265 in real time without acceleration

Looks like most of the cards in the top 20 support H.265 4:2:0 (NVidia 10XX and up), just not 4:4:4 (NVidia 16XX and up). I don't think the steam hardware survey is a good sample of the wider computer market though - the majority of people using youtube/netflix/etc on x86 devices are probably using Intel laptop chips with integrated graphics, not $500+ dedicated GPUs. (Although presumably this is probably becoming le…

Actually, Maxwell (9xx) already supports hardware-accelerated H.265 decoding, but on first-gen Maxwell (the higher-end GTX 970/980 at least) it's not pure hardware decoding and didn't work on Linux last I tried.

Re: Comparing H.265 (HEVC) and H265 video file size

#76

The main hurdle for adoption, aside from onerous patents, is waiting for hardware acceleration to be common place. What is the current state of h.265 hardware accel? Does it come with everything yet like h.264 does?

How would you if your hardware can or cannot decode h.265? Would it simply not play or might play but stutter, or play in some compromised way?

I have an iPad Mini 2 from 2013. It can play H265 with software decoding, and it doesn't stutter. The only drawback is that the machine gets hot.

Re: Comparing H.265 (HEVC) and H265 video file size

#77

Earlier quoted context omitted.

The original h264 file was likely optimized for write speed and not storage (which takes cpu time and can introduce lag in real time recording). Reencoding the same input file as h264 again but using FFmpeg defaults would probably yield similar file size reductions. This is just a bogus post without knowing what parameters were used to encode the original h264.

For science, I just took a 10 second screen recording of my Mac with nothing but my tiny mouse cursor moving around for a few seconds which means a very static shot. The recording came out at 7.5MB. There was no audio in the original recoding. I then used that as a source to transcode with x264 crf 23. New filesize 2.0M. ~26% ffmpeg -i input.mov -c:v libx264 -crf 23 x264.mp4 Next, I used the same 7.5MB source to tran…

I'd still call the original bogus. Its not unexpected that H.265 is smaller than H.264, just that the article made an unfair comparision.

As your comparision found, the majority of the size reduction relative to the original was related to encoding parameters, only 13% was related to codec choice. Of course if you start from the better encoded H.264 file things look better for H.265, but not 94% better.

Re: Comparing H.265 (HEVC) and H265 video file size

#78
This would be true even re-encoding to AVC. Recording, even hardware accelerated, is designed to use little compression and have good quality, so it can keep up with the stream without slowing down your PC. The resulting bitrates are necessarily very high. Re-encoding more efficiently, without the realtime requirements, will usually yield good results.

Re: Comparing H.265 (HEVC) and H265 video file size

#79
post #27

Earlier quoted context omitted.

but can you stream a zip file compressed this way to play the video on a streaming protocol?

Yes. No commonly-used compression formats lack streaming capabilities.

Don't zip files store the directory structure/index info at the end? I would assume that's pretty important for decompressing.

Re: Comparing H.265 (HEVC) and H265 video file size

#80
post #36
post #24

Earlier quoted context omitted.

Most Turing and above Nvidia cards have support for hardware accelerated decode of h.265 [0]. Modern Intel chips also support hardware accelerated decode (support started with Skylake [1]). Not sure about AMD. [0] https://developer.nvidia.com/video-encode-and-decode-gpu-sup... [1] https://en.wikipedia.org/wiki/Intel_Quick_Sync_Video#Hardwar...

Right, so that's 2 of the top 10 and 4 of the top 20 gpus per the steam hardware survey, representing 10% of steam users: https://store.steampowered.com/hwsurvey But I don't think desktops are the problem anyway as opposed to laptops/tablets. Desktop cpus are perfectly capable of decoding h265 in real time without acceleration

> But I don't think desktops are the problem anyway as opposed to laptops/tablets

On the Apple end of things, h265 hardware decode has been supported since the A9 (iPhone 6S, introduced 2015)

They also list hardware decode support on Macs as of Intel 6th gen CPUs (Skylake, introduced 2015).

Post reply on HN