You should always render out to frames, never to avi or mov files. It something goes wrong you have to re-render the whole animation again.
Render to tga's, exr's, png 48bits, etc
Bring that into your editing app or compositor and compress to what ever file format you prefer.
cheers