Virtual Dub is a powerful program... I never learned how to use it properly though. Every once in a while I will screw up an AVI I encode, but
VLC can play it. If it is so screwed up, VLC will prompt if I would like it to repair it. You might have luck.