Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: mp3 to mp3 change bitrate & sample rate? (Read 10638 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

mp3 to mp3 change bitrate & sample rate?

I'd like to convert an 64kB, 22.05kHz, stereo mp3 to a 128kB, 44.1kHz, stereo mp3. Is this possible? I'd like to do it from the command line. Should I use LAME? Any help appreciated...thanks!

mp3 to mp3 change bitrate & sample rate?

Reply #1
Quote
I'd like to convert an 64kB, 22.05kHz, stereo mp3 to a 128kB, 44.1kHz, stereo mp3. Is this possible? I'd like to do it from the command line. Should I use LAME? Any help appreciated...thanks!
[a href="index.php?act=findpost&pid=335507"][{POST_SNAPBACK}][/a]



It is very possible but it will only decrease the quality of the original mp3, you won't gain any quality.  The quality of the 128kbps mp3 will be lower than that of the original 64kbps mp3 yet take up more space.

To my knowledge, there is not a command you can use for Lame.  I recomend downloading dbpoweramp as you can simply convert the mp3 and preserve the tag information.  If not, you can convert the mp3 to wav then use EAC (or whatever program you prefer) with the Lame.exe to convert the wav to mp3.

mp3 to mp3 change bitrate & sample rate?

Reply #2
You can do it but the sound will be the same, or worse.  It can never be improved by resampling.  TINSTAAFL     
Nov schmoz kapop.

mp3 to mp3 change bitrate & sample rate?

Reply #3
I'm not really trying to improve the sound quality; I'd just prefer it not to degrade. The problem is that I have a ShoutCast streaming station setup and it requires all the songs to be of a consistent sampling rate. I've set this rate at 44.1kHz which is fine for all my mp3s except for a handful. Is the 44.1 sample rate inherent to the bitrate? i.e. can I just increase the sample rate and keep the bitrate at 64? Would this even make sense?

mp3 to mp3 change bitrate & sample rate?

Reply #4
Quote
  TINSTAAFL      :cool:


In case anyone was wondering, see Heinlein's "The Moon is A Harsh Mistress".
http://en.wikipedia.org/wiki/Tanstaafl

mp3 to mp3 change bitrate & sample rate?

Reply #5
Quote
I'm not really trying to improve the sound quality; I'd just prefer it not to degrade. The problem is that I have a ShoutCast streaming station setup and it requires all the songs to be of a consistent sampling rate. I've set this rate at 44.1kHz which is fine for all my mp3s except for a handful. Is the 44.1 sample rate inherent to the bitrate? i.e. can I just increase the sample rate and keep the bitrate at 64? Would this even make sense?
[a href="index.php?act=findpost&pid=335517"][{POST_SNAPBACK}][/a]


The only aspect of an MP3 that you can change without re-encoding is volume, and then only by programs that are aware of the global gain setting (such as MP3Gain and MP3DirectCut).  In order to change the sampling rate, you'll need to re-encode it, and going from 64 to 128 is much better than going from 64 to 64 again.

This can be done from the command line, as LAME will recognize incoming MP3 files by their extension (assuming that you're using a compile of LAME that includes an MP3 decoding library - if you downloaded it from RareWares, it does...at least for Windows).  Your command line parameters would be something like this:

-b 128 --resample 44.1

If you have several files, dBpowerAMP would definitely make it easier, and you could use the above parameters with the mp3 Lame CLI plugin.
"Not sure what the question is, but the answer is probably no."

mp3 to mp3 change bitrate & sample rate?

Reply #6
Quote
In order to change the sampling rate, you'll need to re-encode it, and going from 64 to 128 is much better than going from 64 to 64 again.

This can be done from the command line, as LAME will recognize incoming MP3 files by their extension (assuming that you're using a compile of LAME that includes an MP3 decoding library - if you downloaded it from RareWares, it does...at least for Windows).  Your command line parameters would be something like this:

-b 128 --resample 44.1

If you have several files, dBpowerAMP would definitely make it easier, and you could use the above parameters with the mp3 Lame CLI plugin.



I'm doing this in Linux and it's all being performed from the command line. I figured out I'm able to do the following with success:

lame --resample 44.1 foo.mp3

I end up with a file named: foo.mp3.mp3 but that's easy enough to fix. I checked the quality against the original and it sounds OK. I don't really notice any degradation so I guess I'll keep it at that for now. Here's the command line I used to process the whole directory:

for i in *.mp3; lame --resample 44.1 "$i"; done

Thanks for the quick responses everyone! :-)