52

When a certain file (mp4, flv, etc) has a 95 kbps audio bitrate - does it make sense outputing to a higher bitrate when converting to mp3 or other format (be it lossy or not)?

Would this result in higher audio quality or just in a bigger file?


Edits after a lot of answers+comments:

  • I am not talking about the output having better quality than the input: obviously, that is not possible. (Except for going from a lossless format to the original wave.) I am talking whether an output with a higher bitrate than the input will have a better quality than it might otherwise have.

  • please consider that I am aware that converting between lossy formats is not recommendable. Only that in some cases an original cd/wave may be unavailable. The question is just about the usefulness of optionally increasing the bitrate when converting.

  • maybe a sub-question is useful: is the answer dependent on the type of the output file (lossless or lossy)?

  • the most voted two answers below (this and this) seem to say different things, namely, the later says that Bitrates are not directly comparable and if the original audio is in a more efficient format, then the output (less efficient) audio should have a somewhat superior bitrate (the same idea here and here) - but while the less efficient is mp3, I am not sure which exactly are the more efficient formats. (is it aac?) (-- And in general the answers seem to fall in one of the two positions represented by the most voted answers.)

15 Answers15

90

Yes, it might actually make sense if you are being forced to change formats.

If you have a file with 95kbps in a highly efficient format, to retain the same quality, a relatively inefficient format as mp3 needs a higher bitrate.

Of course you will never get anything back that was lost in the first place. On the contrary, encoding as mp3 will reduce the quality further. Every lossy format uses other means to reduce the amount of data that is stored, by (simplified) throwing away "unneeded" parts of the data. Round trip through a bunch of different formats and there won't be much left ...

So if you want to stay as close a possible to the quality your file has now, you should chose a higher bitrate. 320kbps are probably wasted space, but for mp3 something in the order between 128 and 192 is needed to maintain - or at least come close to - the quality of a more efficient 95kbps file.

Mark Sowul
  • 3,088
linac
  • 773
49

In the general case this will not usually result in higher quality audio. The basic reason being that you cannot manufacture sounds that aren't there in the original file.

In the best case the only result will be, as you suggest, larger files.

In the worst case the files could even be of worse quality as the second lossy encoder is tying to encode the output from a previous lossy encoder. You will be encoding noise as well as real data.

There might be benefits in recoding at higher bitrate if you have a lossless source and are converting to a lossy output. This would minimize any degradation in the lossy output.

If you can it's far better to back to the original source and re-encode it at the higher bitrate you require.

ChrisF
  • 41,540
7

By increasing the bitrate you won't have an higher sound quality.

Think about it this way: when it was converted from the original media (let's say a CD) it was compressed to fit the "content" in a smaller "box", and by doing so an amount of data has been lost (you may want to read about lossy and lossless formats). If you subsequently increase the bitrate, you are just making the "box" bigger, but the "content" is always the same.

Sekhemty
  • 9,916
6

First it's correct that you don't get more information from up sampling. But combining up sampling with a low pass (or interpolation) filter will get you a smoother curve. Passing this to the stereo should result in less noise produced from the stereo trying to reproduce the noise given by the original low sampling rate.

The important factor here is that you know something your stereo doesn't. Your stereo does not know noise from signal. It thinks that what you feed it is what you want. But you know the difference. You know you don't want the shape of the original signal, but a smoother version. So you can up sample and make a smooth curve, before feeding it to your stereo.

So this is not a case of adding more information, but reducing noise coming from low sample rate.

Atle
  • 161
4

You can't "improve" the signal by re-encoding the output into another lossy format (mp3 etc.). It will always be worse than the original.

If you must re-encode it, the best result you can achieve is the same quality by choosing a losless codec like FLAC or ALAC. Or even uncompressed formats like WAV.

If there's no other source for your file you should keep the version you have.

trurl
  • 2,202
4

When a certain file (mp4, flv, etc) has a 95 kbps audio bitrate - does it make sense outputing to a higher bitrate when converting to mp3 or other format (be it lossy or not)?

It may make sense, since we're talking bits per second in different formats and not sampling frequency.

As an extreme case, suppose you have an uncompressed raw file with 16 bits per sample, stereo, at the sampling rate of 22 kHz. That amounts to 700 kbps. You encode it to MP3, high quality, 22 kHz, and get around, say, 64 kbps.

Suppose now we're doing the reverse, and want to encode a 64 kbps MP3 stream as RAW. Does it make sense to raise the data rate? You bet it does. If you did not - actually if you did not raise the data rate enough, and only went up to 350 kbps - the RAW format would allow for only half the sampling frequency. Or maybe only 8 bit per sample. Or maybe mono instead of stereo.

Why is that? It is because the compression of the two formats is wildly different.

Compression * Data Rate = (useful) information.

So if you were transcoding from a format to another with 10% less compression, you should proportionally increase the data rate.

Actually a bit more than proportionally, because the second encoder, when cascaded with the first decoder, will always introduce an additional quality loss (unless you're using two lossless formats) that has to be compensated (even if you can't compensate all of it).

When the transcoding goes towards a higher compression for the same quality, then increasing the data rate does not make sense (actually it might well be that you're transcoding because the target format allows a better compression, and therefore the same quality with lower data rate).

My golden rule, however, is that information can only be destroyed - so transcode as little as possible, and always try to get as "near" as possible to the original source (in terms of transcoding "hops"). This will also achieve better compression and/or lower data rates, since you're not carrying aboard the noise and artifacts that the encoding process is heir to.

LSerni
  • 8,620
2

This is a complementary answer made to record what I consider to be the meaning of the other answers so far. There are different ideas floating here, maybe because my question was too general or vague. I have edited it to clarify, but the bad is done.

  • When a video file is the input, check (like this or this) what kind of audio it contains (for the purpose of what is said below, 'audio file' will also mean the audio from a video input)

  • Increasing the bitrate of an audio file will not create a file with a better quality than the original

  • Transcoding audio is not recommendable in general, and should be avoided, especially transcoding between lossy formats.

  • When the input is a video, the best way would be just to extract the audio file (for example, as specified here, for Linux, or with a program like the one mentioned here, for Windows, called SUPER. (After installing and taking care to avoid a bunch of adware that is proposed: Select the Output Process called "DeMux Extract Streams", after checking the second case in the upper corner of the window. Drag & Drop the file(s) you want to process. Click on "DeMux (Active Files)"). - Usually videos that may be the object of a such operation contain mp3 or aac audio.

  • If you are being forced to change formats, and convert between lossy formats, this most probably happens because you need mp3 files; also, there are cases where the audio of the input video is not an mp3. So, for a video, if it's not mp3, it will be in most cases an aac file. In this situation the bitrate of the mp3 output should be higher (in order to compensate the more inefficient bitrate of the mp3): for a 95kbps aac, the resulting mp3 should have a bitrate of about 128-192 kbps, etc.

1

There are some excellent technical descriptions of why this is a bad idea in this thread; to offer a different perspective, imagine that every time you make a lossy-compressed audio file (MP3, OGG, AAC), it's like dubbing a cassette tape. Even if you buy the most robust, highest-quality tape you can buy, every time you dub it, all that does is minimize the damage - it's still going to get a little more distorted. When it gets copied, you're always losing a little bit of quality you can never get back. It will never, ever, get "better".

1

It doesn't make sense to re-encode audio to a higher bitrate, but the bitrate might have to be somewhat higher if you want to reduce a further degradation in quality.

You should avoid transcoding audio whenever possible.

If you need to change the video format, you may be able to keep the audio in the same encoding.

For instance if you use the ffmpeg command line tool, you can give it the argument -acodec copy to instruct it to just copy audio data from one container to another without decoding and re-encoding it.

That would be the way to go if, for instance, you're just doing something with the video, like burning in hard subtitles or changing resolution or whatever.

Kaz
  • 2,800
  • 1
  • 20
  • 24
1

Regarding the most efficient audio format

Overall, I would probably pick AAC, because it is widely supported, supports a wide range of bitrates and usually beats competitors at any bitrate. Furthermore, AAC has a low bitrate mode called HE-AAC which employs some sophisticated algorithms to reproduce high frequencies and stereo in a very bandwidth-preserving way.

Because of that, HE-AAC allows you to go as low as 32 kbps for music and 16 kbps for speech, while maintaining an acceptable listening experience. The European Broadcast Union has released a review of the different codecs: http://tech.ebu.ch/docs/tech/tech3324.pdf

It can be concluded that, at the moment, the MPEG HE-AAC seems to be the most favourable choice for a broadcaster requiring a good scalability of bitrate versus quality, down to relatively low bit rates. In addition, the AAC-based codec family offers excellent audio quality at higher bitrates, e.g. at 320 kbit/s (with the exception of "applause"). Our study shows that excellent quality (on average) can be achieved even at half the bitrate, i.e. 160 kbit/s, or even less, for all test items except for the most critical items.

If compatibility is not a concern for you, consider looking into Opus. It's a new open format that supposedly performs very well. http://en.wikipedia.org/wiki/Opus_(audio_format)

Niels B.
  • 139
1

This is like entropy, all the time that you "convert" something, you will lose quality, the ideal is Demuxing, is taking the audio directly from the video source without any conversion, your question looks like videos downloaded from Youtube or similar sites, you can use Gspot, MediaInfo or FFprobe to know the best quality of the audio in the different available formats, for example the mp4 formats of Youtube are:

Resolution  Audio Bit Rate  Compression
1080p       192   kbps      AAC
720p        192   kbps      AAC
480p        128   kbps      AAC
360p        128   kbps      AAC
240p        64    kbps      MP3

so you can pick the 720p format and demuxing the AAC without conversion with FFMPEG

ffmpeg -i input.mp4 -vn -acodec copy output.aac

The '-acodec copy' tells ffmpeg to copy the audio stream without converting '-vn' drop the video (if the final file allows video, .acc doesn't)

There are comparative tables to convert to a similar quality format, MP3 have many kind of libraries and configurations as OGG and ACC so it's depends, I was musician before and usually the highest sounds above 16 kHz are the key to recognize the quality, cymbals trumpets, high voices or instruments generally with many harmonics, I did many test before and with a normal lame MP3 of 192 kbps is enough, actually I can't difference between 192 and 224 kbps as many people, 192 kbps to 160 kbps is quite difficult is only for give you some ideas or perceptions, ACC usually is better quality than MP3, ACC 192 probably is more like MP3 256 kbps.

ACC or OGG 95 is around MP3 128-160 the same if you have a MP3 VBR (Variable Bit Rate) depending about the type of music or sounds some decoders will give you a random average.

Choose the best quality of video as you can, Demuxing the audio in the original format, convert if you need to the similar quality of the new format.

a 192 kbps no VBR MP3 is perfect and fully compatible with USB players and phones IMHO

0

I use Sony Audio Studio Sound Forge 10 Program. Available for purchase on Sony Website. You can increase bitrate by transposing original song back onto original song, by drag and click. You Tube shows how to use the Audio Studio. After You can hear instruments barely audible otherwise. I-tunes shows bitrate in Music Library. I have songs with 1411 bitrate. Cannot lower bitrate only raise this way.

0

Don't convert if you don't need to

You can just extract the audio stream without conversion, any conversion implies quality loss*.

One way to extract the audio is with with ffmpeg:

ffmpeg -i "input.flv" -vn -acodec copy "output.mp3"

The same command could be used for almost any format/video, just change the input file name and the output extension to the desired/correct one (i.e. AAC to .m4a).

Bat file

Sometimes for some of us it feels complicated to use command line, if you do this often, you can simply create a .bat file then drag the video file to the bat file with this contents:

ffmpeg -i "%1" -vn -acodec copy "%~dpn1.mp3" pause

You only need to change the extension if you will be extracting other audio format.

Notes

If you need to identify the audio format, any decent video player should be enough, or you can use:

*I'm talking about lossy conversions, lossless conversions done right can retain quality, but it is rare to use them when extracting lossy audio.

Dan
  • 201
-1

First. If you really want to know how MP3 works, check this article about the theory of MP3 by Rassol Raissi

The article dates from 2002, may look outdated, but the author clearly explains the difference between sampling frequency and bit rate. Those are two totally different concepts.

Second. MP3 is a protocol. It's not an algorithm. Every implementation of that protocol - every algorithm, so every computer program- may differ.

Thirdly. There is information theory (and common sense). If you have a sample of 128 Kbit that represents 1 sec of sound, and you make it 192 Kbit, you add 64 Kbit. You're file is bigger. But what do those 64K of added zeros and ones represent? Really nothing. You can't add what you don't have. Although MP3 is tightly based on human acoustical (mis)perception to do the job, there's no magic.

Frank
  • 99
-1

For a detailed and knowledable exposition on this matter, please see four articles in The Absolute Sound from December 2011 through March 2012. It is easy to hear the benefits of upsampling after converting CDs to WAV.