53

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.)

14
  • 3
    If you are really curious as to why this doesn't help, read about Sampling Theorem. en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem
    – kmort
    May 10, 2013 at 11:57
  • 8
    @kmort The Nyquist theorem has absolutely nothing to do with that. I dare say most MP3 files are sampled at 44.1 kHz anyway. The real issue is whatever lossy scheme is applied at the encoding stage (psychoacoustic filters etc.)
    – slhck
    May 10, 2013 at 14:25
  • 11
    I don't think he expects it to be of higher quality than the input source, but wants to know if, say, transcoding a 128kbs AAC to a 192kbs or 256kbs MP3 will sound better than if he transcodes it to a 128kbs MP3. I've wondered the same thing since I have a bunch of AAC files that I sometimes convert to MP3 since the car player only understands MP3.
    – Johnny
    May 10, 2013 at 18:15
  • 2
    @Johnny - exactly: I use Format Factory which allows changing the bitrate, so I wandered what was to be done
    – user162573
    May 10, 2013 at 18:24
  • 3
    Right; it's not a question of improving quality, but of minimizing the damage from doing another format shift. In that respect, yes, a higher bitrate target format makes perfect sense. Lots of kneejerk answers to this question. May 10, 2013 at 18:31

15 Answers 15

91

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.

12
  • 31
    @Luke Put differently, converting a 96kb/s flash-audio format directly to a 96kb/s MP3 may cause additional data-loss. Bitrates are not directly comparable. A 96kb/s MP3 file may destroy data present in the flash-audio version. Given how tiny the file will be anyway, converting the 96kb/s file to, say, a 192kb/s MP3 is perfectly sensible. This will obviously not improve the quality, but it will avoid further degrading it.
    – dbr
    May 10, 2013 at 13:50
  • 2
    @dbr that makes more sense May 10, 2013 at 14:07
  • 8
    This is by far the best answer. Another case of StackOverflow's bias in favor of answers that say never to do something that's usually a bad idea, against answers that recognize the corner case. May 10, 2013 at 15:32
  • 1
    This answer gets the question right. It should be way up there.
    – Adi
    May 10, 2013 at 19:38
  • 2
    Yes -- but never change the sampling frequency, unless you've got pro audio-engineering setup & are doing something like mastering 96kHz down to 44.1 for CD.
    – Thomas W
    May 11, 2013 at 7:50
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.

8
  • 10
    In most cases the result will be of lower quality, because the second lossy encoder is going to try encoding the resulting noise from the output of the first encoder.
    – afrazier
    May 10, 2013 at 13:06
  • 14
    this reminds of the another hopeless technology...digital zoom... May 10, 2013 at 13:19
  • 12
    I upvoted this, but I think you got the question wrong. Assume that I have a portable device that only supports the mp3 format, and I have all my music as 96kbps wma files. Does it make sense to use a higher bitrate when converting to mp3? I would say it does.
    – yms
    May 10, 2013 at 14:19
  • 4
    I would say it makes more sense to re-rip your CDs or acquire MP3s rather than re-encode from any low-bitrate media.
    – afrazier
    May 10, 2013 at 15:15
  • 10
    This isn't really a useful answer to the OP's question. Sure, re-encoding at a higher bit-rate using another lossy algorithm is not going to improve the quality, but as the other answer below rightly says, if you have to use e.g. mp3 and you have AAC, you probably want to use a high bit rate to avoid as much loss as possible.
    – al45tair
    May 10, 2013 at 18:29
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.

2
  • 1
    And with that the encoder is going to "stretch" the content to try and fit the new bigger box. Resulting in even worse quality.
    – Frank B
    May 10, 2013 at 15:26
  • @FrankB ah... no. The worst case scenario with a too-high bit rate is creating a larger-than necessary file: it won't make the sound worse (compared to encoding to a lower bit rate).
    – evilsoup
    May 12, 2013 at 16:40
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.

16
  • ^ great answer, Atle.
    – rthbound
    May 10, 2013 at 17:30
  • is it difficult to do that? i mean: is it possible to give more advice on how to do that? (indicate 'further reading' maybe)
    – user162573
    May 10, 2013 at 17:45
  • Bitrate and sample rate are orthogonal, though. Also, most DACs already do perform a low-pass filter on the output so as to smooth the digital stairsteps out.
    – fluffy
    May 10, 2013 at 18:26
  • Indeed, many DACs actually run at many times the sample rate and at a much lower bit depth than you might imagine, relying on low-pass filtering to obtain the original waveform. That's what oversampling means (and that's why you might see e.g. "1-bit DAC" emblazoned on your stereo, if you have the kind of stereo where such things are advertised).
    – al45tair
    May 10, 2013 at 18:32
  • However, upsampling is not relevant here, since we're talking about lossy perceptual codecs.
    – al45tair
    May 10, 2013 at 18:32
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.

0
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.

2
  • i guess the question is too general. as far as i understand, the main point here is related to what is the format of the input and output file. maybe i should create a simpler question. but as a general rule, wouldn't it be better just to extract the audio as suggested in an other answer? that is, 'convert' video to audio but without touching the sound
    – user162573
    May 10, 2013 at 19:25
  • Well, yes. You should avoid recoding wherever you can; any manipulation can only keep the original quality (at best), and it usually makes things worse. Entropy can only increase, after all :-)
    – LSerni
    May 10, 2013 at 20:41
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.

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)

3
  • as mp4 and flv contain AAC, the solution is then to just extract the audio
    – user162573
    May 10, 2013 at 22:21
  • would you take a look at this question (superuser.com/q/595777/162573)?
    – user162573
    May 15, 2013 at 10:01
  • 1
    I agree with the first answer. It's nicely presented. AAC is the best format today.
    – Niels B.
    May 15, 2013 at 11:49
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

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.

5
  • "extract the audio stream without conversion, any conversion implies quality loss" - well, then if the input is flv, the output shouldn't be mp3, but m4a (container for aac)
    – user162573
    Dec 31, 2014 at 0:34
  • 1
    @cipricus "just change the input file name and the output extension to the desired/correct one (i.e. AAC to .m4a)." Also you can see the notes for options to identify the audio format. I used flv<->mp3 in the example command because I'm used to youtube 240p flvs which come with mp3 audio.
    – Dan
    Dec 31, 2014 at 6:36
  • I appreciate your answer, I am always looking for commands that would just extract instead of converting the audio, and I will use your commands. Take a look at what I had posted in my own answer. As I use Xfce, this is my favourite solution for integrating commands with Thunar, yours may also be adapted to this.
    – user162573
    Dec 31, 2014 at 8:50
  • is this just for windows?
    – user162573
    Dec 31, 2014 at 12:14
  • @cipricus the basic command should work on any platform that works with ffmpeg, the bat instructions are only for windows. I don't know about other platforms, but it should be possible to do something similar.
    – Dan
    Jan 2, 2015 at 7:09
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.

-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.

-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.

1
  • 1
    Can you prvided links to these or a summary of the solution? May 31, 2013 at 16:03

You must log in to answer this question.