x264 vs x265 Part1
x265 the successor to x264 has been out for quite some time, but the earlier builds were slow and prone to compression artifact. x265 has had a lot of time to mature and I think its time to dive in and see how it compares to x264.
In this comparison I will be using x265 version 2.1(bundles with handbrake 1.0.7) against x264 148 r2708. To perform this analysis I used downloaded a 4k video and down scaled it to full HD then used Constant Rate Factor(CRF) of 22 to encode the video on all the presets provided by x264 and x265 namely UltraFast, superFast, veryFast, Faster, Fast, Medium, slow, slower, veryslow and Placebo.
Now for those of you who don't know CRF tries to encode the video by maintaining a constant perceived video quality however CRF isn't perfect, but its pretty damn good as you will see in the Frame stills at the end.
First up encoding speed. Now my PC is slightly dated but I haven't had a need to upgrade yet.
Intel i7 4770k, 32gb 1600 DDR, AMD 480X. Note that I did not use any GPU acceleration.
Unsurprisingly x265 is constantly below its predecessor performing about 60% as fast as x264, which one would expect given that x265 does a lot more computations, interestingly enough there is almost no speed impact going from very fast to faster on x265. And a huge performance dip of 50% going from medium to slow on x265, we will have to see if it the compression and quality makes up for it. Anything above slow just becomes to slow to bare.
So lets take a look at the compression size now remember CRF tries to encode the files with a consistent quality, as you'll see later.
And right of the bat you can see x265 outperforming x264 the whole way with the filesize evening out at faster preset and x265 then maintaining a constant 30% extra compression and as you can see from the stills below nearly all the preset have a very similar visual quality. There also not a lot of extra filesize compression happening between presets hopefully they make up for it in visual quality.
Now these are the half resolution and its a lot harder to see the smaller changes you can find the full versions here https://imgur.com/a/pdb3p
For me personally I can see constant artifacts from Ultrafast to Fast with quite a few disappearing with medium and a few more with slow albeit smaller changes, but after slow it becomes really difficult to notice those artifacts but if i squint I can still make them out.
Important note, you may be thinking "hey I can't really see that much of a difference between veryfast and any other preset yet it has such a small filesize and large performance advantage, why would you use any other preset?" Well during video playback the compression artifacts REALLY show with ultrafast up to faster suffering from strange distortions and jittery frame spaces, no doubt due to the motion estimation that is compromised in those presets.
These distortions are visible in still frame in ultrafast and superfast and only noticeable in spanning and camera motion shots
and disappear when choosing anything past the fast preset
In conclusion whilst x265 is about 60% as fast as x264 it does offer 30% extra compression. And whilst the filesize doesn't change much from preset to preset there are definitely visual artifacts that appear most of them are gone when you hit the fast preset, with fast and medium giving the best quality to performance and slow in my opinion the last preset where any artifacts are noticeable anything higher than slow is a waste.
In the next part I will look at the CRF scaling and try and show some of the stargate: sg-1 subspace turbulence