View Full Version : first pass...two times???
hippoth
14th February 2002, 22:56
My question: Do I have to do the first pass again when I change the bitrate after an complete first-pass/second-pass encoding...I ever thought thats not necessary...but after comparing of the two log files I found out that they were different...why??
What do I have to do?
greatings...and thanks for answering
obelix
15th February 2002, 10:57
You don't have to, but not doing will make the codec even less predictable. The first pass calculates quanisizers according to the selected bitrate. If you want to do several encodings at different bitrates with one logfile you should give Dmitrys logfile analyzer a try.
-h
15th February 2002, 12:40
I have always been under the impression that the 1st pass sets the quantizer for every frame to 2 - the bitrate is only used during the second pass. Looking at the DivX4Windows source code shows this..
I'm not sure anything would change if you set the bitrate on the 1st pass to something else.
-h
obelix
15th February 2002, 16:17
Hi -h,
I hate to be a smartass but I'm afraid you are wrong. I just did two first passes, one with bitrate 1000, the other with bitrate 6000. The logfiles are completely different. Not only the quants differ but also texture and motion. I pasted a capture of a comparison.
^Obelix
edit: Does anybody know what happens to attachments? Somehow it is gone...
But you can easily verify it on your own. One minute of video is more than enough.
-h
15th February 2002, 22:52
I hate to be a smartass but I'm afraid you are wrong. I just did two first passes, one with bitrate 1000, the other with bitrate 6000. The logfiles are completely different. Not only the quants differ but also texture and motion. I pasted a capture of a comparison.
This is one of the reasons DivX4 drives me nuts. That is a terrible way to gauge 1st pass complexity.
If you aren't using a constant quantizer, there's no reliable way of comparing complexity from one frame to another, as increasing the quantizer is not a linear relationship (even though their source code thinks it is).
I wonder when they changed this.
-h
Acaila
16th February 2002, 00:28
This is how I understand it, I wrote this at everwicked.com earlier today:
When you do the 1st pass DivX4 checks each frame and notes the complexity/textures/motion in it and calculates a quantizer that would be best suited with the bitrate you specified.
When you do the 2nd pass it then reads the logfile and (again) calculates the best quantizer based on the complexity/textures/motion values of each frame and the bitrate you've specified for the second pass. The quantizer value already in the logfile is ignored, because a new bitrate is used to calculate it.
If it happens that the bitrate of 1st pass and 2nd pass are equal then DivX4 will use the same quantizer to encode as the logfile says, otherwise it will just re-calculate.
The way you set quants in DivX4Log is to scale the bitrate to whatever gives the filesize you want.
Instead of letting DivX4 determine the best quantizers, you're now overriding it by changing complexity/textures/motion to your needs until those values and the bitrate you're aiming for are matched by the quants you manually set.
So, when DivX4 reads the log to encode, the quants it calculates will now be the exact same quants you had manually set, because you change the other values to match only these quants.
DivX4 now has no other option, but to encode how you told it to.
Okay, I hope this didn't make everything even more confusing
@-h
I have always been under the impression that the 1st pass sets the quantizer for every frame to 2 - the bitrate is only used during the second pass.
As far as I know, that is only what DivX3 (and Xvid?) are doing. DivX4's 1st pass makes a normal encoding sequence (only without saving the datastream) by calculating quantizers on-the-fly. These resulting quants in the log file however aren't used anymore, because a new value will be calculated based on the specified bitrate of the second pass.
These new quantizers will be dependant on the complxity/motion/texture settings, which were calculated with the 1st pass bitrate. So the farther the 2nd pass bitrate gets from the 1st pass bitrate, the more imprecise bitrate allocation will be.
Someone please correct me if my explanation is faulty :D
sarahjh69
16th February 2002, 10:48
I have been redoing the 2nd pass only
to change the size of o/p file and
am completely happy with the results
but am only changing the bitrate
by a maximum of 10%
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.