Hacker News new | ask | show | jobs
by jetzzz 1917 days ago
The comparison of H.264 and H.265 in this article doesn't make any sense. Lossy codecs can make files almost arbitrarily small at the expanse of quality. You should look at both quality and size; size alone doesn't mean anything.

Also H.264 and H.265 are just formats; there are many encoders of varying quality which can generate such files and each encoder has tons of settings. I don't know which encoder macOS uses but ffmpeg includes state-of-the-art H.264 encoder (x264). Simply reencoding video from H.264 to H.264 using ffmpeg can give you better quality/size ratio than the original file.

> H.264 codec (or MPEG-4 Part 10), once upon a time know in the scene as DIVX.

No, DivX refers to MPEG-4 Part 2 which is a completely different codec.

3 comments

>there are many encoders of varying quality which can generate such files and each encoder has tons of settings. I don't know which encoder macOS uses but ffmpeg includes state-of-the-art H.264 encoder (x264). Simply reencoding video from H.264 to H.264 using ffmpeg can give you better quality/size ratio than the original file.

It's actually even more complicated than that. Each encoder has multiple settings on how much CPU to spend on the compression. Live screen recording (which this was) usually has the setting set to spend little CPU and get little compression. So like you said you don't need to change which format you use to get better compression, but you also often don't even need to change what encoder you use, you can just change the compression setting to use extra CPU (which might not be possible on a live recording).

Another factor is keyframe rate, which makes the bitrate requirement much higher at the same quality but is needed to let people join the stream more than every 30 seconds.
ffmpeg only uses x264 if you tell it too. if you don't set -c:v libx264 when creating a .mp4 output, i'm pretty sure it uses the libav h264 encoder. if you use a binary of ffmpeg without --non-free/--non-gpl (forget which) enabled, do you even get x264?
Probably not --non-gpl, x264 is under the GNU GPL.
It doesn't have a builtin h264 encoder unless I'm very out of date (looks like I'm not). It has support for some hardware encoders, which can be good enough for livestreaming.
> No, DivX refers to MPEG-4 Part 2 which is a completely different codec.

Poster is referring to the DivX Plus HD codec [1].

[1] https://en.m.wikipedia.org/wiki/DivX_Plus_HD

I wouldn't call that "what was once known in the scene as DivX"...
Neither would I. I'm just clarifying, for the benefit of other readers.
Show me any popular torrent using the word "DIVX" to refer to that.
show me any popular torrent using the word DIVX that isn't actually using Xvid
Well at least DivX and Xvid use the same video format: MPEG-4 Part 2.

MPEG-4 Part 10/H.264/AVC is a different format.