Much to my surprise I read on web page
https://trac.ffmpeg.org/wiki/Encode/H.264
that 2-pass encoding does NOT result in a better video quality (See FAQ section there).
The only purpose of 2-pass encoding is to match the target video file size more accurately.
Is this really true?
Can someone confirm this?
As far as I remember I read in the past that 2-pass encoding increases significantly the output quality.
Did I miss something?
Peter
+ Reply to Thread
Results 1 to 7 of 7
-
-
It depends on the codec. h.264 is a specification, not a particular encoder. x264 (one of the h.264 encoders included in ffmpeg) has a single pass "constant rate factor" encoding mode which delivers the same quality as x264 in 2-pass VBR mode (all other settings being equal). In CRF mode you specify the quality you want (a CRF value, lower values deliver higher quality). The encoder uses whatever bitrate is necessary to deliver that quality. You don't know what that bitrate will be (and hence you don't know the output file size) until it's done. In 2-pass VBR mode you specify the bitrate you want (and hence the size, size = bitrate * running time). But you don't know what the quality will be. When those two methods deliver the same file size the quality is essentially the same too.
-
From my tests, it's true. Is a big waste of time and energy that doesn't result in a better quality just a final file size with a decent quality.
-
If memory serves h.263 ie xVID and Divx does benefit quality-wise with 2-pass (or even more) encoding.
-
@pxstein, the purpose of 2-pass vbr is to give you the best encoding for a given filesize. And yes, it is possible to get that same optimal quality for that same filesize using 1-pass CRF, but the problem with that is you don't know which crf factor will give you the size you need until you finish the encoding.
If only there were a way to preview it so it would figure out what that factor should be? You could scan the file for a segment, it would be accurate for that segment, but possibly not beyond it. So if you do a quick scan of the whole file, it'll be accurate for the duration of the whole file.
That's basically what 2pass IS.
Scott -
Similar questions:
In 2Pass mode, the first pass analyzes the video to be encoded and "gives" the 2nd pass all the nedded information to match the selected settings. -
The link in the post no longer works (you could probably google it), but here's a summery I wrote when I was trying to get it straight in my head. It explains how x264's rate control methods work (2pass v ABR v CRF).
x264's rate control methods
There can be a slight difference between 2 pass and CRF, but you'd have to be using stupidly low bitrates to see it. At sensible bitrates, the quality is effectively the same for the same bitrate using the same encoder settings.
2 pass encoding needs to adjust the quality as encoding progresses to ensure it achieves the target bitrate/file size. CRF doesn't have that limitation.
2 pass encoding takes longer, so if you compare them based on encoding time, you could use higher quality/slower encoder settings for CRF, take the same amount of time to encode as 2 pass using slightly faster settings, and end up with a higher quality for CRF (everything else being equal).Last edited by hello_hello; 22nd Apr 2020 at 16:15.
Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview)
Similar Threads
-
Difference Between 1 pass & 2 pass encoding
By iqbal88 in forum Video ConversionReplies: 28Last Post: 29th Oct 2021, 05:19 -
Where is the 2 pass encoding in DVDFab?
By johnr283 in forum Video ConversionReplies: 2Last Post: 4th Mar 2020, 16:44 -
Single pass encoding possible in AVCHDCoder?
By TakuSkan in forum Authoring (Blu-ray)Replies: 1Last Post: 11th Jan 2020, 21:36 -
What is difference between 1 pass encoding & 2 pass encoding
By Computerman1 in forum Video ConversionReplies: 18Last Post: 13th Jan 2019, 19:59 -
Why doesn't Mediacoder create 2pass good quality videos? The result: error
By Stears555 in forum Video ConversionReplies: 19Last Post: 2nd Jun 2015, 08:34