Best Audio Encoder Settings

What are the best encoder settings for MP3 and MP4 (AAC) ?

Frequency response test using uncompressed pink noise as a reference

PCM 48 kHz, 16 bit, Mono, Source file (WAV, 1225 kB)

LameEncoderFrequencyTest_PCM.png

MP4 Encoding

Encode with Logic Pro X to AAC

Logic_FrequencyTest_AAC.png

AAC, Mono, File size: 438 kB

Audio Format                    : mp4a
Audio Bits Per Sample           : 16
Audio Sample Rate               : 48000
Avg Bitrate : 236 kbps

Encode with FDK AAC in ffmpeg

wiki.hydrogenaud.io/index.php?title=Fraunhofer_FDK_AAC

M4A (AAC Audio)

ffmpeg -i PinkNoise_PCM.wav -c:a libfdk_aac -q:a 160k PinkNoise_FDK.m4a

Comments: The FDK AAC encoder is better than the normal "-c:a libfaac -b:a 160k".

Frequency response chart

FDK_FrequencyTest_AAC.png

AAC, Mono, File Size: 327 kB

Audio Format                    : mp4a
Audio Bits Per Sample           : 16
Audio Sample Rate               : 48000
Avg Bitrate                     : 202 kbps

MP3 Encoding - Lame

Use variable bitrate (VBR) or not ?

Different settings with Lame

Try "--preset insane" to get the best quality. The "extreme" preset uses VBR, "-V0" (VBR ), produces the same result

Technical details of the recommended settings
Switch Preset Target Kbps Typical Kbps[3] Y Switch Lowpass[4] Resample
-b 320 --preset insane 320 320 Y[5]
-V 0 --preset extreme ~240 220–260
-V 1 ~220 190–250 19383 Hz – 19916 Hz
-V 2 --preset standard ~190 170–210 18671 Hz – 19205 Hz
-V 3 ~170 150–195 Y 17960 Hz – 18494 Hz
-V 4 --preset medium ~160 140–185 Y 17249 Hz – 17782 Hz
-V 5 ~130 120–150 Y 16538 Hz – 17071 Hz
-V 6 ~120 100–130 Y 15115 Hz – 15648 Hz
-V 7 ~100 80–120 Y 14581 Hz – 14968 Hz 32000 Hz
-V 8 ~80 70–105 Y 12516 Hz – 12903 Hz 32000 Hz
-V 9 ~70 45–85 Y 9336 Hz – 9602 Hz 24000 Hz

The following command-line options will all produce the same output:

Taken from: wiki.hydrogenaud.io/index.php?title=Lame

Frequency Response Tests

Test of different presets

Lame Insane Test

lame --preset insane PinkNoise_PCM.wav

LameEncoderFrequencyTest_Insanepng

Notice the low pass filter at 20.5 kHz

File size: 513 kB

Encoder                         : LAME3.99
Lame VBR Quality                : 4
Lame Quality                    : 3
Lame Method                     : CBR
Lame Low Pass Filter            : 20.5 kHz
Lame Bitrate                    : 255 kbps
Audio Bitrate : 320 kbps

Lame Extreme Test

lame --preset extreme PinkNoise_PCM.wav

LameEncoderFrequencyTest_Extreme.png

File size: 205 kB

Encoder                         : LAME3.99
Lame VBR Quality                : 0
Lame Quality                    : 0
Lame Method                     : VBR (new/mtrh)
Lame Low Pass Filter            : 24 kHz
Lame Bitrate                    : 32 kbps
Lame Stereo Mode                : Mono
Audio Bitrate                   : 128 kbps

Lame VBR Test

lame --V6 PinkNoise_PCM.wav

LameEncoderFrequencyTest_V6.png

Notice the low pass filter at 16.5 kHz

File size: 94 kB

Encoder                         : LAME3.99
Lame VBR Quality                : 6
Lame Quality                    : 0
Lame Method                     : VBR (new/mtrh)
Lame Low Pass Filter            : 16.5 kHz
Lame Bitrate                    : 32 kbps
Lame Stereo Mode                : Mono
Audio Bitrate                   : 58.5 kbps

|•| – 2015-02-04

Copyright © 2024 Hans E Andersson. All rights reserved.
heamusic

Login