Corrupt AVI animation file

If I start rendering an animation and abort (with <ESC>) part way through, then re-render, the resulting file is corrupt.

For example, I’m using AVI DIVX Codec, and Blender 2.40a. Say I set up to render frames 41 to 160, and hit “ANIM” then go get a cup of Joe, and when I come back I realize I forgot to hit motion blur, or change the size back to 100%, so I hit <esc> make the corrections, and hit anim again, and let it chug away while I go to the gym. Then when I come back, I play the file from the /tmp directory, resulting in win-amp and DIVX player saying it is corrupted.

If I clear my /tmp directory before rendering it seems to work fine, so is there an option to automatically delete files with the same name before animating? (file 41_160.avi should be deleted before animating in this case)

Render to a series of PNGs and encode them to avi using VirtualDub.

thanks mzungu,

VirtualDub looks like the way to go. It sounds like that will allow me to re-use rendered frames if I want to loop a section.