View Full Version : Dumb question about first pass
I think the question has already been answered, but the search refuse to find it. I noticed that in first pass, every frame is compressed with quantizer 2, like it used to be in Nandub. My question is : as XviD is ble to deal with quant 1, why isn't the first pass performed at quant 1. I thought that way, the codec know the EXACT framesize.
Koepi
4th July 2002, 14:42
*sigh*
it doesn't matter at which quantizer the first pass is done. You could also use quant. 15.
It's just for building a bitrate distribution graph.
indeed, it was really a dumb question. Thanks for answering anymay
Koepi
4th July 2002, 15:46
It's not really a dumb question. The code must be aware of the quantizer used in the first pass to scale the curve correctly, so it DOES in fact matter which quant is used somehow ;)
Regards,
Koepi
It's not really a dumb question. The code must be aware of the quantizer used in the first pass to scale the curve correctly, so it DOES in fact matter which quant is used somehow ;)
While you could force the 1st pass to use a higher quantizer (it'd cut the 1st pass time dramatically) and see pretty much identical quality, I seem to remember putting a hack in some of the 2-pass code that "assumes" the 1st pass was at quant=2 (in the update routine?), instead of reading nns1->quant from the stats file. Without changing that hack, a 1st pass with quant != 2 would explode in the 2nd pass I'd guess.
Hopefully I'll be settling down "permanantly" in 3 or so weeks, and I'll finally be able to code again!
-h
Bulletproof
4th July 2002, 19:42
I'm guessing here, but maybe it's because quantizer 1 and 2 are virtually the same and 1 would just bloat the filesize more and cause it to go slower?
Good to see you around -h hope ya having fun :)
(im off to Portugal soon...bask in some sun for a while :) )
-Nic
hi ppl.....its me again......sorry about you... :)
a friend of mine and i myself have a doubt.......when i have to make the first pass, it is necesary that put the desired size in the second pass box or it doesnīt matter because the first pass only analizes the movie???
the second doubt....mostly a bug......why the desired size sucks when i use the "end credits" options???......i mean NEVER can achieve the size that i want and i always have to CUT them..... grrrrrrr
the third........NIC......our patiente has a limit :).....really man.....pleaseeeeeeeeeeeee...........dvd2avi ala NIC ETA???? :)
Thanks ppl for your time.
Alx
Teegedeck
5th July 2002, 08:08
Originally posted by alx
when i have to make the first pass, it is necesary that put the desired size in the second pass box or it doesnīt matter because the first pass only analizes the movie???
not neccessary
why the desired size sucks when i use the "end credits" options???
better use fixed quantizers in the credits-tab, you probably wanted to reach a filesize that's just too small
hi, teegedeck, thanks for your answer, but.....when you said "not neccessary", means it is not necesary to put the desired size in the second pass box or "not neccessary" the first pass analyze the movie "only"???? could you be more specific?? my english is not so good... :)
for the second part, maybe was my mistake, i did not clarify too much......lets try again............lets do with an example......i want a final video of 626 mb....if i made it WITHOUT "end credits", te final size is perfect, but, i want to use a 10% credits rate reduction in the "end credits" section, the final video results in 632mb. or something like that.
Hope this time i made the right questions. :)
Alx
Teegedeck
5th July 2002, 10:22
Originally posted by alx
hi, teegedeck, thanks for your answer, but.....when you said "not neccessary", means it is not necesary to put the desired size in the second pass box or "not neccessary" the first pass analyze the movie "only"???? could you be more specific?? my english is not so good... :)
no problem, alx. The desired size is ONLY for the 2ND PASS. It is ignored in the 1st pass.
Originally posted by alx
for the second part, maybe was my mistake, i did not clarify too much......lets try again............lets do with an example......i want a final video of 626 mb....if i made it WITHOUT "end credits", te final size is perfect, but, i want to use a 10% credits rate reduction in the "end credits" section, the final video results in 632mb. or something like that.
You are trying to reduce the bitrate for credits too much. If you have a small desired filesize (=low bitrate) for the whole movie and then want to use 10% of that bitrate for the credits, the whole calculation for the filesize will get messed up.
Let's say, you compress the credits at quantizer 31 - this is the strongest compression XviD can give! - and end up with 10MB for the credits. Your credits can't get any smaller than this.
If you would then set a desired size smaller than 10MB for the credits (or a bitrate that would give a smaller filesize), it just wouldn't work!...
And the calculation of the bitrate for the whole encoding would be messed up. It would be based on the assumption that credits take, say 5MB, when they really can't get smaller than 10MB! The result would be a file that's 5MB too big.
Hope this helped.
Greets,
Tee
LoL... Its coming, been faffing around with dvd authentication. Done it now, so I can release DVD2AVI ala NIC (as it has apparently been dubbed :) ). Beware the bugs though & my lack of time.... :)
-Nic
Teegedeck thanks a lot for your time and patience.....mmmmm, i am thinking about CUTTING the end credits.....i feel agresive right now. :)
Nic....i donīt know if i have to love you, or to hate you....certanly you will not have the "employee of the month" award........ :) :)
(just a joke)......BTW, have you looked the mpeg2avi sourcecode?? PX3 said that it was the fastest codec around (some time ago)......i know that it has not a good deinterlace and another bad things, but......maybe you can use some ideas from this little old program.
alx.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.