Pergunta

I have installed sox with support for both mp3 and flac.

The below command also successfully converts flac to mp3

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

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

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

I can convert 128 bit mp3 to 320 bit mp3 using LAME. But the quality is already lost in 128 bit mp3 file generated above. Hence I want it done in single step.

Thanks

Foi útil?

Solução

You are looking for the -C option to SoX:

sox input.flac -C 320 output.mp3

Outras dicas

Just to add, 128kbps is the standard sox mp3 conversion. Also, if you're encoding from a lower bit rate, it will stay at the lower bit rate unless you explicitly specify a higher rate.

For instance, say File 1 is 320 kbps, sox will convert to 128 kbps

sox file1.mp3 file2.mp3

In this instance, say File 1 is 64kbps, sox will process the conversion, but at the same bit rate:

sox file1.mp3 file2.mp3

In which case, if you need to increase the bit rate, you need to explicitly set the bit rate, as follows:

sox file1.mp3 -C 320 file2.mp3
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top