Skip to main content
Topic: What's the state of AAC encoding on Linux? (Read 11578 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

What's the state of AAC encoding on Linux?

From my research in AAC encoding, it seems the preferred encoder to use is Apple's encoder, which is obviously not available on Linux.  FAAC, the Linux choice appeared to be sub-par compared to all the choices available on Linux.  Has the state of AAC encoding improved at all on Linux?

What's the state of AAC encoding on Linux?

Reply #1
If you can compile fdk-aac on Linux, it would probably be the encoder of choice.


What's the state of AAC encoding on Linux?

Reply #3
When all else fails, read the wiki...

The wiki says that fdk-aac ties with Apple's AAC encoder, at least according to listening tests done by IgorC.  Need to see if I can get that installed on my Ubuntu server and automate some encoding.

What's the state of AAC encoding on Linux?

Reply #4
When all else fails, read the wiki...

The wiki says that fdk-aac ties with Apple's AAC encoder, at least according to listening tests done by IgorC.  Need to see if I can get that installed on my Ubuntu server and automate some encoding.



I'm pleased with the results from building libfdk-aac and a version of ffmpeg configured to use it, on both Debian & Xubuntu.
The following pages were helpful:



What's the state of AAC encoding on Linux?

Reply #5
FDK AAC is currently the best and easiest way to encode AAC on Linux.

The wiki says that fdk-aac ties with Apple's AAC encoder, at least according to listening tests done by IgorC.  Need to see if I can get that installed on my Ubuntu server and automate some encoding.

The Debian/Ubuntu package for the FDK library is libfdk-aac0. You can download the latest debian package (which you can use in Ubuntu) from here.
There is a really nice command line frontend for the library, called fdkaac (no hyphen). You can get an Ubuntu package from this PPA, but don't add the PPA and don't use any of the libfdk-aac packages, they are very out of date.

Direct links to the two debs you need:
http://ftp.us.debian.org/debian/pool/non-f...816-2_amd64.deb
https://launchpad.net/~mc3man/+archive/ubun...rusty_amd64.deb

Then you're up and running with the FDK AAC encoder.


BTW, the other two good Linux AAC options are:
- Nero AAC, which is very easy to get running, and also has a really good tagging utility that supports artwork and all, but the encoder is showing its age.
- QAAC (a wrapper for Apple AAC) which can be used in Linux with Wine, but is rather unpleasant to get running, and then is very slow if batch encoding.

I happen to use a shell script employing fdkaac and the Nero tag utility to batch convert from my FLAC archive as I need them, and I've been reasonably pleased.

What's the state of AAC encoding on Linux?

Reply #6
FDK AAC is currently the best and easiest way to encode AAC on Linux.

The wiki says that fdk-aac ties with Apple's AAC encoder, at least according to listening tests done by IgorC.  Need to see if I can get that installed on my Ubuntu server and automate some encoding.

The Debian/Ubuntu package for the FDK library is libfdk-aac0. You can download the latest debian package (which you can use in Ubuntu) from here.
There is a really nice command line frontend for the library, called fdkaac (no hyphen). You can get an Ubuntu package from this PPA, but don't add the PPA and don't use any of the libfdk-aac packages, they are very out of date.

Direct links to the two debs you need:
http://ftp.us.debian.org/debian/pool/non-f...816-2_amd64.deb
https://launchpad.net/~mc3man/+archive/ubun...rusty_amd64.deb

Then you're up and running with the FDK AAC encoder.


BTW, the other two good Linux AAC options are:
- Nero AAC, which is very easy to get running, and also has a really good tagging utility that supports artwork and all, but the encoder is showing its age.
- QAAC (a wrapper for Apple AAC) which can be used in Linux with Wine, but is rather unpleasant to get running, and then is very slow if batch encoding.

I happen to use a shell script employing fdkaac and the Nero tag utility to batch convert from my FLAC archive as I need them, and I've been reasonably pleased.


The only issue I see with fdk-aac is that it doesn't support vbr encoding.  The option is there, but it's considered experimental.  I just converted a FLAC, but I'll be damned it I can tell if it used the internal AAC encoder of fdk-aac.  Is there a way to tell from the metadata?

What's the state of AAC encoding on Linux?

Reply #7
The only issue I see with fdk-aac is that it doesn't support vbr encoding.  The option is there, but it's considered experimental.  I just converted a FLAC, but I'll be damned it I can tell if it used the internal AAC encoder of fdk-aac.  Is there a way to tell from the metadata?


The only reason [vbr] is said to be experimental on that page is because of a bug that existed in fdk aac described here: GetInvInt table limit. It could crash with some combinations of parameters. That bug has been patched in the debian package for libfdk-aac0 that I linked before and it is completely reliable. If you are using ffmpeg/avconv then it should be fine if you have that version of the library installed. [libfdk_aac0 version 0.1.3+20140816-2 or later]

If you use ffmpeg/avconv, there is not an easy way to tell from the file itself, but you will see the stream mapping in the output during conversion say something like "Stream #0:0 -> #0:0 (flac -> libfdk_aac)"

If you use the fdkaac encoder frontend that I linked earlier, it will set the @too tag with the FDK encoding parameters.

Edit: added some details in [brackets]. Also, vbr works very well.

What's the state of AAC encoding on Linux?

Reply #8
And another issue.  If you have FLACs which are 24/192, fdk-aac core dumps.

I agree with all the arguments against high res music, but if I am going to pay for music, I want FLACs, so I occasiosanlly buy stuff from hdtracks.  I may need to rip through my library and convert all the "hi-res" stuff down to 16/44.1.

What's the state of AAC encoding on Linux?

Reply #9
And another issue.  If you have FLACs which are 24/192, fdk-aac core dumps.
I agree with all the arguments against high res music, but if I am going to pay for music, I want FLACs, so I occasiosanlly buy stuff from hdtracks.  I may need to rip through my library and convert all the "hi-res" stuff down to 16/44.1.


Yeah, that is the same GetInvInt table limit bug I mentioned before. You may not have the patched version of the library. You could always build it yourself to make sure, the code is here. The bug is report is here. The FDK library itself accepts most sample rates, but will only take 16-bit samples. Both ffmpeg/avconv and fdkaac will convert your 24-bit samples for you before encoding. Of course, as you said, you could just manually reduce it to 16/44.1 to avoid the crash as well using something like "-sample_fmt s16 -ar 44100" in the (avconv) command line.

What's the state of AAC encoding on Linux?

Reply #10
The Debian/Ubuntu package for the FDK library is libfdk-aac0. You can download the latest debian package (which you can use in Ubuntu) from here.
There is a really nice command line frontend for the library, called fdkaac (no hyphen). You can get an Ubuntu package from this PPA, but don't add the PPA and don't use any of the libfdk-aac packages, they are very out of date.

Direct links to the two debs you need:
http://ftp.us.debian.org/debian/pool/non-f...816-2_amd64.deb
https://launchpad.net/~mc3man/+archive/ubun...rusty_amd64.deb

Then you're up and running with the FDK AAC encoder.

Why not FDK AAC from Ubuntu’s repository? https://launchpad.net/ubuntu/+source/fdk-aac
Rhythmbox, Flac + Vorbis, Sennheiser HD650 + Sony MDR-XB1000


What's the state of AAC encoding on Linux?

Reply #12
And another issue.  If you have FLACs which are 24/192, fdk-aac core dumps.
I agree with all the arguments against high res music, but if I am going to pay for music, I want FLACs, so I occasiosanlly buy stuff from hdtracks.  I may need to rip through my library and convert all the "hi-res" stuff down to 16/44.1.


Yeah, that is the same GetInvInt table limit bug I mentioned before. You may not have the patched version of the library. You could always build it yourself to make sure, the code is here. The bug is report is here. The FDK library itself accepts most sample rates, but will only take 16-bit samples. Both ffmpeg/avconv and fdkaac will convert your 24-bit samples for you before encoding. Of course, as you said, you could just manually reduce it to 16/44.1 to avoid the crash as well using something like "-sample_fmt s16 -ar 44100" in the (avconv) command line.


Hmm...  Need to test this.  I tried to convert a file on my Arch laptop and it did that.  I need to test it on my Ubuntu server and see what happens.

EDIT:  Ran into a problem where it's picking up the cover art in the vorbis tags as a video stream.  Had to add the switch '-vn' to stop that from happening.

Now I just need to find a way to automate tagging and I might be all set.

EDIT2: Tested on the Ubuntu server from the compiled source.  No core dumps.  Woohoo.

What's the state of AAC encoding on Linux?

Reply #13
Now I just need to find a way to automate tagging and I might be all set.


Check out this wiki page section on using Nero AAC in Linux. There is a sample script you could modify. Use metaflac to grab the art from the FLAC, and neroAACTag to add back to the m4a after conversion.

What's the state of AAC encoding on Linux?

Reply #14
Now I just need to find a way to automate tagging and I might be all set.


Check out this wiki page section on using Nero AAC in Linux. There is a sample script you could modify. Use metaflac to grab the art from the FLAC, and neroAACTag to add back to the m4a after conversion.


Thanks!  I'll check that out.

What's the state of AAC encoding on Linux?

Reply #15
On Linux you can use caudec (www.caudec.net) on the command line to convert complete albums. It can work with qaac, so if you install qaac and AppleApplicationSupport (the part of QuickTime necessary for encoding), you can use caudec to convert e.g. flac files into Apple AAC files.

What's the state of AAC encoding on Linux?

Reply #16
- QAAC (a wrapper for Apple AAC) which can be used in Linux with Wine, but is rather unpleasant to get running, and then is very slow if batch encoding.


If you start wine cmd in another terminal and keep it running in background, qaac will start as fast as on Windows

Now I just need to find a way to automate tagging and I might be all set.


AtomicParsley is a great tool to modify tags in MOV-based containers, it can even read and set iTunes-specific tags, which are unreadable by most taggers.

What's the state of AAC encoding on Linux?

Reply #17
- QAAC (a wrapper for Apple AAC) which can be used in Linux with Wine, but is rather unpleasant to get running, and then is very slow if batch encoding.


If you start wine cmd in another terminal and keep it running in background, qaac will start as fast as on Windows

Now I just need to find a way to automate tagging and I might be all set.


AtomicParsley is a great tool to modify tags in MOV-based containers, it can even read and set iTunes-specific tags, which are unreadable by most taggers.


There's a tool called beets which seems to do an amazing job at tagging and adding lyrics:  http://beets.radbox.org/

What's the state of AAC encoding on Linux?

Reply #18
And another issue.  If you have FLACs which are 24/192, fdk-aac core dumps.
I agree with all the arguments against high res music, but if I am going to pay for music, I want FLACs, so I occasiosanlly buy stuff from hdtracks.  I may need to rip through my library and convert all the "hi-res" stuff down to 16/44.1.


Yeah, that is the same GetInvInt table limit bug I mentioned before. You may not have the patched version of the library. You could always build it yourself to make sure, the code is here. The bug is report is here. The FDK library itself accepts most sample rates, but will only take 16-bit samples. Both ffmpeg/avconv and fdkaac will convert your 24-bit samples for you before encoding. Of course, as you said, you could just manually reduce it to 16/44.1 to avoid the crash as well using something like "-sample_fmt s16 -ar 44100" in the (avconv) command line.



I'v added this workaround to the FDK AAC wiki page for those who are using the repo's version of the library, or otherwise without the patch. See FLAC to M4A example with quirks.


 
SimplePortal 1.0.0 RC1 © 2008-2019