I get a better quality with a 1-pass encoding...!

HandBrake for Mac support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
monsieurboo
Posts: 11
Joined: Tue Oct 02, 2007 1:41 pm

I get a better quality with a 1-pass encoding...!

Post by monsieurboo »

Everywhere i go it says that 2-pass encoding is way much better,
and i believe it, so can somebody explain that to me ?!
I made some test and the quality's better with 1-pass, especialy on the transitions dark/light, where it's full of squares with a 2-pass !

Settings are:

Format: AVI
Codec : MPG4/MP3
FPS: Same as source
Encoder: Xvid
Average Bitrate: 2000Kbps

Let me knowww...
Thanx
Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

Post by Cavalicious »

Do a search, as there has been plenty of conversation about 1 pass vs 2 pass - CRF vs ABR...etc.

Look for comments by PuzZLeR
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Post by jbrjake »

Most of that earlier talk has been about x264, though.

I don't know enough about xvid, myself, to even guess why a 1-pass would look better than a 2-pass.
cvk_b
Veteran User
Posts: 527
Joined: Sun Mar 18, 2007 2:11 am

Re: I get a better quality with a 1-pass encoding...!

Post by cvk_b »

monsieurboo wrote:... full of squares with a 2-pass !

Settings are:

Format: AVI
Codec : MPG4/MP3
FPS: Same as source
Encoder: Xvid
Average Bitrate: 2000Kbps

Let me knowww...
Thanx
I have had some similar experiences (with xvid +2pass). Seems random, though, so I never reported it.
PuzZLeR
Bright Spark User
Posts: 287
Joined: Tue Apr 24, 2007 4:01 am

Post by PuzZLeR »

Cavalicious wrote:Look for comments by PuzZLeR
:D Didn't want to disappoint you Cavalicious. :)

monsieurboo: Can I get you to paste the CLI query for your 1-pass and 2-pass settings? I have a suspicion you may be confusing CRF 1-pass with ABR 1-pass and I'm guessing that your final bitrates/file sizes may be different with each scheme.

With whatever codec you use today, you will never get better quality with 1-pass ABR over 2-pass ABR. Never. In my opinion, 1-pass ABR is an incomplete 2-pass ABR. It should be only used when a quick encoding is necessary and an exact file size, where quality is not important. It's just for a quick view on an iPod or something, not for archiving.

However 1-pass CRF is different (and no such thing as 2-pass CRF exists that I know of or is necessary).

If you're comparing 1-pass CRF with 2-pass ABR with x264 you will have a million arguments as to which is better at the same bitrate. Both are arguably very, very similar in quality.

With older ASP codecs like Xvid it's not true. 2-pass ABR wins easily in motion scenes, and CRF will win with some nicer looking still frames.

I say this from years of experience coming from the DivX end of things, which is a similar codec to Xvid.
Bear Hunter
Posts: 47
Joined: Fri Oct 05, 2007 11:13 pm

Post by Bear Hunter »

After reading this I tried the one pass and the only difference I see between the two options is the extra time it takes to do a two pass. Picture/Audio is exactly the same for me with a one pass vs. a two pass on the last two DVDs I have ripped.

The only things I change using HB is setting the bitrate to 2000 and setting constant quality to 76%

:?:
Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

Post by Cavalicious »

Bear Hunter wrote:After reading this I tried the one pass and the only difference I see between the two options is the extra time it takes to do a two pass. Picture/Audio is exactly the same for me with a one pass vs. a two pass on the last two DVDs I have ripped.

The only things I change using HB is setting the bitrate to 2000 and setting constant quality to 76%

:?:
Um...which did you do:

set bitrate to 2000 (hence ABR)
-or-
Set to 76% (hence CQ)

its one or the other, not both.
Bear Hunter
Posts: 47
Joined: Fri Oct 05, 2007 11:13 pm

Post by Bear Hunter »

Cavalicious wrote:
Bear Hunter wrote:After reading this I tried the one pass and the only difference I see between the two options is the extra time it takes to do a two pass. Picture/Audio is exactly the same for me with a one pass vs. a two pass on the last two DVDs I have ripped.

The only things I change using HB is setting the bitrate to 2000 and setting constant quality to 76%

:?:
Um...which did you do:

set bitrate to 2000 (hence ABR)
-or-
Set to 76% (hence CQ)

its one or the other, not both.
Yeah..ok, I figured that's why it greyed out. Bitrate at 2000
Cavalicious
Moderator
Posts: 1804
Joined: Mon Mar 26, 2007 12:07 am

Post by Cavalicious »

I don't do CQ anymore, but I do CRF...and one would be hard-pressed not to be able to tell the difference between 2000 ABR and 76% CRF.

CRF is the way to go, try it and you'll see.
Bear Hunter
Posts: 47
Joined: Fri Oct 05, 2007 11:13 pm

Post by Bear Hunter »

Cavalicious wrote:I don't do CQ anymore, but I do CRF...and one would be hard-pressed not to be able to tell the difference between 2000 ABR and 76% CRF.

CRF is the way to go, try it and you'll see.
I just did a search and a lot of reading. If the codec being used is .264 the CQ percentage is actually CRF? Or does CRF apply to the settings in the advanced tab? or both?
eddyg
Veteran User
Posts: 798
Joined: Mon Apr 23, 2007 3:34 am

Post by eddyg »

Bear Hunter wrote:
Cavalicious wrote:I don't do CQ anymore, but I do CRF...and one would be hard-pressed not to be able to tell the difference between 2000 ABR and 76% CRF.

CRF is the way to go, try it and you'll see.
I just did a search and a lot of reading. If the codec being used is .264 the CQ percentage is actually CRF? Or does CRF apply to the settings in the advanced tab? or both?
Advanced Prefs in the Mac GUI allow you to say CRF or CQ. There are CLI options for the same.

Cheers, Ed.
PuzZLeR
Bright Spark User
Posts: 287
Joined: Tue Apr 24, 2007 4:01 am

Post by PuzZLeR »

CRF=76% is much too high when encoding from an MPEG-2 source. The law of diminishing returns begins to apply higher than 65% encoding from that older and limited format. Anything above 70% is really for raw uncompressed video which is 65GB/hour.

In fact, anything above CRF=70%, or even CRF=65% IMO, doesn't exist in MPEG-2. You will only be adding asymptotically low quality increments less than 0.01% but bloating file size tremendously, and unnecessarily.

Picture your video being a photograph, MPEG-2 being a cheap camera, H.264 being a high-powered camera/copy machine, and bitrate being ink.

It's like trying to make a photocopy of a picture better than the original by adding a ton more ink/toner - ain't gonna happen even with the best photocopier on the planet. You're better off taking the picture with a super camera. Instead you're only copying a picture from source to copier that was taken with a weak camera in between.

Save your ink.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Post by dynaflash »

PuzZLeR wrote:Picture your video being a photograph, MPEG-2 being a cheap camera, H.264 being a high-powered camera/copy machine, and bitrate being ink.

It's like trying to make a photocopy of a picture better than the original by adding a ton more ink/toner - ain't gonna happen even with the best photocopier on the planet. You're better off taking the picture with a super camera. Instead you're only copying a picture from source to copier that was taken with a weak camera in between.

Save your ink.
PuzZler: you always have great analogies :)
Bear Hunter
Posts: 47
Joined: Fri Oct 05, 2007 11:13 pm

Post by Bear Hunter »

eddyg wrote:
Bear Hunter wrote:
Cavalicious wrote:I don't do CQ anymore, but I do CRF...and one would be hard-pressed not to be able to tell the difference between 2000 ABR and 76% CRF.

CRF is the way to go, try it and you'll see.
I just did a search and a lot of reading. If the codec being used is .264 the CQ percentage is actually CRF? Or does CRF apply to the settings in the advanced tab? or both?
Advanced Prefs in the Mac GUI allow you to say CRF or CQ. There are CLI options for the same.

Cheers, Ed.
Sweet...thanks, I was looking in the "Advanced Tab" in the program itself. Looks like CRF was already checked. I'll run another DVD through it using CQ
Bear Hunter
Posts: 47
Joined: Fri Oct 05, 2007 11:13 pm

Post by Bear Hunter »

PuzZLeR wrote:CRF=76% is much too high when encoding from an MPEG-2 source. The law of diminishing returns begins to apply higher than 65% encoding from that older and limited format. Anything above 70% is really for raw uncompressed video which is 65GB/hour.

In fact, anything above CRF=70%, or even CRF=65% IMO, doesn't exist in MPEG-2. You will only be adding asymptotically low quality increments less than 0.01% but bloating file size tremendously, and unnecessarily.

Picture your video being a photograph, MPEG-2 being a cheap camera, H.264 being a high-powered camera/copy machine, and bitrate being ink.

It's like trying to make a photocopy of a picture better than the original by adding a ton more ink/toner - ain't gonna happen even with the best photocopier on the planet. You're better off taking the picture with a super camera. Instead you're only copying a picture from source to copier that was taken with a weak camera in between.

Save your ink.
So make sure CRF is checked in preferences and set the CQ to 65% max right?
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Post by dynaflash »

crf is checked by default in the macgui
Bear Hunter
Posts: 47
Joined: Fri Oct 05, 2007 11:13 pm

Post by Bear Hunter »

Yeah...Roger that. Just wanted to make sure all I needed to do was adjust the CQ since it's already checked.

I plan on reading up on advanced settings and playing around with that as well.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Post by dynaflash »

Bear Hunter wrote:So make sure CRF is checked in preferences and set the CQ to 65% max right?
Like all things, its a matter of personal preference. I personally use a cq of 68 or 70. But thats just me. :) above 70 though, I can truly see no benefit whatsoever on a 42" lcd.
Bear Hunter
Posts: 47
Joined: Fri Oct 05, 2007 11:13 pm

Post by Bear Hunter »

Outstanding...thank you very much!
PuzZLeR
Bright Spark User
Posts: 287
Joined: Tue Apr 24, 2007 4:01 am

Post by PuzZLeR »

Bear Hunter wrote:So make sure CRF is checked in preferences and set the CQ to 65% max right?
I can't comment on CQ since I have little experience with it and I'm on Windows so things are a bit different with the HB GUI there.

But, as Cavalicious said, CRF is the way to go as is my opinion too.

CQ is an older method, and CRF, although a bit slower, is an advanced and more adaptive version of CQ. CRF is subject to x264's perception of what quality is, and will adjust quantizer according to what x264 believes. The word is that x264 has good control over the flexiblity range of CRF, so more encoders are heading there.

So to answer your question with CRF instead of CQ, I'd say 65% is an upper limit if "small" file sizes are your still your goal. You can go 70% for a pinch more quality, but the file size will considerably escalate.

Anything over 70% is truly a waste of bitrate IMO. Files will start getting huge and quality gains will be microscopic...
PuzZLeR
Bright Spark User
Posts: 287
Joined: Tue Apr 24, 2007 4:01 am

Post by PuzZLeR »

dynaflash wrote:PuzZler: you always have great analogies :)
Hey Dynaflash,

It's actually a reflex. I used to be a columnist for a publication and had to fabricate content one way or another. Habits stick sometimes... :wink:
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Post by dynaflash »

hehe. nice. I referred to cq from the perspective of the "Constant Quality" slider on the gui. CRF is a must over cqp internally though. I agree.
Bear Hunter
Posts: 47
Joined: Fri Oct 05, 2007 11:13 pm

Post by Bear Hunter »

PuzZLeR wrote:
Bear Hunter wrote:So make sure CRF is checked in preferences and set the CQ to 65% max right?
I can't comment on CQ since I have little experience with it and I'm on Windows so things are a bit different with the HB GUI there.

But, as Cavalicious said, CRF is the way to go as is my opinion too.

CQ is an older method, and CRF, although a bit slower, is an advanced and more adaptive version of CQ. CRF is subject to x264's perception of what quality is, and will adjust quantizer according to what x264 believes. The word is that x264 has good control over the flexiblity range of CRF, so more encoders are heading there.

So to answer your question with CRF instead of CQ, I'd say 65% is an upper limit if "small" file sizes are your still your goal. You can go 70% for a pinch more quality, but the file size will considerably escalate.

Anything over 70% is truly a waste of bitrate IMO. Files will start getting huge and quality gains will be microscopic...
Thank you for your expertise... I'm a little confused though. I was under the impression that if CRF was checked in preferences...the CQ slider under the video tab would be how you adjusted it. Is there a different way to adjust CRF?
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Post by dynaflash »

Bear Hunter wrote: I'm a little confused though. I was under the impression that if CRF was checked in preferences...the CQ slider under the video tab would be how you adjusted it. Is there a different way to adjust CRF?
Bear Hunter: you are correct. The constant quality slider *is*how you adjust a crf encode. By "CQ", puzzler is referring to "constant quantizer" which is one way x264 internally adjusts bitrate for quality, which is easy to confuse with the Constant Quality slider in the gui.

So, if you have crf checked in your preferences, HB will tell x264 to user crf, (constant rate factor method) and you adjust your percentages with the "Constant Quality" slider in the main window.

Basically just confusion between abbreviations.
Bear Hunter
Posts: 47
Joined: Fri Oct 05, 2007 11:13 pm

Post by Bear Hunter »

Roger that! Thanks!
Post Reply