PDA

View Full Version : xvid debugview analyzer for perl v0.4 (avg. frame size reporting)


canadian_fbi
8th August 2002, 23:26
i've created a new version of my debugview analyzer perl script. the biggest change i made to this one is that it now tracks frame sizes, so in addition to giving you the overall 1st-pass and 2nd-pass sizes (and the compressibility percentage), it also gives you the average frame size for the movie, for movie and credit i- and p-frames, and for each movie quantizer value. i'm hoping this will be useful to xvid developers and hardcore testers by giving you a little more statistical info as to the number and size of frames of various quantizer values. here's an example of its output from spy game R1 (2 cd encode with AC3 audio):

number of frames: 182153
number of i-frames: 2734 (1.50%)
number of p-frames: 179419 (98.50%)

number of movie frames: 174880 (96.01%)
number of credit frames: 7273 (3.99%)

number of H.263 frames: 17934 (9.85%)
number of MPEG frames: 164219 (90.15%)


--- movie quantizers ---
quant 2: 30237 frames (17.29%), avg. size: 9415 bytes
quant 3: 126709 frames (72.45%), avg. size: 5822 bytes
quant 4: 17514 frames (10.01%), avg. size: 9266 bytes
quant 5: 398 frames (0.23%), avg. size: 19773 bytes
quant 6: 22 frames (0.01%), avg. size: 23014 bytes
average quant = 2.932
average movie frame size = 6822 bytes

--- credit quantizers ---
quant 25: 7273 frames
average credit frame size = 1152 bytes


--- movie i-frame quantizers ---
quant 2: 2703 frames (99.82%), avg. size: 29503 bytes
quant 3: 5 frames (0.18%), avg. size: 57546 bytes
average i-frame quant = 2.002
average movie i-frame size = 29554 bytes

--- credit i-frame quantizers ---
quant 25: 26 frames
average credit i-frame size = 7066 bytes


--- movie p-frame quantizers ---
quant 2: 27534 frames (15.99%), avg. size: 7443 bytes
quant 3: 126704 frames (73.59%), avg. size: 5820 bytes
quant 4: 17514 frames (10.17%), avg. size: 9266 bytes
quant 5: 398 frames (0.23%), avg. size: 19773 bytes
quant 6: 22 frames (0.01%), avg. size: 23014 bytes
average p-frame quant = 2.947
average movie p-frame size = 6464 bytes

--- credit p-frame quantizers ---
quant 25: 7247 frames
average credit p-frame size = 1131 bytes


first-pass size = 1909150825 (1864405 KB)
second-pass size = 1201486842 (1173326 KB)
compressibility = 62.93%
download here: http://www.disconnect.net/temp/dbg_analyze.pl

note to moonwalker: is it just me or is our second-pass total size off for some reason? i checked and mine and yours are the same, but this movie actually came out at 1,177,692 KB for me. the compressibility percentage is likewise just a little different than the value in gknot. is it possible that the byte sizes for each frame are a little off in the debugview output?

Koepi
8th August 2002, 23:41
You're talking about the 4kb difference?

It's most likely due to a clustersize of 8 or 16kb.

Those files get "padded" in the kind of that a new file can't start within a cluster but only with a new cluster.

In old "stacker" compression this was called "slack space".

It's a gift from FAT(all variants).

Regards,
koepi

Koepi
8th August 2002, 23:43
Ouch, now I saw that you're talking about 4MB.

Either the file is very fragmented over the harddisk or there is some AVI overhead not included (like no. of frames * 24bytes)?

Regards,
Koepi

EDIT: i calculated.

It's the avi frame header overhead that's missing.

canadian_fbi
8th August 2002, 23:51
i thought it might be the avi overhead, but i wasn't sure because the desired size was 1,177,599 KB and i thought the overhead was separate of the video (i.e. gknot says your video should be the size given there, plus a certain size for your AC3 track, plus a certain size for avi overhead). i guess this is just because of the way it's displayed in gknot, where frame overhead is included as being separate of the video.