I have been working on avi file editing for quite some time, but this is a weird problem that I cam across. I have a video captured at 3 frames/sec and it is compressed using divx codec. When I tried to access the correct number of frames the file contained, the AVIStreamInfo structure gave me wrong number. When I try to read the header using MATLAB it gives me the correct number of frames the file contains. The worrying factor is that there seems to be no consistency between the two numbers (ratio of the two numbers doesn’t seem to hold ) across different files encoded at same frame rate and compressor, only different lengths. I would really appreciate if some one can explain me what’z goin on.