View Full Version : 3 in 1 Question about xvid stats file!
birdy
1st March 2003, 06:28
Xvid 1st pass Stats file Could be:
a: Used for second pass if when created, no b-frames used but you want to use b-frames in second pass.
b: Used for second pass if when created, the movie size was different from the size you want to use for second pass.
c: used for second pass if when created, filters used for first pass are different from the ones you want to use for second.
OR:
A first pass stats file can only be used for the second pass, if ONLY you are using the same settings used for first pass when doing the second.
Koepi
1st March 2003, 09:11
It's d (the big OR). Somehow b is correct too, because you're doing 2pass because you want to hit a certain size and thus the first pass size is different from the 2nd pass size.
Please refer to the Nandub Options Explained to get an overview about stats files and their use.
Regards
Koepi
JimiK
1st March 2003, 09:13
O.K. birdy, after Koepi has not already replied, I would also like you to use the search button instead of starting a new thread. Did you notice, that you already started more than 15 threads with your low postcount?
Now to your question:
Everything that changes compressibility needs a new first pass. So the answer is: a) NO, b) no, c) no and OR: yes. You will get the least deviation when you only change one filter that doesn't influence compressibility to much, so in some cases you can still get quite good results when using c). But they won't be optimal. The filesize may yet still be hit, because XviD also compensates a little on second pass for the changed compressibility. Still some scenes might now need more bits than other compared to first pass, so the movie might look shitty there.
Best regards,
JimiK
Edit: O.K. now Koepi already answered and maybe you should forget about c)
JimiK
1st March 2003, 13:17
I thought a bit about Koepis answer that birdys "b)" could deliver good quality. Maybe somebody with a good understanding of 2-pass encoding (maybe Mr. 2-pass (Koepi) himself) could explain this a little more. From what I understood, XviD uses quant 2 for the first pass and remembers the size of every pic in the stats-file (quite sure about this one). Then for 2nd pass it scales the stats, means it calculates the size of every picture for the second pass to hit the filesize. It seems to me that you can also calculate the quants for the second pass, because if it would encode at different (resonable) quants and look which quant hit the size best, 2nd pass should take longer than first pass. Now you change the resolution for the 2nd pass (that's what I understood that birdy wanted to do), t.ex. you lower them from 640x272 to 576x244. Then the precalculated quantizers would be applied to every picture? Wouldn't this lead to an undersized movie, because a single picture with a lower resolution compressed with the same quant as the picture with a higher res would have a smaller filesize? If this is not the case, then it would be great way to use your first pass stats without reencoding when the 1st pass: 2nd pass ratio would be higher than 2:1.
Best regards,
JimiK
Koepi
1st March 2003, 15:21
Hi Jimi,
hm, I thought of filesize when reading b).
If you resize the picture you change compressability again and need to redo a full 2pass.
Regards
Koepi
JimiK
1st March 2003, 16:30
Thank you Koepi,
I see... Sad, it would have been really nice if you wouldn't have to do a new 1st pass. Anyways, can you "generally" confirm my guesses how 2nd pass is created? If so, just don't answer, I know that you're always around and wouldn't think you didn't read this post. If not, just out of curiosity, could you give a "really" short explanation, how the codec succeeds in hitting the size on the spot?
Thank you,
JimiK
birdy
1st March 2003, 20:57
My fault guys. I ment by movie size the Movie resolution.
I have done this error many times! Do a first and second pass at for example 640X480 and then do a 2nd pass at a little higher size to see if i get better or wors result. I never had any file size (this time I mean size in MB) problems. Both files were exactly the same. But it seems that it was not the right thing to do.
Now here I have another issu that I wanted to get specialy Koepi's attention.
I don't know what most people do and what is really better (you can advise me) But with my little amount of experience, I never use my first pass stats file directly for the second pass. I always use Koepi's statsreader and do a 2pass external instaid.
As you know, encoding is a very long and time consuming procces and I always hit start in vdubmod, when I want to go to bed. (this gives me some excitment for waking up as I have got a file ready for me to check out:) )
But this is not possible if doing a external 2nd pass using statsreader. As you have to do first pass, then load the stats file and save it with statsreader.
I was wondering if its possible and/or would it be a good idea to somehow make this option become automatic (scheduled) !! ?
Maybe koepi could integrate the statsreader into XVID itself and creat and new tab called "2nd pass external" !!! Or any other way so after first pass statsreader would make the external stats file itself and second pass external encode would run.
I am not even sure if I am not saying something stupid here!
For whats my diferent encoding tests I will do a trim, testing different resolutions and settings on a little part of the movie, doing 2 passes each time then using the same first pass file from now!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.