1

Topic: x264 and crf: opinions needed

Not sure if this is the right section once that its still Hybrid related but here goes... What would be, for encoding videos to x264 10-bit, the highest crf value you can choose without getting a noticeable quality loss? I've searched a lot about the subject but no straight answer so far for the x264 hi10p, some ppl say you should keep it in the 22 - 24 range like 8-bit encodes (filesize output still a bit too big for me), others say you're good with crf 27 but i bet the quality is crappy with that one... Now, i know that results may vary with the source material but generally speaking which crf do you guys recomend in my case? my source material is mainly film and live action stuff, both SD and HD

2

Re: x264 and crf: opinions needed

you should keep it in the 22 - 24 range like 8-bit encodes (filesize output still a bit too big for me),

Personally I think 22-24 is to high, I would go for 16-18 for 8bit and 18-22 for 10bit when encoding normal film footage.

How much you loose heavily depends on the input you feed x264 with, so my advice is:

  1. create a 5-10min sample clip with mixed content which represents normal footage you handle (some slow, some fast, some bright, some dark, some detailed, some detail less content)

  2. encode this clip with different settings and compare them

  3. do the comparison again but also enable some light and fast filtering like:

    • Deblock QED (with it's default values) <- leave it out if you got a really high quality source

    • DeHalo Alpha (with it's default values)

    • RemoveGrain (with it's default values) <- personal favorite, since it often helps quite a bit with compression

    -> often it's far more important to do a decent filtering job than using a specific crf value
    General advice: play a bit with the filters to get a hang of it which are fast (<- especially important for high resolutions) and which are not and then test how the fast once influence compression.

  4. also try x264s internal noise reduction (doesn't do much, is fast and can help compression a bit)

Cu Selur

3

Re: x264 and crf: opinions needed

Great explanation as alwaws Selur, thanks a lot... so far i've been encoding with crf 21.50, i thought it would be overkill but now i see it was a good choice... but never done any filtering so far, i just select "tune:film" but to be honest i find no difference at all...
So now i might try some encodes with crf 21.50, dehalo alpha, removegrain and nr=100, is it a good choice? Is it safe to add even more filtering btw?

4

Re: x264 and crf: opinions needed

If more filtering is save to use heavily depends on your source, the three I mentioned are normally save to use.
For nr: from my experience values up to 500 are normally hardly visible and save to use, but that too can heavily depend on the source haven't tested how it would influence a source with a lot of dust or similar.
-> with filtering there are normally a few thinks to keep in mind:
a. less is often more (meaning, don't simply throw filters on a source)
b. different content will be altered differently by the same filter (so something that might be okay for DVD content might be really bad for Blu-ray content)
c. the larger your pixel count the more your filters will slow down your encoding, so if you need to encode fast only use light and fast filtering

All in all it all comes down to a lot of testing and personal taste since there is no real objective quality/beauty measurement.

Cu Selur

5

Re: x264 and crf: opinions needed

Yeah i understand... guess i'll have to try until i find my "perfect" setting....

btw just out of curiosity, whats wrong with the Deblock QED filter for hq sources?

6

Re: x264 and crf: opinions needed

a. high quality content normally doesn't need additional deblocking
b. deblocking can slow things down quite a bit depending on your encoding settings

7

Re: x264 and crf: opinions needed

Hello.
If I may share...

Output quality is directly related to input quality.. but what I noticed in expirience.
High Quality inputs can be recoded with higher CRF settings like 25 if u go directly ripping BRD source.. and use good x264 settings. There is enough raw data there for algorithms to pull.

Different thing is if you use resize of input. For example 1080p -> 720p
Choosing right resize algorithm is of essence here. For this example is good to resize with Lanczos and add UnSharpen mask of strength like 0.01 - 0.03 with small radius 3x3.
It might be even helpful to do resize anyway with no actual resolution change.. just pass trough algorithm. with in general filters like bilinear smooth picture details and filters like bicubic tend to do a bit of sharpening. Image seems to be higher def.

I have no experience with higher color spaces and results like 10 bit palettes YUV444 etc.. But I do understand that there probably is no display that can REALLY show all that. Maybe these new 40 000 $ OLEDs ; )

Without PERFECT display set you may not notice difference between 8bit YUV420 and 10bit YUV444. Its professional video editing stuff in studios and high power video montage workstations.. I see no reason to use it in home environment.

Probably folks will defer to that opinion.

8

Re: x264 and crf: opinions needed

@Naver: you are mixing bits used for calculation precision and bits used for color representation.
When people speak of 10bit x264 encodings they refer to the calculation precision, which is independent of the color space / color representation. (So there can be a 4:2:0 color representation with 10bit calculation precision, which will help with compression and banding artifacts.)

The x264 High10 profile only allows 4:2:0 color representation with 10bit calculation precision, it does not allow other color representations.

Cu Selur

9

Re: x264 and crf: opinions needed

My bad it seems ,,sorry

Wouldn't that reduce encoding speed as well?

10

Re: x264 and crf: opinions needed

Yes, using higher bit depth means slower calculations, but when no hardware decoding support is needed 10bit normally is worth the encoding time. smile

11

Re: x264 and crf: opinions needed

Does that setting affects apart from speed of encoding a size/quality ratio? I mean giving smaller files of same quality or same file size better quality of encoding?

12

Re: x264 and crf: opinions needed

Yes, higher calculation precision normally mean a better size/quality ration. (+ no banding artifacts due to rounding errors)
see: http://x264.nl/x264/10bit_02-ateme-why_ … dwidth.pdf

13

Re: x264 and crf: opinions needed

Thank you for sharing your expertize, I got good results and fast, using recommended setting, leaving the rest at default values

14

Re: x264 and crf: opinions needed

hi guys,

i try to resurrect this message board...

i am new to 10bit encoding, and from what i read seems that the obtained mkv is better respect 8bit version...

usually i encoding my 1080p bluray with these setting:

- CRF from 20 to 16 (depending by the source movie)
- preset VERYSLOW + tune FILM + NO Fast pskip

the resulting mkv look good for my eyes, i send the source from my iMac (i5 - 2011 - 27" - El Capitan) to my Plasma display HD-Ready (1024x768) and i have a very good vision of the 8bit encoding...

now, if i try to encoding with 10bit i can see really the difference to my Plasma display?

and again, i can use the same setting or need to start with new setup???

if i understand well, with the same CRF value the file have less bitrate and better quality... right?

but if the computer is not able to manage the 10bit???

considering that... is better to encoding with 10bit anyway... or i can continue to encoding with 8bit?

best regard

15

Re: x264 and crf: opinions needed

i try to resurrect this message board...

The message board is fine,...

and again, i can use the same setting or need to start with new setup??

Yes, you can.

now, if i try to encoding with 10bit i can see really the difference to my Plasma display?

probably not

if i understand well, with the same CRF value the file have less bitrate and better quality... right?

10bit encoding should result in a better compression ration, that means a higher quality at the same bit rate or a lower bit rate for the same quality.

considering that... is better to encoding with 10bit anyway... or i can continue to encoding with 8bit?

Unless your playback software can't handle 10bit, 10bit is the better choice compression wise.

Cu Selur

16

Re: x264 and crf: opinions needed

hi Selur,

thanks for reply...

one doubt... how i can see the difference from encoding 8/10 bit on my 2011 iMac?

i think that my computer is not able to display deep color... i encoding a clip from PREDATORS (2010) bluray with High10 Profile (it's this that activate 10bit, right?) and i don't see the difference...

about the preset and setting, i can use my 8bit setup or i have to change and using what you mentioned?
- Deblock QED
- DeHalo Alpha
- RemoveGrain
(where i find these option?)

for what i read in the net, Windows can manage without problem the 10bit color for play video... the problem is my old mac (old for apple, not for me), the new 4k/5k retina have 10bit enabled, but i not need for a new mac...

some suggestion?

for the display i think that the new plasma series support the 10bit, nothing interest to the UHD led/oled for now

best regard

17

Re: x264 and crf: opinions needed

ne doubt... how i can see the difference from encoding 8/10 bit on my 2011 iMac?

You would need to compare two encodes which have the same size.

i think that my computer is not able to display deep color...

You are mixing things up there.
deep color and 10bit encoding are different things. One normally speaks  of deep color when an extended color space is used. (like BT2020)
There are tons of displays which are 10bit or 12bit displays that do not support deep color.
If you want to play 10bit content on a 8bit display the decoder should add dithering to avoid banding.
If you want to play deep color content on a display which does not support the extended color space, the decoder (or player) should convert the color space to something that is displayable and may be even try to simulate the effect (change saturation etc.).

So assuming you have a player on mac which supports decoding 10bit content, 10bit content will require more cpu power during decoding due to the dithering, but should still offer a better compression ration and the content itself should not contain banding.
Downside of 10bit encoding is: less compatibility with hardware decoders and more cpu usage during playback.
Upside it: a no banding introduced due to 8bit precision, better compression ratio.

=> you have to decide for your self

about the preset and setting, i can use my 8bit setup or i have to change and using what you mentioned?
- Deblock QED
- DeHalo Alpha
- RemoveGrain
(where i find these option?)

You won't find them on the mac version due to missing vapoursynth and avisynth support. (haven't found a good way to get both available on mac)

Cu Selur

18

Re: x264 and crf: opinions needed

good morning Selur,

thanks for help and explain the difference, now i understand better the concept of 10bit.

only one confirmation, to activate 10bit encoding i need to set only the AVC Profile/Level = High10, right? after this i set the Calculation Precision = 10Bit... the Output Color Space = i420

many thanks again for your help.

best regard

19

Re: x264 and crf: opinions needed

Yes, for 4:2:0 10bit encoding, selecting 'Main 10' and '10 bit' is enough.

20 (edited by mighty-thor0073 2017-04-07 08:43:07)

Re: x264 and crf: opinions needed

thanks smile

be patient please, again one ask: usually i use the Tune FILM... with 10bit is fine to deblock with this filter or not necessary?

best regard

21

Re: x264 and crf: opinions needed

Not sure whether you mean the deblock option of the encoder, which should never be turned off, or a deblocking filter under Fitering, which should only be turned on when the source needs it.

22

Re: x264 and crf: opinions needed

sorry for confusion, i am referring to the TUNE = Film (deblock -1:-1)

usually i set always this setting to ON

23

Re: x264 and crf: opinions needed

Ah, okay. Like I wrote deblocking should always be on.

Cu Selur