When you create long avi animations in 3ds Max you will have noticed that for long animations you end up with a truncated file, it's not getting larger than 1Gb. The general recommendation is of course to render animations to separate, uncompressed image files and convert those to an animation afterwards as discussed in Rendering animations by rendering to single frames first.
Instead of using 3ds Max to create the animation we're going to use ffmpg which you can download from https://www.ffmpeg.org/ and use the command line tool to generate the animation file.
This is a command line tool, so with images named test-0001.png, test-0002.png etc from a command shell you'd run:
ffmpeg -framerate 30 -i test-%04d.png test.avi
Explanation of the parameters:
|-framerate||30||set the frame rate to 30 fps|
|-i||test-%04d.png||input filenames where %04d means they are sequentially numbered with leading zeros and using four characters|
That was the simplest possible command line, there are lots of options in ffmpeg, check the documentation on the website for details.