Changes between Version 38 and Version 39 of Encode/HighQualityAudio
- Timestamp:
- Jan 28, 2014, 1:37:59 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Encode/HighQualityAudio
v38 v39 4 4 == When should I transcode audio? == 5 5 6 Avoid transcoding from lossy format to another lossy format if possible. Transcode to lossy from the lossless source (if you have it) or just don't transcode by copying the lossy source audio track, instead.6 Avoid transcoding from a lossy format to the same or another lossy format when possible. Transcode to lossy from the lossless source (if you have it), or just copy the lossy source audio track instead of transcoding. 7 7 8 8 Another option if you have a lossless source is to transcode it to another lossless codec, like [[http://superuser.com/a/339031/39364|flac ]]. … … 15 15 == Copying audio tracks == 16 16 17 If the target container format supports the audio codec of the source file then really consider just muxing it into the output file without any re-encoding needed. MKV supports virtually any audio codec.[[BR]]17 If the target container format supports the audio codec of the source file then consider just muxing it into the output file without re-encoding. MKV supports virtually any audio codec. 18 18 This can be achieved by specifying 'copy' as the audio codec. 19 19 20 Example:[[BR]] 20 21 Transcoding a WebM file (with VP8 video/Vorbis audio) to a MKV file (with H.264 video/unaltered Vorbis audio):[[BR]] … … 22 23 ffmpeg -i someFile.webm -c:a copy -c:v libx264 outFile.mkv 23 24 }}} 24 In some cases this might not be possible, because the target device/player doesn't support the codec or the target container format doesn't support the codec. [[BR]]25 Another reason to transcode might be that the source audio track is too big . (It has a higher bitrate than what you want to use in the output file)26 27 == Audio encoders ffmpeg can use ==28 29 ffmpeg can encode to a wide variety of lossy audio formats.[[BR]]30 31 Here are some popular lossy formats with encoders listed that ffmpeg can use:[[BR]]25 In some cases this might not be possible, because the target device/player doesn't support the codec or the target container format doesn't support the codec. 26 Another reason to transcode might be that the source audio track is too big (it has a higher bitrate than what you want to use in the output file). 27 28 == Audio encoders FFmpeg can use == 29 30 FFmpeg can encode to a wide variety of lossy audio formats.[[BR]] 31 32 Here are some popular lossy formats with encoders listed that FFmpeg can use:[[BR]] 32 33 {{{ 33 34 Dolby Digital: ac3 … … 74 75 75 76 The '''>=''' sign means greater or the same quality.[[BR]] 76 Even though AAC should generally give better quality than MP3 at the same bitrates libmp3lame should give better quality output than `libfaac`.[[BR]]77 This list is just a general idea and there might be cases where codecs listed to the right might perform better than those listed to the left at certain bitrates. [[BR]]78 The highest quality internal/native encoder available in ffmpeg without any external libraries is eac3/ac3. [[BR]]79 80 Please note it is '''not recommended''' to use `vorbis` for Vorbis encoding .[[BR]]77 Even though AAC should generally give better quality than MP3 at the same bitrates, libmp3lame should give better quality output than `libfaac`.[[BR]] 78 This list is just a general guide and there may be cases where a codec listed to the right will perform better than one listed to the left at certain bitrates. [[BR]] 79 The highest quality internal/native encoder available in FFmpeg without any external libraries is eac3/ac3. [[BR]] 80 81 Please note it is '''not recommended''' to use `vorbis` for Vorbis encoding; use `libvorbis` instead.[[BR]] 81 82 Please note that `wmav1`,`wmav2` and `libvo_aacenc` don't seem to be able to reach transparency at any given bitrate.[[BR]] 82 83 … … 157 158 ||'''WebM'''||Vorbis|| 158 159 ||'''OGG'''||Vorbis, Opus|| 160 ''* Muxing Opus in Matroska is experimental, but may be safe.'' 161 159 162 Please note that there are more container formats available than those listed above. 160 163 161 164 == Recommended minimum bitrates to use == 162 165 163 Please note that the bitrates listed here assumes the input audio channels is Stereo and the sample rate is >= 44.1Khz. Mono could require lessbits.[[BR]]166 The bitrates listed here assume 2-channel stereo and a sample rate of 44.1kHz or 48kHz. Mono may require fewer bits.[[BR]] 164 167 - '''libopus''' Usable range >= 80Kbps. Recommended range '''>= 128Kbps'''[[BR]] 165 168 - '''libfdk_aac default LC-AAC profile.''' Recommended range '''>= 128Kbps''' (http://ffmpeg.org/trac/ffmpeg/wiki/AACEncodingGuide). [[BR]] … … 170 173 - '''ac3 or eac3''' Usable range >= 160kbps. Recommended range '''>= 160Kbps'''[[BR]] 171 174 - '''libfaac''' Usable range >= 192kbps. Recommended range '''-q:a 330 -cutoff 15000 (>= 192Kbps)'''.[[BR]] 172 Example of usage:175 Example of usage: 173 176 {{{ 174 177 ffmpeg -i input.wav -c:a libfaac -q:a 330 -cutoff 15000 output.m4a 175 178 }}} 176 179 - '''aac''' Usable range >= 192kbps. Recommended range '''>= 240Kbps'''[[BR]] 177 Example of usage:180 Example of usage: 178 181 {{{ 179 182 ffmpeg -i input.wav -c:a aac -b:a 240k -strict -2 output.m4a … … 193 196 ---- 194 197 195 * Muxing Opus in Matroska is experimental, but may be safe.196 198 When compatibility with hardware players doesn't matter then use `libvorbis` in a MKV container rather than `libfaac` when `libfdk_aac` isn't available[[BR]] 197 199 When compatibility with hardware players does matter then use libmp3lame or ac3 in a MP4/MKV container rather than `libfaac` when `libfdk_aac` isn't available[[BR]]
