View Full Version : Modern guide for x264 settings?
shae
22nd February 2022, 16:47
Is there anywhere an up-to-date guide on recommended encode settings for various scenarios?
I assume there's more to it than choosing a preset, CRF, deblocking, and maybe tune.
LigH recently brought up (https://forum.doom9.org/showthread.php?p=1961531#post1961531) the lack of comprehensive official documentation. It's unfortunate there's isn't even any (semi-)official introductory text.
A good example that comes to mind might be the following (but yes, audio encoders are much simpler):
https://wiki.hydrogenaud.io/index.php/LAME
benwaggoner
22nd February 2022, 21:23
Yeah, x265 is really the outlier in terms of documentation with https://x265.readthedocs.io/en/master/. Although even that hasn't received much updating the last couple of years.
The best starting point is probably x265.exe --fullhelp.
It's open source; the documentation is as good as people volunteer to write. And it's hard to get developers to write it. Heck, getting them to add useful detail in comments in their own code can be a huge struggle.
shae
23rd February 2022, 02:49
Instead of relying on the developers, a better basis might be a wiki that's a distillation of discussions here on doom9 (and elsewhere).
Then, with time, knowledgeable people who regularly do encodings and quality comparisons could vet for correctness and consensus.
Rumbah
23rd February 2022, 14:09
I assume there's more to it than choosing a preset, CRF, deblocking, and maybe tune.
Well, actually it is that easy with x264 for a normal use case:
Choose a preset matching the time you are willing to spend.
Choose a tuning according to your source (tune film is a good option for almost everything)
Then choose a crf with the quality you find acceptable.
For me its preset veryslow, tune film, crf 20 for 1080p and crf 18-19 for 720p. Most of the time I use -level 4.1, too, that limits b frames and reference frames for better hardware compatibility although I noticed that nowadays it isn't really necessary.
shae
23rd February 2022, 14:30
There's more to it than that. I don't even know what I don't know.
Some common things that would benefit from elaboration:
What are worthwhile ways to improve bitrate if one's willing to spend time experimenting, ways to handle more difficult material like grain, or dark scenes (aq-mode=3 still a thing?), banding (what's up with hardware support for 10-bit?). Low-framerate animation, deblocking (-3:-3 worthwhile or considered not a good idea in modern x264?). Aggregate graphs showing the effects of common encode presets/tunes on bitrate and quality...
You mentioned levels. Even knowing what's the status with L5+ support could be useful. Does it matter much anymore when mobile can software-decode, or maybe mobile can hardware-decode L5 nowadays because UHD is a thing?
Blue_MiSfit
23rd February 2022, 20:42
No 10 bit AVC hardware exists at a consumer level, that hasn't changed. Professional IRDs of course can do 10 bit, 4:2:2 etc.
Most companies are focusing on shot based encoding to optimize ABR streaming.
lvqcl
23rd February 2022, 21:08
No 10 bit AVC hardware exists at a consumer level, that hasn't changed.
It seems that at least some smartphones support HW decoding of Hi10p AVC: https://forum.xda-developers.com/t/h-264-10bit-hardware-acceleration-hw-works.4144881/
benwaggoner
24th February 2022, 03:28
It seems that at least some smartphones support HW decoding of Hi10p AVC: https://forum.xda-developers.com/t/h-264-10bit-hardware-acceleration-hw-works.4144881/
AFAIK there isn't any consumer hardware that can do 10-bit H.264 that can't also do 10-bit H.265, which has kept 10-bit H.264 from getting broad use for distribution encodes.
10-bit HEVC can be pretty well assumed now, as 8-bit only was mainly in phones that were replaced several years ago by now. I appreciate that AV1 made 10-bit support mandatory.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.