Log in

View Full Version : Calculating how much data (avi) is missing


marnix88
21st May 2006, 13:46
Hi, Gspot tells you if an avi video is truncated and how much of the video is missing.

I know I can check to see if the AVI has an index (idx1) to find out if it's truncated, but how can I calculate how much of the file is missing?

Thank you.

marnix88
29th May 2006, 16:09
I read that the original file size is somewhere in the riff header (4 bytes) and that you can compare the real size of the AVI with the size in the riff header, but where is the real file size stored in the riff header?

unmei
29th May 2006, 22:17
right after the RIFF identifer, that is

00 - 03 'RIFF'
04 - 07 size (that is, total RIFF file size minus the 8 byte used up to here)
08 - 11 FormatID (ie 'AVI ')
(other RIFF (sub-)chunks)


Note that this will not work for OpenDML Avi's larger than what this 4-byte int can hold. It's little endian and i think "signed" or at least better not use the MSB.

marnix88
30th May 2006, 14:21
Thank you, unmei.