View Full Version : Pure quality, CRF or 2 pass?
Chengbin
1st January 2009, 05:20
If I want the highest quality encodes without time limit, is CRF better or 2 pass? Suppose I encode a video using CRF x, and it output a video that is 800MB, now I use 2 pass, and specify the size to 800, which way of encoding would provide higher quality?
Dark Shikari
1st January 2009, 05:21
which way of encoding would provide higher quality?Neither.
Chengbin
1st January 2009, 05:23
Oops, let me change that to which way of encoding between the 2 would create a better encode?
Dark Shikari
1st January 2009, 05:26
Oops, let me change that to which way of encoding between the 2 would create a better encode?Neither.
Chengbin
1st January 2009, 05:32
So they're the same? 2 pass is only to hit a specific file size? I thought the first pass is to analyze the video file to see where to distribute the bits or something like that.
Esurnir
1st January 2009, 05:37
So they're the same? 2 pass is only to hit a specific file size? I thought the first pass is to analyze the video file to see where to distribute the bits or something like that.
Their goals are different, CRF permit you to reach a certain "quality" (I do my encode with CRF-20, CRF-18 is considered as transparent) but ignoring what will be the final size, while bitrate permit you to reach a certain size (for the quality, you don't have a clue before seeing the result)
Dark Shikari
1st January 2009, 05:37
So they're the same? 2 pass is only to hit a specific file size? I thought the first pass is to analyze the video file to see where to distribute the bits or something like that.CRF, 1pass, and 2pass all use the same bit distribution algorithm. 2-pass tries to approximate CRF by using the information from the first pass to decide on a constant quality factor. 1-pass tries to approximate CRF by guessing a quality factor over time and varying it to reach the target bitrate.
AntiJw
1st January 2009, 05:56
So they're the same? 2 pass is only to hit a specific file size? I thought the first pass is to analyze the video file to see where to distribute the bits or something like that.+if using VBV, then 2-pass is more VBV-accurate.
Chengbin
1st January 2009, 06:01
I'm sorry, I'm a bit noob to x264. What is VBV?
There was a guide to all of x264's setting, in Wikipedia style. I can't find that link, can anyone post it, thanks a lot.
Dark Shikari
1st January 2009, 06:01
I'm sorry, I'm a bit noob to x264. What is VBV?
There was a guide to all of x264's setting, in Wikipedia style. I can't find that link, can anyone post it, thanks a lot.If you don't know what VBV is, you probably aren't using it.
flebber
1st January 2009, 06:54
My preference is to use CRF 16 if I am not concerned about filesize and to use 2 pass to acheive a given size output.
here are lnks explaining options.
http://www.digital-digest.com/articles/x264_options_page1.html
http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-x264.html
I really haven't seemed to need to understand vbv(Video Buffer Verifier) - maybe I should, this is what I have found.
Good Link http://rob.opendot.cl/index.php/useful-stuff/h264-profiles-and-levels/
vbv bufsize is the amount of memory a constant bitrate decoder needs to
allocate to buffering the incoming compressed bitstream. You don't
calculate it. There are 4 possible cases:
* You want to target a specific hardware deocder, and its documentation
says what bufsize it uses. Copy that size.
* You want to target a specific hardware deocder, and its documentation
doesn't say what bufsize it uses. You're screwed.
* You want to stream to a generic software player. Any bufsize works, but
the end user needs to specify the same (or larger) bufsize when playing.
It's a tradeoff between quality and latency, and there are no rules for
choosing an optimal value, any more than there are rules for choosing an
optimal bitrate.
* You aren't streaming nor targetting a hardware decoder. Don't use
constant bitrate.
--Loren Merritt
from http://lists.mplayerhq.hu/pipermail/mencoder-users/2007-December/007612.html
ni9ht_5ta1k3r
1st January 2009, 10:02
I use 2-pass because it's something I understand easily from encoding in divx/xvid.
buzzqw
1st January 2009, 10:03
pure quality ?
use lossless mode :D
BHH
cogman
1st January 2009, 16:10
pure quality ?
use lossless mode :D
BHH
Aye, the best quality is to either not encode at all, or encode using lossless mode.
Esurnir
1st January 2009, 17:01
vbv is not usefull for computer playback (save maybe with dxva).
It permit to create a stream that "can" be broadcasted on a capped bitrate interface (the net, a slow disk, etc.)
LoRd_MuldeR
1st January 2009, 19:37
Suppose I encode a video using CRF x, and it output a video that is 800MB, now I use 2 pass, and specify the size to 800, which way of encoding would provide higher quality?
As far as I know if you create two files of the same size, one with CRF (1-Pass) and one with 2-Pass, then the difference in quality between these two files will be very small. Most likely you wouldn't be able to notice it. The difference is: With 2-Pass you know the final size in advanced, with CRF you don't. But in 2-Pass mode you need to decide for a target average bitrate, which isn't easy, as different sources require different bitrates to look good! In CRF mode you can simply specify a level of quality (very roughly) and the decoder decides the required bitrate for you.
In short: If you are targeting for a certain level quality and you don't care about filesize, then find the highest possible CRF value that still satisfies your eyes and use that CRF value for all your encodes. And if you are targeting for best possible quality for a restricted filesize (e.g. 700 MB for a CD-R or 4,7 GB for a DVD+R) then use 2-Pass mode.
refulgentis
1st January 2009, 22:20
As far as I know if you create two files of the same size, one with CRF (1-Pass) and one with 2-Pass, then the difference in quality between these two files will be very small. Most likely you wouldn't be able to notice it. The difference is: With 2-Pass you know the final size in advanced, with CRF you don't. But in 2-Pass mode you need to decide for a target average bitrate, which isn't easy, as different sources require different bitrates to look good! In CRF mode you can simply specify a level of quality (very roughly) and the decoder decides the required bitrate for you.
In short: If you are targeting for a certain level quality and you don't care about filesize, then find the highest possible CRF value that still satisfies your eyes and use that CRF value for all your encodes. And if you are targeting for best possible quality for a restricted filesize (e.g. 700 MB for a CD-R or 4,7 GB for a DVD+R) then use 2-Pass mode.
To make this very, very, clear: they will produce the same quality at the same size, but you don't know what that "same size" is until its done with the CRF encode. Two-pass is just guesswork.
LoRd_MuldeR
1st January 2009, 22:22
To make this very, very, clear: they will produce the same quality at the same size, but you don't know what that "same size" is until its done with the CRF encode.
Basically, yes!
But as far as I know they do not produce the exact same output at the same filesize. However the results will be very very close.
I doubt you will be able to spot the difference...
Two-pass is just guesswork.
Quality-wise the 2-Pass mode is guesswork. At least if you did not do any tests in advance to find a reasonable bitrate.
But size-wise it's exact. In contrast to CRF, which produces an unpredictable size (but predicable quality - roughly).
eyekyu
4th January 2009, 02:35
the higher the CRF the better?
J_Darnley
4th January 2009, 02:56
No, the crf value is related to the quantisers used. A higher value uses higher quantisers which produces lower quality, a lower crf value produces higher quality.
vBulletin® v3.8.11, Copyright ©2000-2022, vBulletin Solutions Inc.