Log in

View Full Version : Help me get the most out of x265 at 1000 kbps


Encoder
31st March 2025, 19:59
I have been doing most of my video encoding using x265. Been trying out SVT-AV1-PSY too but it takes a bit long to render for my liking. I always aim for the 1000 kbps range for small portable files.

Although I have been using x265 for years now, I don't know much at all about the additional options and settings. One thing that has been bothering me about x265 compared to AV1 is the discoloration of background areas. For instance, a gray wall might have compression artifacts that are pink and green. I am using the 8-bit encoder on 8-bit sources. Some people have suggested that I use the 10-bit x265 encoder instead, but in my opinion, the 10-bit encoder introduces new compression tiles that are even bigger, more noticeable, and make the picture blurrier.

Lately I have been downscaling 1080p content to 900p. It decreases encoding time but looks almost the same. I have found that rendering in average bitrate instead of CRF values increases the picture quality, particularly in dark scenes. I'm also curious if it's possible to add artificial grain to x265 like in SVT-AV1. I am using Handbrake by the way.

RanmaCanada
1st April 2025, 00:06
Pretty sure that is what https://forum.doom9.org/showthread.php?t=175776 thread is for..Hard to believe it started almost a decade ago haha..

Z2697
1st April 2025, 02:54
the 10-bit encoder introduces new compression tiles that are even bigger, more noticeable, and make the picture blurrier.


Are you saying that 10bits uses larger blocks? (and the rest is you assumption based on that?)
Or you mean it creates more noticeable artifacts?

Between 8 10 12 bits, there's nothing fundamentally different other than the bitdepth.

And I think 1000 kbps @ 1080p is usually low enough a bitrate that SVT-AV1 is really better than x265. (that's gonna vary depending on the content of the video, but usually)
Remember to use tune=0 in SVT-AV1, by the way. It's the only practical tune but unfortunately it's not the default.
I don't understand why you say it's "too slow", it's not like its speed is unchangeable, the presets have a wide range of speed.

VoodooFX
1st April 2025, 10:39
I always aim for the 1000 kbps range for small portable files.

Lately I have been downscaling 1080p content to 900p. It decreases encoding time but looks almost the same. I have found that rendering in average bitrate instead of CRF values increases the picture quality, particularly in dark scenes.

It's silly to use some bitrates, use CRF! Downscale to 720p or 576p.

Here are settings for better quality:
--no-sao --deblock=-1:-1 --aq-mode 1

increased speed:
--ctu 32 --max-tu-size 16 --merange 44

excellentswordfight
2nd April 2025, 07:56
It's silly to use some bitrates, use CRF! Downscale to 720p or 576p.

Here are settings for better quality:
--no-sao --deblock=-1:-1 --aq-mode 1

increased speed:
--ctu 32 --max-tu-size 16 --merange 44
Well, if the goal is to do 1080p, or close to 1080p at around 1Mbps (regardless of fixed/crf), those settings might not result in better quality. Although I use those a lot of the time, its usually only at crf 20 and bellow.

I would probably start with something like this, assuming 1080p24 SDR.

--preset slower --profile main10 --level-idc 40 --crf 26 --keyint 240 --min-keyint 24 --rc-lookahead 96 --aq-mode 3 --selective-sao 1

Given the nature of crf the bitrate will ofc vary depending on content, but I think it should be around 1-2Mbps at 1080p. And AFAIK im pretty sure that the developers of x265 at some point stated that at the same avg bitrate, crf and 2pass produce equal quality video, and this has been my experience as well.

benwaggoner
4th April 2025, 22:17
Well, if the goal is to do 1080p, or close to 1080p at around 1Mbps (regardless of fixed/crf), those settings might not result in better quality. Although I use those a lot of the time, its usually only at crf 20 and bellow.

I would probably start with something like this, assuming 1080p24 SDR.

--preset slower --profile main10 --level-idc 40 --crf 26 --keyint 240 --min-keyint 24 --rc-lookahead 96 --aq-mode 3 --selective-sao 1
Reasonable start for arbitrary SDR content, yeah.

Given the nature of crf the bitrate will ofc vary depending on content, but I think it should be around 1-2Mbps at 1080p. And AFAIK im pretty sure that the developers of x265 at some point stated that at the same avg bitrate, crf and 2pass produce equal quality video, and this has been my experience as well.
Note you can set --crf, --vbv-bitrate, and --vbv-maxrate at the same time, and you'll get crf quality unless it would exceed those VBV limits, and then it'll cap it there. It can also work to do a 1-pass CRF encode saving the log file, and if the ABR is higher, then do a 2nd pass setting the target bitrate. That 2nd pass will be faster than the 1st due to the log data being available.

And yes, with the same VBV settings, all 2-pass effectively does is figure out the CRF that would give you the correct size file, and then encodes it to that CRF.