In the open source world, several audio codecs are available. For creating AVI files, the general practice rule is to use the LAME MP3 encoder. The reason being is that it is very high quality and is widely supported by nearly every video player. If you are concerned about patent issues on MP3 format or want audio of even higher accoustic quality, choose Vorbis instead.
Avidemux can save your audio using any of the encoders available in the Audio drop-down menu. Select your encoder, then go to the drop down menu Audio→ Save to save your audio file.
Note that Vorbis raw audio streams are unplayable as they need a proper container (Ogg or Matroska).
Note: package names are taken from Debian/Ubuntu system, and therefore may differ slightly for other Linux distributions. Many Debian packages are references from Marillat.
It produces MPEG-1 Layer 3 (MP3) audio streams. Requires libmp3lame.so, provided by the liblame0 package.
The source code of this codec is from the LAME package, released under the GPL license, see http://lame.sourceforge.net/. It seems that there are some patent issues that prevent the package to be included into the Debian distribution. See a discussion about including LAME into Debian at http://www.debian.org/devel/wnpp/unable-to-package.
Supported modes: Mono, Stereo and Joint Stereo. Supported rates: 48-384 kb/s CBR, ABR and Extreme (aggressive VBR).
It produces Vorbis audio. Requires libvorbisenc.so.2, provided in the package libvorbisenc2. This audio format was developed as a Free Software replacement for MP3, where some patent issues persist. Sound quality is comparably better than MP3. The support from players is less ubiquitous, but increasing.
Supported modes: Stereo and Joint Stereo. Supported rates: 48-384 kbits. Avidemux can use CBR mode or VBR mode.
Don't put Vorbis audio into AVI! It will result in unplayable video, choose Matroska or OGM as output container instead.
It produces AAC audio files. This type of audio is not recommended under any circumstances for use with video files (and containers) other than specifically and literally the MP4 container. In the case of the MP4 container, AAC is the best choice you can have, since the only other option is MP3 audio. AAC audio for video files (even MP4 videos) is still fairly poorly supported and often causes players to crash on certain platforms.
AAC audio supposedly the best available accoustic quality at levels lower than or equal to 96(nbsp)kb/s while maintaining the smallest file size possible. At levels greater than 96(nbsp)kb/s AAC files (equivalent to 128(nbsp)kb/s in Ogg Vorbis), Vorbis acoustic quality is notably better while producing smaller files.
Essentially, in the case of very low level quality on your audio, AAC appears to test as preferable. If you like the audio to sound equivalent to 128(nbsp)kb/s Ogg Vorbis (which is equivalent to ~160-192(nbsp)kb/s MP3 files), then use AAC at around 96(nbsp)kb/s. AAC will give you the best sound for the smallest file at lower quality. If you want higher quality at the smallest file size, the next choice is Vorbis at levels greater than 128(nbsp)kb/s.
Requires libfaac.so.0 and libfaad.so.0 (encoder and decoder), provided by the libfaac0 and libfaad2-0 packages. The site is http://www.audiocoding.com/. Source code is available under the GPL or LGPL license so it is Free Software, but some patent issues exist on this audio format.
Supported modes: Stereo and Joint Stereo. Supported rates: 48-384(nbsp)kb/s. CBR.
It produces MPEG-1 layer 2 (MP2) files. The support is compiled-in using the libavcodec library. The source code of this codec library is from the FFmpeg project, licensed under the LGPL license. Some patent issues concern this software, as other MPEG related software. See http://ffmpeg.org/legal.html.
Most FFmpeg codecs were developped from scratch to ensure best performance and high code reusability. Supported modes: Stereo and Joint Stereo. Supported rates: 48-384(nbsp)kb/s. CBR only?
It produces AC-3 audio streams. Most DVDs have the audio encoded in some AC-3 variant. The support is statically compiled-in using the libavcodec library, see FFmpeg MP2 for some notes about the FFmpeg project.
It produces MPEG-1 layer 2 (MP2) files. The support is statically compiled-in. Due to patent issues surrounding the layer 3 encoder and the ability of most MPEG audio players to play layer 2 files, tooLAME makes a very good drop-in replacement for LAME or other layer 3 encoders under most circumstances. It is a good choice for VCD/SVCD and even DVD audio track.
Supported modes: Stereo and Joint Stereo. Supported rates: 48-384 kb/s CBR.
It produces uncompressed Microsoft RIFF WAV PCM audio files. This is lossless fully decompressed audio data, very large, but you can be assured of no quality loss. Normal PCM cannot be used with MPEG files, but LPCM can.
Linear Pulse Code Modulation (or LPCM) is a format that is a popular choice in music production. It can have up to 8 channels of audio at 48(nbsp)kHz or 96(nbsp)kHz sampling frequency and 16, 20 or 24 bits per sample. It has a maximum bit rate of 6.144(nbsp)MB/s. The format, without compressing the sound data, simultaneously samples and captures analog signals and transforms them into digital signals.
It's generally limited to use with MPEG files. Using LPCM on an MPEG will allow lossless audio preservation in an uncompressed form, at the cost of lots of space. Use LPCM if the video already has LPCM for its current audio until you want to transcode the audio to some form of lossy audio (like Vorbis, AAC or MP3).