What exactly do I gain if I use 3-pass encoding with x264, instead of 2-pass ? More quality at the same bitrate ? More accurate bit allocation decissions ? Less dB's of global PSNR ?
In other words, let's say you want to encode some dvd's containing something very important to you, and slow encoding speed is not a problem. In that case, would you choose 3-pass, or stick with 2-pass, and why ? And would you enable slow_firstpass on the first pass ? If yes, why ?
I can't seem to understand what is the role of 3-pass and 4-pass, or what they were designed for, since 2-pass encoding is enough to gather the necesary statistics during the first pass, and use them in the second pass. But what I would like to know is if 3-pass and 4-pass offer greater quality at the same bitrate, and if the quality is increased considerably enough to justify using 3 or 4 pass.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 9 of 9
Thread
-
Last edited by codemaster; 21st Sep 2011 at 17:20.
-
too many variable to make a one answer for all situations. sometimes a better allocation of bits is achieved with more passes.
if i had a very important dvd i wouldn't re-encode it. if i need it as a file i'd use vob2mpg and leave it as the original quality mpeg-2.--
"a lot of people are better dead" - prisoner KSC2-303 -
so, I guess it ultimately depends on the source ?
for me, the original mpeg2 video stream seems too huge, I prefer to encode it to h264 and mux it to .mkv with the original and untouched ac3, that's why I asked if 2-pass is enough, or 3-pass would considerably influence the quality -
Use single pass CRF encoding. You'll get the quality you ask for every time. The bitrate will turn out whatever is necessary for each particular video.
-
@ jagabo: I learned from MEncoder's x264 documentation that there are very good reasons for using at least two pass encoding:
For one thing, single pass ratecontrol is not psychic, and it often makes unreasonable choices because it cannot see the big picture. For example, suppose you have a two minute long video consisting of two distinct halves. The first half is a very high-motion scene lasting 60 seconds which, in isolation, requires about 2500kbps in order to look decent. Immediately following it is a much less demanding 60-second scene that looks good at 300kbps. Suppose you ask for 1400kbps on the theory that this is enough to accommodate both scenes. Single pass ratecontrol will make a couple of "mistakes" in such a case. First of all, it will target 1400kbps in both segments. The first segment may end up heavily overquantized, causing it to look unacceptably and unreasonably blocky. The second segment will be heavily underquantized; it may look perfect, but the bitrate cost of that perfection will be completely unreasonable. What is even harder to avoid is the problem at the transition between the two scenes. The first seconds of the low motion half will be hugely over-quantized, because the ratecontrol is still expecting the kind of bitrate requirements it met in the first half of the video. This "error period" of heavily over-quantized low motion will look jarringly bad, and will actually use less than the 300kbps it would have taken to make it look decent. There are ways to mitigate the pitfalls of single-pass encoding, but they may tend to increase bitrate misprediction. Multipass ratecontrol can offer huge advantages over a single pass. Using the statistics gathered from the first pass encode, the encoder can estimate, with reasonable accuracy, the "cost" (in bits) of encoding any given frame, at any given quantizer. This allows for a much more rational, better planned allocation of bits between the expensive (high-motion) and cheap (low-motion) scenes.
Moreover, two passes need not take twice as long as one pass. You can tweak the options in the first pass for higher speed and lower quality. If you choose your options well, you can get a very fast first pass. The resulting quality in the second pass will be slightly lower because size prediction is less accurate, but the quality difference is normally much too small to be visible.
for instance, if you are capturing live TV and encoding in realtime, you are forced to use single-pass. Also, one pass is obviously faster than two passes.Last edited by codemaster; 21st Sep 2011 at 21:42.
-
-
CRF if you want a given level of quality, 2pass if you need an exact filesize
If you encoded CRF, examined the average bitrate , then used that same bitrate with a 2pass encode they would be almost identical .
The only reason you would need 2 pass is if you need an exact filesize (e.g. fit to blu-ray disc fixed capacity, or maybe you have bandwidth limitations for streaming flash) . These days HDD are cheap, and so are media players (e.g. asus oplay mini is $60 , wdtv)
But who says 1400MB is the "proper" filesize ? or "x" bitrate is the proper size? For an action movie it might look like crap, for a simple cartoon it will be too much and you waste bitrate. Those are reasons why 1 pass CRF is often preferred. It allocates the proper amount of bitrate for a certain level of "quality". So high content complexity or noise/grain movies will be larger in bitrate, and simple movies, with little motion will get less bitrate. If you choose a predetermined bitrate, some movies get too much (waste), some get too little. -
If you encode a video using CRF encoding, then go back and make a 2-pass VBR encoding at the same bitrate the CRF encoding turned out, the two videos will look nearly identical.
You should use 2 (or more) pass VBR encoding when you need a specific file size. Use CRF encoding when you want a particular visual quality.
QP encoding is constant quality in a mathematical sense. CRF encoding also takes into account what is visible to the human eye. CRF delivers smaller file sizes than QP. -
I just found that one of the x264 developers said:
CRF and 2-pass use identical bit allocation algorithms. All 2-pass does is pick the CRF value that gives the filesize you want. It's still using the CRF algorithm.
Similar Threads
-
Difference Between 1 pass & 2 pass encoding
By iqbal88 in forum Video ConversionReplies: 28Last Post: 29th Oct 2021, 05:19 -
Technical Query Re Reading of 1st pass stats during second pass xvid encode
By onesikgypo in forum Video ConversionReplies: 1Last Post: 13th Mar 2011, 06:59 -
Retrospectively check if One Pass or Two Pass Encoding was used?
By BenjaminBS in forum Video ConversionReplies: 4Last Post: 26th Nov 2009, 05:46 -
Analyze MPEG2 from DVD to see if 2-pass encoding was used
By motown01 in forum EditingReplies: 8Last Post: 7th Oct 2009, 21:33 -
SVCD2DVD 2.5 One Pass vs. Two Pass encoding?
By mwkurt in forum SVCD2DVD & VOB2MPGReplies: 4Last Post: 19th Jun 2007, 14:55