Log in

View Full Version : 1st Pass Stats File


neoresin
23rd July 2004, 03:57
Hi,
I might have missed something, but I've been searching for a while and have yet to find something that fully explains what is stored in a stats file and in the first pass of an XviD encode. I'd like to know because I want to save some time when encoding and finding a happy medium (finding a good size ratio [(final video size)/(original m2v file size)] vs. quality). I'd ultimately just like to skip over the step that involves the first pass and just encode using the previous 1st pass encode. :D

I've been using the setup described in this guide by Doom9: http://www.doom9.org/xvid-vdub.htm
I've also been using this stable release of the Koepi binaries: XviD-1.0.1-05062004

Any help would be greatly appreciated.

-Neoresin :)

killingspree
23rd July 2004, 07:48
hi and welcome to the forum,
unfortunately afaic you cannot just use previous stats files, as it records frame specific information for each movie - the same information on another movie would just confuse the codec and most likely produce a big pile of garbage in the end.

what the first pass does is, that it compresses the movie with a fixed quant, and records information like compressability, amount of motion, scene change etc. this information is later used in the second pass to better distribute the bitrate aswell as position b-frames etc!

hth
steVe

neoresin
23rd July 2004, 17:45
hey thanks

i wasn't exactly sure on how that worked. thank you. i just have one more short question (and it probably is already answered in your reply, killingspree, but i just want to make sure): what if the 1st pass is used for the SAME video file? i know you said that for ANOTHER video file, the first pass file would create garbage. if i was reencoding the same video file (as in say i took a short from Ice Age and wanted to compress it a little more), could i use the same first pass avi and stats file? i know you said here,

"it compresses the movie with a fixed quant, and records information like compressability, amount of motion, scene change etc."

still, i wanted to make sure. THANK YOU SO VERY MUCH!
-Brian

jggimi
23rd July 2004, 19:52
The .avi file produced by the first pass is a dummy.

neoresin
24th July 2004, 01:28
but the stats file holds the important information for the next pass, right? so if i change something (in gordian knot) and then don't save a new first pass, then i'm going to get a messed up video, right?

i'm just worried that if i just skip over the first pass after i've done the whole process, beginning to end (encoding first pass and then second pass to get a final, small video file), then i'll get a messed up file when i do it again to the SAME uncompressed movie but now with a bigger compression ratio/different resolution/[insert changed attribute here]. i might not be explaining myself correctly... tell me if i'm not.

thanks for putting up with me! =/ :)

-Brian

McGee
24th July 2004, 01:58
Originally posted by neoresin
but the stats file holds the important information for the next pass, right? so if i change something (in gordian knot) and then don't save a new first pass, then i'm going to get a messed up video, right?I am curious about this as well. And I also have an XviD question that fits into this thread: Is it ok to perform a series of first passes, and then perform a series of second passes, or do you have to go firstpass/secondpass/firstpass/secondpass?

Edit: If you wanted to do the first passes and then the second passes, would you need to create individual video.pass files for each?

neoresin
19th August 2004, 04:26
@McGee
I almost positive you can use VirtualDubMod to encode a series of first passes by using the Job Control. Go into Video->Compression and select the XviD codec. Click Configure and make your way to where the first pass stats file is designated (using Koepi's binaries [XviD-1.0.1-05062004] configuration dialog, click 'more...' next to 'Encoding Type' and the file naming dialog will be right there) and name it there. From there click 'OK' a couple times to get to the main VirtualDubMod dialog and select File->Save As.... Save it to an appropriate directory and check the 'Don't run this job now, ...' checkbox. Lather, rinse, repeat until all first passes are accounted for. Job Control is near the bottom of the File menu. Just start that up and click 'Start' to encode them. Past doing what I just said (such as doing something that circumvents the entire naming of the stats files, like a batch naming utility) is above me. So essentially the answer to your question is: Yes, you do have to do all the stats file hooplah (unless, of course, I'm completely wrong... [moderators help us out here... please? :scared: :) ]). Anyway, I hope this helps!

-Brian

killingspree
19th August 2004, 06:52
hmmm.... it actually might work this way - but honestly i've never tried it (and unfortunately do not have the time to do the testing now)...

anyway, there's a good chance you'd end up with screwed up video when doing the second pass then...

but, you know what, i think it's time for this thread to move to the Xvid forum, where the real experts will hopefully take a look at it :)

kr
steVe

piscator
22nd August 2004, 13:17
Originally posted by neoresin
because I want to save some time when encoding and finding a happy medium (finding a good size ratio [(final video size)/(original m2v file size)] vs. quality). I'd ultimately just like to skip over the step that

That's exactly what a Compressability Check does! It gives you a quality percentage depending on the settings you choose in GKnot before you start your encode. So, no need to do multiple encodes unless of course you want to see the quality difference. But for that, it's easier to take just a small clip -with trim(start, end)- out of your movie.

Of course, it is possible to reuse your first-pass, but only if you do not change any codec settings, which only leaves target size you can change.

greetz,
Piscator