tags:

views:

1130

answers:

3

When I run sox directly from the command line as ;

sox -r 8000 -c 1 <wavfilename> <mp3filename>

I get the following error message:

sox: Unknown output file format for '747a.mp3': File type 'mp3' is not known

My machine is running the CentOS operating system.

+2  A: 

You'll need to install an appropriate MP3 encoder, e.g. LAME, or recompile Sox with liblame support.

This is independent of your Perl programming :)

Jeremy Smyth
+1  A: 

For CentOS you will need to recompile SOX (the base repo has the sox srpm) with the libmad and lame-devel libraries installed (rpmforge has those.) Once that is done, sox -h will list supported formats. When mp3 libraries are installed,

sox -t wav -r 8000 -c 1 -t mp3

spkthed
Hints for enabling RpmForge (to install libmad-devel and lame-devel): http://wiki.centos.org/AdditionalResources/Repositories/RPMForgeYou'll also need alsa-lib-devel and libvorbis-develAnd some info about SRPM: http://wiki.centos.org/HowTos/RebuildSRPM
Sasha Yanovets
A: 

More info here -

http://techblog.netwater.com/?p=4