View Full Version : What -crf value do you use?
Carpo
3rd June 2011, 18:21
For
480p
720
1080p
I am curious to see if there is a pattern, i normally stick to
16 for 480
18 for 720p
20-21 for 1080p
I am curious because all the reading i have done, has suggested that for 720 and 1080 i could use 22 or even 24 and not loose any perceivable quality while maintaining a good size to quality ratio
Lam3rD
3rd June 2011, 19:13
For me it's:
14-19 for 480p/576p
16-20 for 720p
16-19 for 1080p
The value is picked depending on the image complexity.
nurbs
3rd June 2011, 19:17
You guys should post your settings, because without them telling what CRF value you use isn't really informative. CRF only gives roughly the same quality with the same settings and similar sources.
Carpo
3rd June 2011, 19:46
i use the default settings in MeGUI only changing the -crf value,
mainly use the x264: DXVA-High def for HD which gives me
program --level 4.1 --preset slow --tune film --crf 19 --vbv-bufsize 50000 --vbv-maxrate 50000 --output "output" "input" "
for SD content I normally use x264: DXVA-Standard def which gives me
program --level 3.1 --tune film --crf 16 --vbv-bufsize 14000 --vbv-maxrate 17500 --output "output" "input"
I do not know enough about all the settings to change them so i leave them as is.
Normally -crf19 gives me great results, as i say im just curious :)
Is there an .avs script that i could use to test compressibility of a certain type of film, or is it mainly guessing what value to use depending on the picture quality. Taking in factors such as light or dark areas, grain, motion?
for 720p encodes I use.
program --level 4.1 --preset veryslow --tune film --crf 18.0 --output "output" "input"
But i do use MvDegrain1 for all my encodes.
Lyle_JP
4th June 2011, 00:26
I use crf 17 for 480p and I'm very happy with the results.
jsquare
4th June 2011, 01:21
My encodes are mostly 720p for AVCHD compatibility, don't like the effects of MB-Tree and can't see much benefits with Trellis except for a bigger file size so I disable both, CRF18 to CRF20 depending on the source: --crf 19 --level 4 --keyint 48 --min-keyint 24 --open-gop normal --ref 5 --no-mbtree --b-adapt 2 --b-pyramid strict --direct auto --deblock -3:-3 --trellis 0 --vbv-bufsize 15000 --vbv-maxrate 15000 --aud --slices 1 --nal-hrd vbr --colorprim bt709 --transfer bt709 --colormatrix bt709
For Blu-Ray 1080p CRF18 to CRF20 with MB-Tree for a bit of compression: --crf 19 --level 4.1 --keyint 24 --min-keyint 24 --open-gop bluray --ref 4 --rc-lookahead 24 --b-adapt 2 --b-pyramid strict --direct auto --deblock -3:-3 --trellis 0 --vbv-bufsize 25000 --vbv-maxrate 25000 --aud --slices 4 --nal-hrd vbr --colorprim bt709 --transfer bt709 --colormatrix bt709
For SD/DVD up to 480p sources CRF20 to CRF22: --profile main --crf 21 --level 3 --keyint 120 --min-keyint 24 --ref 6 --no-mbtree --b-adapt 2 --b-pyramid strict --direct auto --deblock -1:-1 --trellis 0 --vbv-bufsize 5000 --vbv-maxrate 5000 --me umh --aud --nal-hrd vbr --colorprim smpte170m --transfer smpte170m --colormatrix smpte170m
And for portable devices or mobile phones up to 240p CRF20 to CRF22, note that AQ and PSY are also disable:
--profile baseline --crf 21 --level 1.3 --keyint 240 --min-keyint 24 --ref 7 --no-mbtree --rc-lookahead 120 --no-psy --partitions p8x8,b8x8,i4x4,p4x4 --vbv-bufsize 1000 --vbv-maxrate 768 --me umh --aud --nal-hrd vbr --colorprim smpte170m --transfer smpte170m --colormatrix smpte170m --aq-mode 0
upyzl
4th June 2011, 01:57
Of course this should be based on your specific requirement...
For me, I use --crf 24 + preset >= 6 (slow) + suitable tune for online/web videos to convenient transportation and --crf <= 19 + preset >= 6 + suitable tune for other purpose (should restrain banding or other possible artifacts when lack of bitrate...)
Carpo
4th June 2011, 07:43
so it looks like im in the right ball park then, guess i need to learn a bit more to give me greater compression while retaining quality.
My ultimate goal is to have files that are quite small, while retaining as much quaility as is possible, my encodes will be x264 1080p + hd audio (dts ms, true hd).
Is there anything people can suggest to me to change in the settings to achieve this goal or are the settings i use good enough?
Blue_MiSfit
4th June 2011, 09:51
Why would you ever disable aq / psy?
smok3
4th June 2011, 10:43
for internet/intranet/flash: preset default, crf 21-23, tune film, filter -1,-1
cartoons: preset default, crf 23, filter 0,0
for 1080p: preset default, crf 21-23, tune film, filter -1,-1
backups: crf 18 or lower, did not try 4:2:2 yet
htc wildfire s: --pass N --bitrate 400 --stats "my.stats" --preset medium --ref 1 --profile baseline (video no bigger than 480x320)
Carpo
4th June 2011, 11:48
Why would you ever disable aq / psy?
i don't, as i have said in the post above, i leave the defaults alone and only change the crf vaule.
Just checked the DXVA-High def profile and its aq = 1 so its there, should i be using a different value?
This is why i am asking so many questions in relation to what i need, i dont know what the options do, so i go by the rule of thumb, if you dont know what it is or does leave it alone :)
edit: guessing that wasn't meant for me, damn i need sleep.
jsquare
4th June 2011, 19:50
Why would you ever disable aq / psy?
At such small resolution (320x240) for toons or music videos I noticed that AQ introduces some artifacts, and PSY increases file size without any visible quality gains, note that I'm using these settings to playback on my 16GB Zune and Android phone not for a 55" Plasma, so I need to make it very small in size and acceptable bit-rate which never tops ~600kbps.
upyzl
5th June 2011, 02:25
@jsquare
You can use --psy-rd 0:0 instead of --no-psy
the former is better, as far as I see...
jsquare
5th June 2011, 05:10
@jsquare
You can use --psy-rd 0:0 instead of --no-psy
the former is better, as far as I see...
Thanks, I'll give it a try!
Lighto
5th June 2011, 15:23
crf 16 for SD content
crf 18 for 720p content
Didn't really handle full HD content yet.
x264.exe --preset veryslow --crf 16/18 --tune animation/film --colormatrix bt709/bt470bg -o output.mkv input.avs
Not familiar with the other x264 parameters yet but this works fine for me.
hello_hello
11th June 2011, 06:55
I'd be keen to know what sort of file sizes others tend to average using the settings they do, as that influenced my choice when picking a CRF value. I wanted something that was fairly indistinguishable from the original video but without the files sizes getting too out of control.
In the end, I've stuck to using a CRF of 19 for everything. When encoding anamorphic DVDs this gives me an average file size of around 1.6GB (usually while retaining the original 6ch AC3 audio) which seems reasonable. I'd guess (I'd have to go through a few of them to check) when encoding to 720p the file sizes average to around 2.5 to 3GB per movie. I usually convert the audio to AAC. I rarely encode to 1080p.
I use a slightly modified version of MeGUI's default BluRay preset. Not knowing a lot about what standalone players can and can't play, I'm hoping this will make my encodes playable using any standalone player capable of playing MKV/MP4 files. With the couple of players I've tested encodes on..... so far, so good.
--level 4.1 --crf 19.0 --keyint 24 --open-gop --slices 4 --vbv-bufsize 30000 --vbv-maxrate 40000
--colorprim bt709 --transfer bt709 --colormatrix bt709
For SD encodes I change the colorimetry info accordingly and --keyint to 25 for PAL or to 30 for 29.97 NTSC etc.
GodofaGap
11th June 2011, 07:57
The crf "mapping" change in the latest builds? I see a lot of crf 16ish for DVD resolution, while I always was fine with 20ish. I haven't updated my x264 in a long time though (A quick look revealed I have r1688).
asarian
11th June 2011, 10:42
I only encode 1080p, with the following settings:
--crf 14 --sar 1:1 --aud --nal-hrd none --level 4.1 --preset placebo --vbv-bufsize 70000 --vbv-maxrate 60000 --bframes 8 --aq-mode 2 --qpmin 10 --tune film
I used to use crf 16, but after some changes to aq-mode 2, I realized the bitrate for that mode was lower than it used to be, so I compensate for it ever since.
nurbs
11th June 2011, 11:42
The crf "mapping" change in the latest builds?
The biggest change with CRF in the last 300 revisions was making it framerate dependent. There were some fixes with CRF and VBV. There might have been some other stuff as well, but you'll have to go over the changelog yourself and see which of the 300 revision potentially can change CRF :)
GodofaGap
11th June 2011, 21:46
Thanks. I guess whenever I feel like updating I could do a few tests.
Carpo
12th June 2011, 00:11
For SD/DVD up to 480p sources CRF20 to CRF22:
--profile main --crf 21 --level 3 --keyint 120 --min-keyint 24 --ref 6 --no-mbtree --b-adapt 2 --b-pyramid strict --direct auto
--deblock -1:-1 --trellis 0 --vbv-bufsize 5000 --vbv-maxrate 5000 --me umh --aud --nal-hrd vbr
--colorprim smpte170m --transfer smpte170m --colormatrix smpte170m
how would i know to use that (in bold) or use bt601 or bt470 for SD content?
DGindexNV tells me the dvd is using 601 where as DG index is telling me its using bt470-2 b,g, or should i just remove those custom lines and let x264 decide?
edit: never mind, after a bit more research, i found this
Colorimetry
This is a list of all possibilities according to the mpeg-2 specs and DGDecode, and behind it how GSpot abbreviates it
1 ITU-R BT.709 I709
4 FCC (almost the same as ITU-R BT.601) FCC
5 ITU-R BT.470-2 (exactly the same as ITU-R BT.601)
(recommendation BT.601 is an update BT.470-2) I470
6 SMPTE 170M (exactly the same as ITU-R BT.601) S170
7 SMPTE 240M (almost the same as ITU-R BT.709) S240
For ColorMatrix we assume I709 = S240 and I470=FCC=S170, because the error will be very small.
so im guessing it would make no difference if i use
--colorprim smpte170m --transfer smpte170m --colormatrix smpte170m
or
--colorprim bt601 --transfer bt601 --colormatrix bt601
just want to make sure before i start backing up all my dvds :)
J_Darnley
12th June 2011, 00:37
so im guessing it would make no difference if i use
--colorprim smpte170m --transfer smpte170m --colormatrix smpte170m
or
--colorprim bt601 --transfer bt601 --colormatrix bt601
just want to make sure before i start backing up all my dvds :)
It would make a difference because one would work and the other would not.
Carpo
12th June 2011, 00:49
so stick with
--colorprim smpte170m --transfer smpte170m --colormatrix smpte170m ?
hello_hello
13th June 2011, 17:44
I only encode 1080p, with the following settings:
--crf 14 --sar 1:1 --aud --nal-hrd none --level 4.1 --preset placebo --vbv-bufsize 70000 --vbv-maxrate 60000 --bframes 8 --aq-mode 2 --qpmin 10 --tune film
I used to use crf 16, but after some changes to aq-mode 2, I realized the bitrate for that mode was lower than it used to be, so I compensate for it ever since.
I'm still curios to know what sort of file sizes others end up with.
Perfection sounds nice, but how much hard drive space does the average 1080p movie encode need with those settings?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.