View Full Version : Which is higher quality--mp2, mp3, aac


Elmer Lang
October 4th, 2007, 12:14 AM
I have some .ogg files I want encoded to files usable for FCS2. I'm using ffmpegx to encode. The options for audio file are to mp2, mp3, aac and I'm wondering which is the highest quality.

I assume aac, which has the highest kbps--448. The mp2 is 224 kbps and mp3 128 kbps. Am I ass-uming correctly or just an ass?

Daniel Ross
October 4th, 2007, 12:52 AM
AAC is newer and better. It's what itunes uses.

Chris Harris
October 4th, 2007, 01:09 AM
Not sure about FCP6, but FCP generally doesn't like to edit compressed audio. It usually works better if you use AIFF.

Daniel Ross
October 4th, 2007, 01:27 AM
Absolutely use uncompressed. But if you must go through a compressor, use AAC as the intermediate step.

Erik Norgaard
October 4th, 2007, 03:43 AM
First: Ogg is only a container format, it can contain audio in various encodings such as FLAC and Vorbis. If it is FLAC then you can just convert to the format most suitable for your use since FLAC is lossless compression. If possible, you may prefer to use ALAC (Apple Lossless).

Otherwise, you should choose according to which conversion reduces quality the least, the result does not depend only on the bit rate of the final format. I don't know ffmpegx, but I know that if you use the command line version of ffmpeg, you can set the bit rate for the target file.

If you don't know the audio codec and bitrate of the source, ffmpeg will tell you, at least if you use the command line version.

Cheers, Erik

Elmer Lang
October 4th, 2007, 08:49 AM
Thanks for the replies.

Yes, I'm anxious to convert to the best format. If anyone knows ffmpegx, I'd appreciate an opinion on which of the options is the best format to convert to.

Elmer Lang
October 4th, 2007, 08:59 AM
About the best option I've found there is 'DV'. It delivers pcm dv, 48kHz, 1411 kbps. Unfortunately, it doesn't work with the file I have.

Elmer Lang
October 4th, 2007, 09:11 AM
Cricky, I just see it produces ac3, not aac. Is ac3 better than mp2 or mp3? Thanks.

Erik Norgaard
October 4th, 2007, 10:13 AM
How about checking ffmpegx web site? They have some nice explanation of all this, see http://www.ffmpegx.com/audio.html

First, you can set bit rate for the different encodings, what is shown is likely just default values. I would be surprised if you can't encode mp3 in higher bit rate than 128kbps, AFAIK maximum by standard is 320kbps or 384kbps.

Second, you won't gain anything from using a higher sample frequency than the source, but you may add noise and you will loose using a lower sample frequency.

The highest frequency that can be encoded is half the sample frequency. If source is 44.1kHz then there are no sounds higher than 22.05kHz, encoding in 48kHz will not add anything, but you may add noise as data is chunked up differently. This is independent of the encoding algorithm you choose.

Last, they do write a comparison of the three formats you ask about:

"It (AAC) provides an audio quality at 96 kbps which is slightly better than MP3 at 128 kbps and MP2 at 192 kbps."

I think that pretty much answers your question, except it doesn't tell anything about any loss when transforming from one compressed format to another.

Also, wikipedia has great info on all the different codecs, AC3 appears to be Dolby Digital.

Cheers, Erik

Elmer Lang
October 4th, 2007, 12:28 PM
Hey Eric, thanks for all the info and tips. Someone told me about a software that encodes to aif, Max. I downloaded and used that. Sounds pretty good, but thanks, especially enlightening was the info about adding noise when moving up in sample frequency.


The highest frequency that can be encoded is half the sample frequency. If source is 44.1kHz then there are no sounds higher than 22.05kHz, encoding in 48kHz will not add anything, but you may add noise as data is chunked up differently. This is independent of the encoding algorithm you choose.


That's weird to my primitive understanding. So if I trying to transcode to .aif an .mp3 and 48kHz, I should only encode at 24kHz? Dang!

All in all, this has been a very informative series of emails and I thank you for it!!!

Daniel Ross
October 4th, 2007, 12:42 PM
No. Don't save to a lower format.

The 48 is a container, and can hold up to 24khz in it.

I'd need to brush up on my physics to give a better explanation. Can't remember right now.

Emre Safak
October 4th, 2007, 12:55 PM
So don't use ffmpegx. Find something to decompress them to AIFF.

Elmer Lang
October 4th, 2007, 01:56 PM
Thanks very much, gents.

I did find 'Max', an app that seemed to do a very good job, outputting an .aiff file, 16 bit PCM Big Endian signed integer, 44.1 khz.

I don't see any way of changing to 48kHz before encoding but I guess I can export that in QT to get 48kHz.

Containers? Holding up to 24kHz? Egad! I'm Johnny Baffled.

Thanks again!!

Daniel Ross
October 4th, 2007, 03:34 PM
24KHz is above the range the human ear can hear.
My best guess here is that the doubling is due to storing a waveform, meaning 24KHz above the center can be stored, and the inverse below (down to 0KHz).

I think this is wrong, but it sorta makes sense why it needs twice the space.

As I said, I'd need to figure out a few more things with physics [blurry memories now] (and the formats themselves, too).

Ok, looked it up--
http://en.wikipedia.org/wiki/Sample_rate
Hmm... seems like the double space is just a buffer.

//confused.

Hz is literally a measure of "per second"... Hz= per seconds. 48k per seconds.... 48k times per second the audio is sampled.
I guess this measure is different than the actual pitch of audio.

Wish I could explain it better.

Erik Norgaard
October 5th, 2007, 05:21 AM
thanks, especially enlightening was the info about adding noise when moving up in sample frequency.


I like to emphasize: I don't *know* if you will suffer additional noise, this depends on many factors and requires a much deeper understanding of the compression algorithms than I have. I can imagine it *may* be a problem in certain circumstances, and I do know that you won't gain anything. Ars Technica just had a nice article about mp3 that explains how the sound is analyzed, and from this it appears possible that you may loose quality even if going from mp3 at 44.1kHz to mp3 at 48kHz.


That's weird to my primitive understanding. So if I trying to transcode to .aif an .mp3 and 48kHz, I should only encode at 24kHz? Dang!

No, when you use a eg. 44.1kHz sampling frequency (standard on CD's) it means that the highest frequency that can be encoded is 22.05kHz. Any ultra sounds are excluded. This also explains why you won't get anything using a higher sampling frequency than the source. If you transcode from say mp3 to aac, use the same sampling frequency for both.

Sometimes it is necessary to change sampling frequency because you mix sources of different sampling frequency. In theory, you should choose the highest sampling frequency of the different sources in order not to loose anything.

However, since these high frequency sounds are not detectable by the human ear, it hardly matters much. Rather, you should look at your chosen target format and see if common standards impose any restrictions on your final encoding.

Whenever converting from lossy to lossy, you loose quality, so you've got to think about how to reduce the number of conversions and mix in the highest quality then down convert as necessary, not the other way around.

Erik Norgaard
October 5th, 2007, 05:31 AM
No. Don't save to a lower format.

The 48 is a container, and can hold up to 24khz in it.

I'd need to brush up on my physics to give a better explanation. Can't remember right now.

Simple: a 24kHz sound has 24.000 oscilations per second, if you look at the sinus curve, there are 24.000 ups and 24.000 downs. To represent all of them you need 48.000 numbers minimum per second, which can exactly indicate the max amplitude of the wave in each up or down.

Of course, this will be very squared, lower frequencies are better represented. But this is OK since 24kHz is way beyond recognizable by the human ear. The higher the sampling frequency, the less "squared" the curve is in the audible spectrum.

The sample frequency just means how many chunks you split a second into. So, for 24kHz, you need 48k chunks per second, or 48kHz sampling frequency.

Cheers, Erik

Jim Andrada
October 5th, 2007, 12:41 PM
I always also thought that frequencies above 20kHz were imperceptible, but lately there seems to be some thought that the higher frquencies are in fact perceived although not "heard" in the normal sense of the word.

Isn't DVD sample rate 96kHz? If there's no effect perceptible to humans, why would they use the higher sampling frequency?

Not being snippy, just curious.

Erik Norgaard
October 5th, 2007, 01:22 PM
I always also thought that frequencies above 20kHz were imperceptible, but lately there seems to be some thought that the higher frquencies are in fact perceived although not "heard" in the normal sense of the word.

Isn't DVD sample rate 96kHz? If there's no effect perceptible to humans, why would they use the higher sampling frequency?

Not being snippy, just curious.

It is possible that audio-dvd (not to confuse with video dvd) have a higher sampling rate, and I think that the production stage is done at a higher sampling frequency.

But think of this: At 48kHz, one oscillation at 24kHz is represented by two numbers giving a very square wave. At 12kHz you get 4 numbers, but still a very square wave. At 6kHz you have 8. It starts to get detail but now you get into the sensible area.

If you start at 96kHz you get a much smoother wave form at 6kHz, you will have 16 numbers for one oscillation. So, the higher sampling frequency doesn't add more in terms of audible frequencies, but does give a truer representation of the sound.

I guess that is why audiophiles claim to be able to hear the difference between analog and digital recordings.

Cheers, Erik

Jim Andrada
October 5th, 2007, 01:29 PM
I think you're on to something there because my classical pianist wife always complains about the "coldness" of digital recordings. I notice it too. Could well be due to the "squaring of the higher frquencies.

So we got a CD player with a vacuum tube final stage - sounds better to both of us.

Daniel Ross
October 5th, 2007, 04:23 PM
Thanks, Erik. Now it's less vague. That's generally what I thought, but it was very unclear.

Dylan Pank
October 8th, 2007, 08:04 AM
Forget FFmpegX - it's great for making mpeg4 files and not bad for progressive scan DVDs or VCDs, but it's not a serious audio tool (and was never intended to be).

You want Audacity: http://audacity.sourceforge.net/. It's free, despite being a brilliant audio editor! (the 1.2.6 version is stable and a little easier to use and has the features you need.)

It can import .ogg files and output them as 48khz .aiff files which is what FCP wants. There are loads of settings that allow you to optimise the resampling from 24khz or 44.1Khz up to 48Khz, but if you leave it on the defaults it will do a pretty good job. There are extensive help files, online documentation (http://audacity.sourceforge.net/help/) and a forum (http://audacityteam.org/forum/), but basically it will quite easily do what you want.

Elmer Lang
October 8th, 2007, 10:48 AM
Another interesting thread and thanks to all for the tips and explanations!