Log in

View Full Version : CRF in 2-Pass what are the advantages?


ckmox
9th June 2010, 07:30
ive checked some new updates on some GUI for x264 namely Hybrid and HDConvertToX and i notice this CRF option thats in 2-pass? so whats the advantage of 2-pass CRF over a 1-pass CRF?

please explain it in layman's term :)

nm
9th June 2010, 08:09
Before x264's VBV was improved, it worked poorly in CRF and 1-pass ABR modes. So, to make a "constant quality" encode with VBV, one would have made a CRF encode as a first pass and then a second pass using the average bitrate from the first pass.

Nowadays this is just a waste of time.

Blue_MiSfit
9th June 2010, 08:49
Yup. move on.. :)

LoRd_MuldeR
9th June 2010, 09:02
Here you see a "normal" 2-Pass encode (that did not use CRF in the first pass) versus a Single-Pass CRF encode:

http://i47.tinypic.com/w0j01v.jpg

Both files have the same size, i.e. the same average bitrate. As you can see, the differences in bitrate distribution are negligible.

Conclusion: If you need to hit a specific file size, do a "normal" 2-Pass encode, which will also be much faster than "CRF + 2-Pass", because of "fast firstpass" ;)

For all the rest you can stick with a single CRF encoding pass and be happy...

Blue_MiSfit
9th June 2010, 09:10
Well said, Mulder :)

ckmox
9th June 2010, 09:42
so your all saying that CRF 2-pass mode is thesame with average bitrate 2-pass mode? but average bitrate 2-pass mode is much faster because first pass is fast on this mode? so that means CRF 2-pass is just a waste of time? did i get all your replies correct pardon my limited knowledge on this

kypec
9th June 2010, 10:05
Yes, you understood all the answers perfectly. CRF 2-pass mode is nonsense nowadays, don't use it.
If you need to hit specific filesize alias desired bitrate is known then use regular 2-pass mode.
If you want to retain constant quality then use regular CRF mode which is implicitly single-pass.

Warperus
9th June 2010, 10:12
Offtopic
LoRd_MuldeR
What is this Bitrate viewer? Where can I get it?

nurbs
9th June 2010, 10:16
Warperus, see here: http://forum.doom9.org/showthread.php?t=143505

Dark Shikari
9th June 2010, 10:30
Conclusion: If you need to hit a specific file size, do a "normal" 2-Pass encode, which will also be much faster than "CRF + 2-Pass", because of "fast firstpass" ;)Why? CRF with --pass 1 will use fast firstpass, too.

Lam3rD
9th June 2010, 10:46
If it uses fast first pass, then logically the 2 pass CRF will result in noticeably higher bitrate, compared to the 1 pass option. Reason, faster settings will throw more bitrate to achieve the same "quality" and thus the result from the second pass will be equivalent to a lower (one pass) crf encode.

Or my understanding of how CRF works is totally wrong.

Dark Shikari
9th June 2010, 11:09
If it uses fast first pass, then logically the 2 pass CRF will result in noticeably higher bitrate, compared to the 1 pass option. Reason, faster settings will throw more bitrate to achieve the same "quality" and thus the result from the second pass will be equivalent to a lower (one pass) crf encode.

Or my understanding of how CRF works is totally wrong.Then you can raise the CRF to compensate.

ckmox
9th June 2010, 14:30
thanks for the answers

Lam3rD
9th June 2010, 14:47
@DS: Yup - do 2 pass crf 20, if you want to to have a crf 18 encode. My point was, that even though 2 pass crf seem like a good idea it has some unintended consequences. Because of them and the fact that 2 pass @ XXXX bitrate and crf resulting the same average bitrate produce perceptually identical result it's better to use 2 pass only when you want to hit a certain size (concordant with the point everyone else is making). In the other case you either have to use slow-firstpass and hence require twice the time, or use fast first pass and get a lower than required crf and bigger file.