Does it make sense converting a file to a higher audio bitrate?

46,501

Solution 1

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.

Solution 2

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.

Solution 3

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.

Solution 4

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.

Solution 5

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.

Share:
46,501

Related videos on Youtube

Community
Author by

Community

Updated on September 18, 2022

Comments

  • Community
    Community over 1 year

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

    • kmort
      kmort about 11 years
      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_theor‌​em
    • Andrey
      Andrey about 11 years
      I could imagine an algorithm that can upsample, and then smooth out the sound. I don't know if this is at all possible in practice
    • slhck
      slhck about 11 years
      @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.)
    • Admin
      Admin about 11 years
      @Johnny - exactly: I use Format Factory which allows changing the bitrate, so I wandered what was to be done
    • Ask About Monica
      Ask About Monica about 11 years
      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.
    • slhck
      slhck about 11 years
      @kbelder You can't accuse people of providing kneejerk answers when the question was a little vague on that part to begin with. Of course, now that it's clarified, one could improve the existing answers.
    • Admin
      Admin about 11 years
      @NielsB. - all these basics are well known to me -- but please see latest edits. there is also another position here represented by the second most voted answer and also others like here and here
    • Niels B.
      Niels B. about 11 years
      @capricus, yes. The second answer is about the compression efficiency of the various formats. MP3 performs poorly compared to modern formats like HE-AAC. Basically, if you have a song encoded in HE-AAC, it might have a bitrate of 64 kbps (about 1 megabyte for normal song) and still sound acceptable. If you want to encode this file to MP3, you will suffer a massacre in sound quality, if you insist that your MP3 encoder must only consume 64 kbits of data pr. second of audio.
    • LilCodger
      LilCodger about 11 years
      They're both correct. By upping the bitrate, at best you get bigger files of the same quality. "Higher audio quality" can be interpreted as "higher than the original" or "higher than the resulting file encoded at the same bitrate". Higher than the original will not happen. Higher than the same thing done at a lower bitrate is true. I frequently try various rates and keep the smallest one that is acceptable to me.
    • Abby Chau Yu Hoi
      Abby Chau Yu Hoi about 11 years
      sorry for late coming.the answer to me is obvious that 1.Yes, it does. 2.Yes, better and bigger. To calculate the new bitrate needed is like decompressing and compress again and if your new format is Lossy then it does not ensure to give the same quality as in your old format no matter how high the bitrate you give.A trival example for concept. old algo is cutting the last x-hz of frequency ; and the new algo by cutting first x-hz of the frequency. for 123456789: => 1234567 and decompress to 123456700, then => 3456700, for better sampling in new algo: 23456700. sorry comment-length restricted.
  • afrazier
    afrazier about 11 years
    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.
  • tumchaaditya
    tumchaaditya about 11 years
    this reminds of the another hopeless technology...digital zoom...
  • Canadian Luke
    Canadian Luke about 11 years
    Dude, what are you talking about?
  • dbr
    dbr about 11 years
    @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.
  • Canadian Luke
    Canadian Luke about 11 years
    @dbr that makes more sense
  • yms
    yms about 11 years
    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.
  • Admin
    Admin about 11 years
    in fact the flv file may be mostly audio, like many on youtube that just display an image with sound. in this case converting to a higher bitrate will give a mp3 bigger than a flv - more here. it may be that the increase in size resulted from this may be negligible compared to what is gained if the mp3 is converted from a real flv video. but also: the decrease in audio quality from converting at the same bitrate will be surely negligible too!
  • afrazier
    afrazier about 11 years
    I would say it makes more sense to re-rip your CDs or acquire MP3s rather than re-encode from any low-bitrate media.
  • Frank B
    Frank B about 11 years
    And with that the encoder is going to "stretch" the content to try and fit the new bigger box. Resulting in even worse quality.
  • Potatoswatter
    Potatoswatter about 11 years
    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.
  • ChrisF
    ChrisF about 11 years
    @Potatoswatter - vote it up and promote it. With the necessary attention it'll get the votes if it deserves it.
  • rthbound
    rthbound about 11 years
    ^ great answer, Atle.
  • Admin
    Admin about 11 years
    is it difficult to do that? i mean: is it possible to give more advice on how to do that? (indicate 'further reading' maybe)
  • Admin
    Admin about 11 years
    so many answers are appearing that i should postpone the definitive a bit more
  • dhasenan
    dhasenan about 11 years
    Some incredibly clever person might be able to write a program that guesses, for instance, what instruments are being used and how, and then use high quality samples to fill in some of the missing data...but I doubt anyone's commercialized such a thing, and that's a lot more than just reencoding.
  • fluffy
    fluffy about 11 years
    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.
  • al45tair
    al45tair about 11 years
    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
    al45tair about 11 years
    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
    al45tair about 11 years
    However, upsampling is not relevant here, since we're talking about lossy perceptual codecs.
  • Atle
    Atle about 11 years
    @cipricus, unfortunately I don't know the best way to do this in practice.
  • Atle
    Atle about 11 years
    @alastair, are you sure? I know that picture encoding benefits in size from removing noise, since noise is seen as information by the compressing algorithm. I can imagine the same applies to music, although I do not really know.
  • Clayton Stanley
    Clayton Stanley about 11 years
    In order for this to work in practice, the audio-conversion technology would have to do the upsampling in multiple steps: [1] decompress and upsample to a very high bit and sample rate, [2] dither the audio (smooth the curve), optimized for a particular end compression algorithm/sample rate, etc., [3] compress the audio to that desired end rate. Not sure if this is available with any current software upsampling technologies; also not sure if all the extra dithering work would actually make a sonic difference when we're talking about sampling from one lossy format to a slightly less lossy form.
  • Clayton Stanley
    Clayton Stanley about 11 years
    And @alastair it turns out that 'lossless' flac is still lossy; everything is lossy compared to hearing something live. So what applies to flac applies just as well to mp3, aac, etc. in theory. does it make a sonic difference? Well, that would have to be tested.
  • Feirell
    Feirell about 11 years
    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
  • Adi
    Adi about 11 years
    This answer gets the question right. It should be way up there.
  • LSerni
    LSerni about 11 years
    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 :-)
  • Admin
    Admin about 11 years
    when you say "efficient format" do you refer to aac? i guess from other comments that aac is indeed the case. this looks like the answer, but more details are needed. for example a few more details like: for a 95kbps AAC, the mp3 should have between 128 and 192 as you said. but when the aac is 192? one or two more examples like that will do
  • Admin
    Admin about 11 years
    Bitrates are not directly comparable. this idea mentioned in a comment by dbr seems decisive here
  • Admin
    Admin about 11 years
    @dbr - would you consider editing this answer to add some more key strokes like "Bitrates are not directly comparable"?
  • Admin
    Admin about 11 years
    indeed, the question is not about getting a higher quality than the input file (this is clearly not possible), but than the same-bitrate-output
  • Admin
    Admin about 11 years
    as mp4 and flv contain AAC, the solution is then to just extract the audio
  • Thomas W
    Thomas W about 11 years
    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.
  • fluffy
    fluffy about 11 years
    @claytonstanley FLAC is lossless - if you convert a .wav to .flac and then convert that .flac back to .wav you get the same audio information out. Lossy CODECs use perceptual modelling to determine which aspects of the signal can be thrown out (noise, extremely high or low frequencies, etc.), but FLAC is lossless (like .png for images) in that it uses algorithms to reconstruct the original signal exactly.
  • Atle
    Atle about 11 years
    @escitalopram Up sampling will not give a smoother curve, but it is necessary if you want to run a filter that gives a smoother curve.
  • Clayton Stanley
    Clayton Stanley about 11 years
    @fluffy wav (and flac) are lossy compared to the 24 bit master, which is lossy compared to hearing the performance live in the studio monitors, which is lossy compared to hearing the music without an amplifier, etc. This is an important point, because it means that whatever techniques apply to flac, also may apply to more lossy audio formats.
  • fluffy
    fluffy about 11 years
    @ClaytonStanley That's nonsense. FLAC in 24-bit will produce the exact same signal as WAV in 24-bit. And what do you mean by "the 24-bit master" that isn't captured in a 24-bit WAV file? And then taking the next step to comparing it with "the original performance" has nothing to do with this discussion.
  • evilsoup
    evilsoup about 11 years
    @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).
  • al45tair
    al45tair about 11 years
    @claytonstanley Also, it sounds as if you’re conflating the encoding rate with the sampling frequency. The two, as fluffy rightly says, are orthogonal (at least, in lossy codecs; they are necessarily related somehow in lossless codecs, albeit quite possibly in a non-obvious manner), and the OP was asking specifically about the encoding rate.
  • Admin
    Admin about 11 years
    would you take a look at this question (superuser.com/q/595777/162573)?
  • Admin
    Admin about 11 years
    would you take a look at this question (superuser.com/q/595777/162573)?
  • Niels B.
    Niels B. about 11 years
    I agree with the first answer. It's nicely presented. AAC is the best format today.
  • James Jenkins
    James Jenkins almost 11 years
    Can you prvided links to these or a summary of the solution?
  • matiaszon
    matiaszon over 9 years
    "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)
  • Dan
    Dan over 9 years
    @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.
  • matiaszon
    matiaszon over 9 years
    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.
  • matiaszon
    matiaszon over 9 years
    is this just for windows?
  • Dan
    Dan over 9 years
    @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.