Sox to convert flac file to 320 bit mp3

I installed sox with support for both mp3 and flac.

This command also successfully converts flac to mp3

sox /song_files/Daughter_of_Evil.flac /song_files/Daughter_of_Evil.mp3 

My problem is that "Daughter_of_Evil.mp3" is not a 320 bit mp3. I tried to specify a sampling rate of 44100. But that did not change the transmission speed. It stays at 128 Kbps.

How can I directly generate a 320-bit mp3 file for the above flac file.

I can convert 128 bit mp3 to 320 bit mp3 using LAME. But the quality is already lost in the 128-bit mp3 file generated above. Therefore, I want this to be done in one step.

thanks

+7
bitrate sox lame
source share
2 answers

You are looking for the -C option for SoX:

 sox input.flac -C 320 output.mp3 
+9
source share

Just to add, 128kbps is the standard mp3 sox conversion. Also, if you encode a lower bit rate, it will remain at a lower bit rate unless you explicitly specify a higher bit rate.

For example, let's say file 1 is 320 kbps, sox converts it to 128 kbps

 sox file1.mp3 file2.mp3 

In this case, let's say the file is 1 - 64 kbps, sox will handle the conversion, but at the same speed:

 sox file1.mp3 file2.mp3 

In this case, if you need to increase the bit rate, you need to explicitly set the bit rate, as shown below:

 sox file1.mp3 -C 320 file2.mp3 
0
source share

All Articles