I am using libfdk_aac for converting audio in video files. According to ffmpeg manual what it says about libfdk_aac is :- But beware, it defaults to a low-pass filter of around 14kHz. If you want to preserve higher frequencies, use -cutoff 18000. Adjust the number to the upper frequency limit you prefer.
I always use -ar 44100 for setting up frequency in ffmpeg. What does the cutoff option do ? Will it create any audio quality difference if i use -cutoff ?
+ Reply to Thread
Results 1 to 20 of 20
-
-
-ar is the sampling rate, not frequency
the frequency response is determined by that specific source characteristics . e.g. something like a low quality phone recording might only have low frequencies . A high quality HD audio recording might have full range of frequencies . If you want a better idea of what is going on, view it graphically in an audio editor (e.g. audacity)
The cutoff option will lowpass above that level; this means those higher frequencies will be eliminated, reducing the quality, but potentially saving bandwidth . At lower bitrates with audio compression, it potentially increases quality, because more data at a given bitrate can be distributed to the lower frequencies where people can distinguish and hear more
Will it create any audio quality difference if i use -cutoff ?
Yes, if the source has high frequencies . No if it has only low frequencies (if there wasn't any high frequency data to begin with, there is nothing to "cut off" ) -
Thanks for the info. For example i am converting a 720p video with audio bitrate as 48k using -cutoff 20000 will give me more quality as compared to the audio converted without using cutoff .
Right ?? -
-
I am always converting at bitrate of 48k. Should i use -cutoff at this level of bitrate ?
-
-
yes 48kbps 44.1Khz stereo aac. As per your suggestion i should convert this at default level of 14000 cutoff or more lower than this level of cutoff ?
-
Likely the default cutoff will sound better. You should test it out yourself
-
-
I never had a chance to go thru' lib_fdk_aac and study encoders ringing and harmonics pattern for 1st order, 2nd order, and so on...
If you want to preserve higher frequencies, use -cutoff 18000. Adjust the number to the upper frequency limit you prefer. -
But are you using LC or HE, HEv2 ? I think cutoff only affects LC for fdk . HE profile would probably sound better at low bitrates
If you're using -b:a 48k , that implies CBR encoding (also inefficient given the bitrate range) , instead of VBR based quality encoding
Of course everything discussed here varies according to the source. Complex material will be harder to encode -
ya m using LC and cbr encofing mode b:a . At a bitrate of 48k LC and HE sounds to be same with not much difference.. Increasing the bitrate will increase the size of the videos. I have also tried nero aac for encoding video at 48k. Quality was same as the libdfk_aac codec so i thought of using fdk as it can be used in ffmpeg.
-
Keep in mind that will vary by source. What kind of content were you encoding? On many sources that don't have many high frequencies, or that have constant complexity - you might not tell much of a difference
But for sources that have higher frequencies, varying content - choosing HEv2 can make a big difference at that low bitrate because it's VBR (distribution is more efficient than CBR) , and has SBR (it emulates higher frequencies) . Imagine you have a movie. Some action scenes , explosions, some slow scenes, quiet. Instead of wasting bitrate the quiet scenes, VBR can better distribute the bitrate to those areas that need it like the action scenes. You can encode LC with VBR quality (not CBR), but it's difficult to hit an exact bitrate (you have to adjust the number and might overshoot or undershoot). The point is, at that low bitrate (thus filesize), HE, or HEv2 will give you better compression (and quality) than LC
Even to non audiophiles like me can clearly hear the difference. Often at that bitrate range, LC will have "warble" or warped sounding audio because it cannot distribute bitrate and cover all frequencies - it tries to do everything yet fails because there simply isn't enough bitrate to cover everything. I can post some examples later if you wish
Even the ffmpeg recommendation is to use HEv2 for <48kbps, HE for 48-80kbps. Generally you only use LC with >96kbps (some people say 128kbps). It's just not good enough at low bitrates, especially on complex content
https://trac.ffmpeg.org/wiki/GuidelinesHighQualityAudio
libfdk_aac default LC-AAC profile. Recommended range >= 128Kbps (http://ffmpeg.org/trac/ffmpeg/wiki/AACEncodingGuide).
(libfdk_aac or libaacplus) -profile:a aac_he_v2 Usable range <= 48Kbps CBR. Transparency: Does not reach transparency. Use LC-AAC instead to achieve transparency
(libfdk_aac or libaacplus) -profile:a aac_he Usable range >= 48Kbps and <= 80Kbps CBR. Transparency: Does not reach transparency. Use LC-AAC instead to achieve transparency -
ya i know vbr is better than cbr at low bitrates but it is quite difficult to control the filesize. I am encoding videos for mobile.. HE-aacv2 might have some compatibility issues with some players as said by ffmpeg manpage. Thats why i decided to use LC instead. Anyways i will experiment using vbr mode and keep an chk on filesize.
-
Yes if you have a device target, make sure you use some compatible profile
opus produces quite good results too on many types of sources (often better than AAC with any profile, it's generally rated the highest qualty by audiophiles for lossy compression) , but not many portable devices support it natively -
I am trying neroaac now. Whats the command line option for setting up sampling rate ? I got the bitrate setting option -br but cannot find the option for setting sampling rate
-
If you need it, you'd better resample the source audio manually, before encoding to AAC.
FYI, these are the sample rates supported by the AAC spec:
Code:96000 Hz 88200 Hz 64000 Hz 48000 Hz 44100 Hz 32000 Hz 24000 Hz 22050 Hz 16000 Hz 12000 Hz 11025 Hz 8000 Hz 7350 Hz