View Full Version : Help with x264 hight quality settings
nightrhyme
22nd March 2010, 14:36
So I have been learning about megui and x264 and got lost in the x264 settings. Wanted to make sure I just get he highest quality encode. Have searched for high quality settings + presets but couldn't seem to find anything useful.
I mean in the old days using XviD it was something like:
2-pass, Didees SixOfNine-Max=20.qmatrix, No B-frames, VHQ: 1, MODE SEARCH: 6, Chroma Motion, Quantizer Restrictions: 2-31 on all, Trellis, No Packet bitsream, closed GOV.
Looking for similar advice regarding x264 and a nice qmatrix ?
Thanx in advance
Inspector.Gadget
22nd March 2010, 14:40
Highest quality? Here: x264 –-crf 0 -o <output> <input>
nurbs
22nd March 2010, 14:47
You only need the presets and tunings. Try some different presets till you find one with acceptable speed (for instance --preset slow), apply the appropriate tuning for your source (--tune film) and you are good to go. There are matrices, but almost nobody uses them anymore. CRF encoding is recommended if you don't care to much about the filesize since it will give you constant quality without you having to worry about the bitrate. The default is --crf 23, lower values mean better quality and higher bitrate. You can also add --level 4.1 to the command line if you want better hardware compatibility by limiting the number of reference frames used in the presets and tunings.
nightrhyme
22nd March 2010, 22:58
Thanx so much for reply
Inspector.Gadget: Yeah that much I know :)
As I am encoding HD 1080p material I guess I should use "high Profile" ?
I found this thread by Sharktooth (http://forum.doom9.org/showthread.php?t=101813) with custom profiles:
That might be a good starting point to try and learn the settings as I can view his changes he made and compare results
But should I use the HQ profiles or SA-Blu-Ray profiles ?
sneaker_ger
22nd March 2010, 23:05
Sharltooth's post was last edited some two years ago and thus they aren't a good starting point. Follow nurbs' advice.
Inspector.Gadget
22nd March 2010, 23:06
Sharktooth's profiles are out of date, unfortunately; Zathor & co. have whipped up some more recent ones. Start by thinking about any file size restrictions; if so, use 2-pass; if not, use CRF. Do you need DXVA or other VBV buffer-dependent hardware compatibility? Does hardware otherwise limit you? What sort of trade are you willing to make between file size and encoding speed, given that you're unwilling to compromise visual quality?
I typically transcode Blu-ray material using --crf 18 --preset slow --tune film. CRF 18 is reportedly comparable to XviD Q2, e.g. visually transparent on virtually all sources. Encoding a non-grainy commercial Blu-ray feature length film, say ~2 hours and cropped/resized to 1280x528/544, typically takes me about 7 hours on my C2D laptop.
prOnorama
23rd March 2010, 00:11
What nurbs said, and if you want to do some reading here's a page explaining the settings:
http://mewiki.project357.com/wiki/X264_Settings
And since the wiki page doesn't explain the --preset and --tune settings here they are the current settings from from x264 --fullhelp
--preset Use a preset to select encoding settings [medium]
Overridden by user settings.
- ultrafast:
--no-8x8dct --aq-mode 0 --b-adapt 0
--bframes 0 --no-cabac --no-deblock
--no-mbtree --me dia --no-mixed-refs
--partitions none --ref 1 --scenecut 0
--subme 0 --trellis 0 --no-weightb
--weightp 0
- veryfast:
--no-mbtree --me dia --no-mixed-refs
--partitions i8x8,i4x4 --ref 1
--subme 1 --trellis 0 --weightp 0
- faster:
--no-mbtree --no-mixed-refs --ref 2
--subme 4 --weightp 1
- fast:
--rc-lookahead 30 --ref 2 --subme 6
- medium:
Default settings apply.
- slow:
--b-adapt 2 --direct auto --me umh
--rc-lookahead 50 --ref 5 --subme 8
- slower:
--b-adapt 2 --direct auto --me umh
--partitions all --rc-lookahead 60
--ref 8 --subme 9 --trellis 2
- veryslow:
--b-adapt 2 --bframes 8 --direct auto
--me umh --merange 24 --partitions all
--ref 16 --subme 10 --trellis 2
--rc-lookahead 60
- placebo:
--bframes 16 --b-adapt 2 --direct auto
--slow-firstpass --no-fast-pskip
--me tesa --merange 24 --partitions all
--rc-lookahead 60 --ref 16 --subme 10
--trellis 2
--tune Tune the settings for a particular type of source
or situation
Overridden by user settings.
Multiple tunings are separated by commas.
Only one psy tuning can be used at a time.
- film (psy tuning):
--deblock -1:-1 --psy-rd <unset>:0.15
- animation (psy tuning):
--bframes {+2} --deblock 1:1
--psy-rd 0.4:<unset> --aq-strength 0.6
--ref {Double if >1 else 1}
- grain (psy tuning):
--aq-strength 0.5 --no-dct-decimate
--deadzone-inter 6 --deadzone-intra 6
--deblock -2:-2 --ipratio 1.1
--pbratio 1.1 --psy-rd <unset>:0.25
--qcomp 0.8
- psnr (psy tuning):
--aq-mode 0 --no-psy
- ssim (psy tuning):
--aq-mode 2 --no-psy
- fastdecode:
--no-cabac --no-deblock --no-weightb
--weightp 0
- zerolatency:
--bframes 0 --rc-lookahead 0
--sync-lookahead 0 --sliced-threads
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.