AVI does not identify the codec
An AVI can contain old compressed video, lightly compressed frames or a codec that current browsers do not include. Two files with the same extension can behave completely differently. The conversion process must decode the actual stream first, then encode a modern H.264 MP4. If the codec cannot be decoded reliably, changing the filename will not fix the source.