Target a quality, rather than a specific bit rate. ac 2 -c:a libfdk_aac -b:a 128k output.mp4 As a rule of thumb, for audible transparency, use 64 kBit/s for each channel (so 128 kBit/s for stereo, 384 kBit/s for 5.1 surround sound).Ĭonvert an audio file to AAC in an M4A (MP4) container:įfmpeg -i input.wav -c:a libfdk_aac -b:a 128k output.m4aĬonvert 5.1 surround sound audio of a video, leaving the video alone:įfmpeg -i input.mp4 -c:v copy -c:a libfdk_aac -b:a 384k output.mp4Ĭonvert the video with libx264, with a target of fitting a 90-minute movie on a 700 MB (=5734400 KB) CD-ROM, mixing the audio down to two channels (Windows users should use NUL rather than /dev/null and ^ instead of \):įfmpeg -y -i input.mp4 -c:v libx264 -b:v 933k -preset:v veryfast -pass 1 -an /dev/null & \įfmpeg -i input.mp4 -c:v libx264 -b:v 933k -preset:v veryfast -pass 2 \ It gives you greater control over file size, and it is compatible with the HE-AAC profile. These settings target a specific bit rate, with less variation between samples. Adjust the number to the upper frequency limit only if you need to keeping in mind that a higher limit may audibly reduce the overall quality. If you want to preserve higher frequencies, use -cutoff 18000. Note: libfdk_aac defaults to a low-pass filter of around 14kHz ( details). Requires ffmpeg to be configured with -enable-libfdk-aac (and additionally -enable-nonfree if you're also using -enable-gpl).ĭetailed information about the FDK AAC library (not FFmpeg specific) can be found at HydrogenAudio Knowledgebase: Fraunhofer FDK AAC. This is currently the highest-quality AAC encoder available with ffmpeg (except on macOS, see below). See also Encode/HighQualityAudio for general guidelines on FFmpeg audio encoding (which also includes a comparison of which AAC encoder is best quality). This can be resolved by compiling ffmpeg yourself. Therefore this encoder have been designated as "non-free", and you cannot download a pre-built ffmpeg that supports it. ![]() The license of libfdk_aac is not compatible with GPL, so the GPL does not permit distribution of binaries containing incompatible code when GPL-licensed code is also included. The examples in this guide will use the extensions MP4 and M4A.įFmpeg supports three AAC-LC encoders ( aac, libfdk_aac, aac_at) and two HE-AAC (v1/2) encoder ( libfdk_aac, aac_at). The second-most common use is within MKV (Matroska) files because it has better support for embedded text-based soft subtitles than MP4. It is often used within an MP4 container format for music the. ![]() Advanced Audio Coding (AAC) is the successor format to MP3, and is defined in MPEG-4 part 3 (ISO/IEC 14496-3).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |