Take the 2-minute tour ×

I want to convert a ogg file to aac. But I need to transfer all the data of the ogg file (i.e. album, year, cover,...) to the aac file using a shell comand.


share|improve this question
Have you solved this issue? –  pl1nk Jun 27 '12 at 8:26
add comment

4 Answers

ffmpeg -i input.ogg -strict experimental -acodec aac output.aac

you can find ffmpeg in the official repository.

share|improve this answer
Mmm sorry, but the sound quality isn't good and the tags of the original file didn't copy. –  Brallan Aguilar Dec 3 '11 at 9:18
@BrallanAguilar Unfortunately the sound quality will generally not be good when converting from one lossy format to another. You should avoid doing so when possible. –  Eliah Kagan Jun 27 '12 at 8:30
add comment

Transcoding from one lossy format to another is not ideal. However, if you insist on doing so, this is the best way: install avconv and ubuntu-restricted-extras with

sudo apt-get install avconv ubuntu-restricted-extras

then get neroAacEnc:

wget http://ftp6.nero.com/tools/NeroAACCodec-1.5.1.zip
sudo unzip NeroAACCodec-1.5.1.zip -d /usr/bin linux/*
sudo chmod +x /usr/bin/neroAacDec /usr/bin/neroAacEnc /usr/bin/neroAacTag

NeroAacEnc is superior to avconv's internal AAC encoder, and also much better than libfaac, it consistently scores highly on listening tests; and Nero have released it free for non-commercial use.

To create an M4A (MP4) file, use

avconv -i input.ogg -f wav - | neroAacEnc -if - -ignorelength -q 0.55 -of output.m4a

The -q flag can use any value between 0 and 1, with 1 being highest-quality; according to this, 0.55 averages to a bit rate of 192 kb/s; a lower -q of around 0.4 would probably actually be perfectly suitable for most music listening. Experiment to find out what works best for you.

Unfortunately, this won't keep the metadata; but you can transfer the metadata from input.ogg to output.m4a with a second command:

avconv -i output.m4a -i input.ogg -map 0 -map_metadata 1 -c copy output.m4a
share|improve this answer
add comment

Use Soundconverter Install soundconverter

And change type of result to AAC under Edit -> Preferences

share|improve this answer
I tried it. But the problem is metadata (tag information like cover, artist,...) isn't copied. –  Brallan Aguilar Dec 3 '11 at 10:13
add comment

Footbar 2000 can work well to convert music files

share|improve this answer
Mmm sorry, where I can obtain it? –  Brallan Aguilar Dec 6 '11 at 2:34
It's not a native Linux application. –  pl1nk Jun 27 '12 at 8:26
@AAC Even better, you could expand this answer to explain how to obtain foobar2000, how to get it working in Ubuntu with Wine (since it's a Windows program), and specifically how to use it to convert files (screenshots would be a plus, too). –  Eliah Kagan Aug 22 '12 at 8:28
add comment

Your Answer


