Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use sox to compress mp3?

I'd like to reduce the file size of some mp3 audios with sox. I think I can reduce stereo to only 1 channel (i.e. mono), reduce the sample rate and reduce the bit-depth. I find it seems sox can do none of that. Is this true or did I have done it correctly?

$ sox -r 8000 -c 1 2008-12-28-2.MP3 foo.mp3
sox WARN formats: can't set sample rate 8000; using 44100
sox WARN formats: can't set 1 channels; using 2
like image 817
RNA Avatar asked Mar 16 '12 15:03

RNA


1 Answers

The arguments should go before the output file:

sox 2008-12-28-2.MP3 -r 8000 -c 1 foo.mp3

They can also be supplied as effects:

sox 2008-12-28-2.MP3 foo.mp3 remix 1 rate 8000
like image 65
Thor Avatar answered Oct 05 '22 17:10

Thor