Live data from Hacker News

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

janstechtalk.blogspot.com

81–90 of 121 posts

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

#81
post #27

Earlier quoted context omitted.

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

i seriously don't see zipping a RAW video file achieving any compression gains let alone 95%

If you mean raw, in the sense of a stream of RGB (or YUV) images one after each other, i would expect zip to give significant compression, especially for something with solid colours like a desktop screen.

H.265 is obviously going to be a lot better, but compared to doing nothing, even something stupid like RLE compression is going to be helpful.

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

#82

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?

Almost all Intel CPU sold in the past 5 years has had an HEVC hardware decoder, and 4 years if you look at HEVC 10.

Most smartphone has also HEVC decode in the past 4 years.

Basically the adoption hurdle has nothing to do with Hardware. Only the two A in FAANG are supportive of JVET or MPEG standard. Others prefer their "patent free" ( cough ) AV1 codec.

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

#83
post #79

Earlier quoted context omitted.

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.

If you assume there's only one file you could probably skip it.

But the question was about using the zip file as a source for streaming, and that will work fine even if you have to spend an extra read to load the directory first.

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

#84
post #82

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?

Almost all Intel CPU sold in the past 5 years has had an HEVC hardware decoder, and 4 years if you look at HEVC 10. Most smartphone has also HEVC decode in the past 4 years. Basically the adoption hurdle has nothing to do with Hardware. Only the two A in FAANG are supportive of JVET or MPEG standard. Others prefer their "patent free" ( cough ) AV1 codec.

Netflix (the N in FAANG) uses device-appropriate codecs and formats, and defaults to AVC (H.264). Googling around shows they provide HEVC (H.265) streams to at least some devices.

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

#86
post #79

Earlier quoted context omitted.

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

If you assume there's only one file you could probably skip it. But the question was about using the zip file as a source for streaming, and that will work fine even if you have to spend an extra read to load the directory first.

I don't think you can safely assume random reads if you are streaming. Usually the point of a stream is you have to process the file in-order.

Regardless, if for some weird reason you really liked the zip compression algorithm (DEFLATE), you would probably just use gzip instead (same compression algorithm, no weird file format with critical metadata at the end). Its also the compression algo used by PNGs.

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

#87

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…

Without at least some semi-objective compassions on the "visual quality", your data is meaningless. Like, how can you tell crf23 of x264 is closer to your x265-x265 version than, say, a crf24 x264 one?

As a rule of thumb, x265 works better (compared to x264) at lower bitrate / worse quality. You won't be able to achieve "same quality, half size" at higher bitrate easily.

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

#88

Earlier quoted context omitted.

> 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.

[deleted]

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

#90
post #81

Earlier quoted context omitted.

i seriously don't see zipping a RAW video file achieving any compression gains let alone 95%

If you mean raw, in the sense of a stream of RGB (or YUV) images one after each other, i would expect zip to give significant compression, especially for something with solid colours like a desktop screen. H.265 is obviously going to be a lot better, but compared to doing nothing, even something stupid like RLE compression is going to be helpful.

that's not how Zip works though

Edit: You can disagree, but video files do not compress with zip. Feel free to do the experiments on your own time. Zip looks for combinations of letters/sequences. That's not how a video file structured. To make video smaller, smart people created a dedicated type of compressors.

Post reply on HN