AVI is the veteran of desktop video: dependable in 1995, cranky about everything invented since. It was born in 1992, Microsoft, and its real weak spot is modern life: no proper streaming, no subtitles, no love for modern codecs.
FLAC is the audiophile's handshake: CD-perfect sound at roughly half the shelf space. Free Lossless Audio Codec: think ZIP for sound: it decompresses back to the exact original. That makes it the right destination when what you need is archiving music with zero quality loss and a genuine size saving.