Changes between Version 12 and Version 13 of Encode/MP3
- Timestamp:
- Jun 11, 2014, 3:01:14 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Encode/MP3
v12 v13 3 3 This page describes how to use the external libmp3lame encoding library within `ffmpeg` to create MP3 audio files (`ffmpeg` has no native MP3 encoder). See also [[GuidelinesHighQualityAudio|other codecs]] you could use, and [[Encode/AAC|FFmpeg AAC Encoding Guide]] for background on FFmpeg audio encoding in general. 4 4 5 = VBR Encoding=5 == VBR Encoding == 6 6 7 7 Example to encode VBR MP3 audio with `ffmpeg` using the libmp3lame library: … … 12 12 Control quality with `-qscale:a` (or the alias `-q:a`). Values are encoder specific, so for libmp3lame the range is 0-9 where a lower value is a higher quality. 0-3 will normally produce transparent results, 4 (default) should be close to perceptual transparency, and 6 produces an "acceptable" quality. The option `-qscale:a` is mapped to the `-V` option in the standalone `lame` command-line interface tool. 13 13 14 |||||| = '''LAME Bitrate Overview''' =||15 || `lame` option || Kbit/s || Bitrate range kbit/s || `ffmpeg` option14 ||||||||= '''LAME Bitrate Overview''' =|| 15 || `lame` option || Average kbit/s || Bitrate range kbit/s || `ffmpeg` option 16 16 || `-b 320` || 320 || 320 CBR (non VBR) example || `-b:a 320k` (NB this is 32KB/s, or its max) 17 17 || `-V 0` || 245 || 220-260 || `-q:a 0` (NB this is VBR from 22 to 26 KB/s) … … 22 22 || `-V 5` || 130 || 120-150 || `-q:a 5` 23 23 || `-V 6` || 115 || 100-130 || `-q:a 6` 24 || `-V 7` || 100 || 80-120 || `-q:a 7`25 || `-V 8` || 85 || 70-105|| `-q:a 8`26 || `-V 9` || 65 || 45-85|| `-q:a 9`24 || `-V 7` || 100 || 80-120 || `-q:a 7` 25 || `-V 8` || 85 || 70-105 || `-q:a 8` 26 || `-V 9` || 65 || 45-85 || `-q:a 9` 27 27 28 28 In our example above, we selected `-qscale:a 2`, meaning we used LAME's option `-V 2`, which gives us a VBR MP3 audio stream with an average stereo bitrate of 170-210 kBit/s. 29 29 30 = CBR Encoding=30 == CBR Encoding == 31 31 32 32 If you need constant bitrate (CBR) MP3 audio, you need to use the `-b:a` option instead of `-qscale:a`. Here you can specify the number of bits per second, for example `-b:a 256k` if you want 256 Kbit/s (25.6 KB/s) audio. Available options are: 8, 16, 24, 32, 40, 48, 64, 80, 96, 112, 128, 160, 192, 224, 256, or 320 (add a `k` after each to get that rate). So to get the highest quality setting use `-b:a 320k` (but see note below).
