Deepak,
As Kyle says, it can be done using the example he mentions.
I don't know what kind of analysis you are doing, but I wonder if the image compression in the AVI file will make the analysis difficult if not impossible. Image compression routines are typically optimized to preserve the way an image looks. The image may look almost identical to the original, but there can be significant differences from an analysis point of view.
Bruce
Bruce Ammons
Ammons Engineering