View Full Version : DivX 5.0.2 Pro : 2-pass or 1-pass quality based ?


iparout
31st July 2003, 15:31
Hi.

If I encode a movie using 2-pass in DivX 5.0.2 Pro and the output file is undersized, is it better qualitywise to encode it at 1-pass quality based with Q=2 (100%) or should I leave it as it is ? (Normally, the 1-pass quality based file won't be much bigger than the 2-pass undersized file).

Thanks.

kl33per
31st July 2003, 15:38
Firstly, there's a sticky about this very issue here. (http://forum.doom9.org/showthread.php?s=&threadid=24584)
Secondly, get DivX 5.05 and use nth pass encodes.

If you can't be bothered to read the sticky, the jist is (in no particular order):
-Increase resolution (obviously don't increase beyond that of the source material)
-Decrease target filesize
-Disable B-Frames

You should still read the sticky though. If you re-encode this file with 4-passes in DivX 5.05 you should end up with a better quality file than 2-passes in 5.02.

iparout
31st July 2003, 15:47
Originally posted by kl33per
Firstly, there's a sticky about this very issue here. (http://forum.doom9.org/showthread.php?s=&threadid=24584)
Secondly, get DivX 5.05 and use nth pass encodes.

If you can't be bothered to read the sticky, the jist is (in no particular order):
-Increase resolution (obviously don't increase beyond that of the source material)
-Decrease target filesize
-Disable B-Frames

You should still read the sticky though. If you re-encode this file with 4-passes in DivX 5.05 you should end up with a better quality file than 2-passes in 5.02.

In fact, I was "bothered" to read the sticky 6 months ago. It describes why undersized files occur and what to do in order to avoid them. If you read my post more carefully, you will understand that it's irrelevant to what I'm asking...

All I want to know is if a 1-pass quality based encode @ Q=2 is better in quality than the undersized file produced by the 2-passes.

kl33per
31st July 2003, 15:56
Most likely, no. If you're getting undersized files, than you are probably hitting the bitrate limit and a 1-Pass quality based will not improve quality.

iparout
31st July 2003, 16:00
My thought is this : When I run the 2=pass video with ffdshow, I can see the Quantizers flanctuating from 2-4. If I enable 1-pass quality based @ Q2, all frames would be encoded with Q2 and theoretically the output file would be better in quality.

bond
31st July 2003, 16:01
of course 2-pass is better than 1-pass (when the two end in the same filesize)
as 2-pass is vbr, which puts more bitrate where it is needed and less where not so much is better

kl33per
31st July 2003, 16:06
If I enable 1-pass quality based @ Q2, all frames would be encoded with Q2 and theoretically the output file would be better in quality.
Only in theory, but perectably not likely. Out of interest, how can you see the Quant's fluctuating, is this a feature of ffdshow or a series of visual quailty differences.

bond
31st July 2003, 16:12
Originally posted by iparout
My thought is this : When I run the 2=pass video with ffdshow, I can see the Quantizers flanctuating from 2-4. If I enable 1-pass quality based @ Q2, all frames would be encoded with Q2 and theoretically the output file would be better in quality. in this case the 1-pass file would have better quality but the 1-pass would also be bigger!

kl33per
31st July 2003, 16:16
Once again, you seem to forgetting the whole point of VBR encoding. Not every frame needs to be at Q=2 to be 'perceptably' perfect quality. Yes the file would be bigger, and yes in all technicality the file would of better quality, but are you going to notice it? You'll have to decide for yourself.

jonny
31st July 2003, 16:22
The fact is that divx 5.0.2 start getting undersized at 75%-80% comp.test, this means that the average quantizer limit is near to 3 in 2-pass mode.
This is quite different from encoding all with quantizer=2 (visible or not when you play... this is subjective, but the difference exists)

bond
31st July 2003, 16:26
kl33per, did i say something different?

kl33per
31st July 2003, 16:44
This is quite different from encoding all with quantizer=2 (visible or not when you play... this is subjective, but the difference exists)
This could be compared to the MPC audio format. Most people can't here any difference above quality 6 but of course the quality continues to improve theoretically. Practically however it is pointless. I think the same could be aplied to this situation, unless there is a noticeable quality issues.

kl33per, did i say something different?
Probably not, but as I keep reiterating, peceptual quality is the deciding issue. You probably didn't mean to imply that the difference would be insignificant, that's just how I read it, sorry.

Acaila
31st July 2003, 17:03
The original question was:If I encode a movie using 2-pass in DivX 5.0.2 Pro and the output file is undersized, is it better qualitywise to encode it at 1-pass quality based with Q=2 (100%) or should I leave it as it is ?Now, there are two scenarios that can cause something to be undersized, and each give a different answer to the question.

Scenario 1.
2-pass is undersized because of reaching the bitrate limit (saturation).
answer: No difference (theoretical or perceptual) exits between the 2-pass result or 1-pass quality based 100%.

Scenario 2.
2-pass is undersized because of a Rate Control malfunction.
answer: 1-pass quality based 100% gives a higher quality (at least PSNR-wise) and larger filesize than the undersized 2-pass result.

Since iparout mentioned this:When I run the 2=pass video with ffdshow, I can see the Quantizers flanctuating from 2-4So the scenario that is occuring here can only be nr 2 because otherwise all frames would have to have been coded with quant 2.

Originally posted by kl33per
This could be compared to the MPC audio format. Most people can't here any difference above quality 6 but of course the quality continues to improve theoreticallyA more accurate analogy to me would be comparing MPC level 6 and higher to DivX quant 2 and quant 1 (but that's just based on my personal level of perception). Personally I find the difference between a quant 2 and a quant 4 frame substantial, so in this case using 1-pass quality based 100% would also increase the perceptual quality.

dTb
1st August 2003, 06:15
Originally posted by iparout
My thought is this : When I run the 2=pass video with ffdshow, I can see the Quantizers flanctuating from 2-4. If I enable 1-pass quality based @ Q2, all frames would be encoded with Q2 and theoretically the output file would be better in quality.

It sounds like you might be using b-frames, seeing the quant displayed in ffdshows osd fluctuate between 2 and 4 suggests this. It would be the same if you used b-frames on a quant=2 encode.

kl33per
1st August 2003, 07:56
Originally posted by Acaila
A more accurate analogy to me would be comparing MPC level 6 and higher to DivX quant 2 and quant 1 (but that's just based on my personal level of perception). Personally I find the difference between a quant 2 and a quant 4 frame substantial, so in this case using 1-pass quality based 100% would also increase the perceptual quality.
That all depends on the original source. A frame could theoritcally look perfect at Q=4, or even higher, depending on the complexity of the frame, and the predictions the encoder makes based on the surrounding frames. Sometimes the difference may be substantial, but if RC is working correctly then the difference would be unoticeable.
Orignally posted by dTb
It sounds like you might be using b-frames, seeing the quant displayed in ffdshows osd fluctuate between 2 and 4 suggests this. It would be the same if you used b-frames on a quant=2 encode.

I forgot about this, that's completely true. If you are not noticeing any visual quality degredation between the Q=2 and Q=4 frames, and are only using the OSD than re-encoding in 1-pass is pointless.

BTW, dTb, you're location is listed as Darwin, where is that (the only Darwin I know is in Australia).

iparout
1st August 2003, 16:29
Originally posted by dTb
It sounds like you might be using b-frames, seeing the quant displayed in ffdshows osd fluctuate between 2 and 4 suggests this. It would be the same if you used b-frames on a quant=2 encode.

You are absolutely right. I did a 1-pass quality based encoding @ Q2 and the output file still has flanctuations in Quantizers between 2 and 4. Also, it is smaller in size compared to the DivX 5.0.2 Pro 2-pass encoding @ 140% compressibility. (994.138 KB vs 999.062 KB)

dTb
2nd August 2003, 03:02
Originally posted by kl33per
BTW, dTb, you're location is listed as Darwin, where is that (the only Darwin I know is in Australia).

Yep, Darwin Australia it is. It's the only Darwin I know of too so I didn't bother putting Australia, maybe I should for our foreign friends ;)

iparout, I'd be interested to know if you feel there's any difference between the two files in terms of visual quality. I've heard fairly convincing arguments for both sides saying they'll be identical or that the multipass file will be better. I may even do some testing myself to see what I think.

kl33per
2nd August 2003, 03:07
Originally posted by dTb
Yep, Darwin Australia it is.
Nice to see a fellow Aussie!

iparout
2nd August 2003, 15:19
Originally posted by dTb
Yep, Darwin Australia it is. It's the only Darwin I know of too so I didn't bother putting Australia, maybe I should for our foreign friends ;)

iparout, I'd be interested to know if you feel there's any difference between the two files in terms of visual quality. I've heard fairly convincing arguments for both sides saying they'll be identical or that the multipass file will be better. I may even do some testing myself to see what I think.


There is no visible difference in quality IMHO.