1

I wanted to make sure that I'm not shooting myself in the foot and ask about this.
So currently I have an audio file in a .mkv container that looks like this

Audio: FLAC (framed) 48000Hz stereo 1536kbps [A: Audio (flac, 48000 Hz, stereo, s16) [default]]

ID : 2
Format : FLAC
Format/Info : Free Lossless Audio Codec
Codec ID : A_FLAC
Duration : 39mn 50s
Bit rate mode : Variable
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Title : Audio
Writing library : libFLAC 1.2.1 (UTC 2007-09-17)

And I would like to convert it to AAC, preferably without losing the quality too much.
I did find a similar question asked on this forum.
But the method that was described there is about 3 years old.

In short:

"compile your own ffmpeg for fdk_aac
follow the AAC encoding guide and use fdk_aac's -vbr option - with a setting of 3"

Resulting in:

ffmpeg -i input.flac -c:a libfdk_aac -vbr 3 output.m4a".

By evilsoup. - taken from here.

So I was wondering if this will work for my situation, or if it won't work for me.
If that's all it takes then no need to answer, and thanks!

1
  • Looks good to me. Notice that the vbr quality goes from 1 to 5, 5 being highest. What ends up as the appropriate level depends on source material and use. I suggest you play around with it a little.
    – AkselA
    Commented Oct 8, 2016 at 10:10

1 Answer 1

3

FFmpeg supports two AAC-LC encoders:

  • Native FFmpeg AAC encoder (aac)
  • Fraunhofer FDK AAC (libfdk_aac)

FFmpeg supports one HE-AAC encoder:

  • Fraunhofer FDK AAC (libfdk_aac)

libfdk_aac

libfdk_aac is still the best AAC-LC encoder supported by FFmpeg, and is the only HE-AAC encoder supported by FFmpeg. However, its license is problematic when it comes to distribution, so you'll need to compile ffmpeg to be able to use it.

Native FFmpeg AAC encoder

This encoder has seen many improvements since the answer you refer to. It is no longer considered experimental, but it is not yet as good as libfdk_aac. However, if you give it enough bits it should be acceptable. The advantage of this encoder is that it is always available and comes with FFmpeg.

Pipe

Not always practical, but you can pipe to your favorite, standalone encoder:

ffmpeg -i input -f wav - | fdkaac -I -m 5 - -o output.m4a

Also see

6
  • Just to flesh out your comment that the native encoder is not quite as good as Fraunhofer's, but acceptable at higher bit rates; listening test supporting that: hydrogenaud.io/index.php/topic,111085.0.html
    – AkselA
    Commented Oct 8, 2016 at 9:55
  • 1
    Native encoder may be much enriched as of today, it might yield similar quality as fdk-aac.
    – tripulse
    Commented Feb 28, 2020 at 5:27
  • @Quadcubic Not according to kamedo2, a known ABX tester, but regardless I personally usually still use -c:a aac.
    – llogan
    Commented Feb 28, 2020 at 22:28
  • @llogan What about vanilla AAC codec + -aac_coder twoloop?
    – tripulse
    Commented Sep 6, 2020 at 2:47
  • @tripulse I am not aware of any ABX tests involving anmr, twoloop, and fast. Would be interesting to see results. I can only suggest to give it a try.
    – llogan
    Commented Sep 8, 2020 at 17:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .