Hi,
Can someone please comment about the below issue
[root@host0040 kaushal]# file obd-demo.mp3 obd-demo.mp3: MPEG ADTS, layer III, v1, 256 kBits, 44.1 kHz, Monaural [root@host0040 kaushal]# sox obd-demo.mp3 -e stat sox: Failed reading obd-demo.mp3: Do not understand format type: mp3
[root@host0040 kaushal]# sox -V obd-demo.mp3 -r 8000 -c 1 -t ul -w vm-intro.ulaw sox: Failed reading obd-demo.mp3: Do not understand format type: mp3
[root@host0040 kaushal]# sox -v 0.125 -V <obd-demo.mp3> -t au -r 8000 -U -b -c 1 <obd-demo.ulaw> resample -ql -bash: obd-demo.ulaw: No such file or directory [root@host0040 kaushal]# sox -V obd-demo.mp3 -t au -r 8000 -U -b -c 1 obd-demo.ulaw resample -ql sox: Failed reading obd-demo.mp3: Do not understand foReply rmat type: mp3
[root@host0040 kaushal]#
When i invoke the same obd-demo.mp3 it works perfectly fine
host0040*CLI> channel originate DAHDI/g0/xxxxxxxxxx Application MP3Player /home/kaushal/obd-demo.mp3 [Sep 9 16:44:56] DEBUG[12691]: sig_pri.c:985 sig_pri_request: sig_pri_request 1 [Sep 9 16:44:56] DEBUG[12691]: sig_pri.c:6427 sig_pri_call: CALLER NAME: NUM: -- Requested transfer capability: 0x00 - SPEECH -- Launching MP3Player(/home/kaushal/obd-demo.mp3) on DAHDI/i1/9833754756-1
[root@host0040 ~]# rpm -qa | grep sox sox-12.18.1-1.el5_5.1 [root@host0040 ~]# rpm -qa | grep lame lame-3.98.4-1.el5.rf lame-devel-3.98.4-1.el5.rf [root@host0040 ~]#
MP3 support in SoX is optional and requires access to either or both the external libmad and libmp3lame libraries. To see if there is support for Mp3 run sox -h and look for it under the list of supported file formats as "mp3".
[root@host0040 ~]# sox -h sox: Version 12.18.1
Usage: [ gopts ] [ fopts ] ifile [ fopts ] ofile [ effect [ effopts ] ]
gopts: -e -h -p -q -S -V
fopts: -r rate -c channels -s/-u/-U/-A/-a/-i/-g/-f -b/-w/-l/-d -v volume -x
effect: avg band bandpass bandreject chorus compand copy dcshift deemph earwax echo echos fade filter flanger highp highpass lowp lowpass mask mcompand noiseprof noisered pan phaser pick pitch polyphase rate repeat resample reverb reverse silence speed stat stretch swap synth trim vibro vol
effopts: depends on effect
Supported file formats: aiff al alsa au auto avr cdr cvs dat vms gsm hcom la lu maud nul ossdsp prc raw sb sf sl smp sndt sph 8svx sw txw ub ul uw voc vorbis vox wav wve
Which package contains libmad and libmp3lame libraries available on CentOS 5.6
Regards,
Kaushal
In article CAD7Ssm-+DH=i=NJthFJ9oWi=w2VCrY8SvCkD2xg=SjUghfNgAA@mail.gmail.com, Kaushal Shriyan kaushalshriyan@gmail.com wrote:
Hi,
Can someone please comment about the below issue
[root@host0040 kaushal]# file obd-demo.mp3 obd-demo.mp3: MPEG ADTS, layer III, v1, 256 kBits, 44.1 kHz, Monaural [root@host0040 kaushal]# sox obd-demo.mp3 -e stat sox: Failed reading obd-demo.mp3: Do not understand format type: mp3
[root@host0040 kaushal]# sox -V obd-demo.mp3 -r 8000 -c 1 -t ul -w vm-intro.ulaw sox: Failed reading obd-demo.mp3: Do not understand format type: mp3
[root@host0040 kaushal]# sox -v 0.125 -V <obd-demo.mp3> -t au -r 8000 -U -b -c 1 <obd-demo.ulaw> resample -ql -bash: obd-demo.ulaw: No such file or directory [root@host0040 kaushal]# sox -V obd-demo.mp3 -t au -r 8000 -U -b -c 1 obd-demo.ulaw resample -ql sox: Failed reading obd-demo.mp3: Do not understand foReply rmat type: mp3
Yes, the standard sox in CentOS/RHEL is compiled without mp3 support.
When i invoke the same obd-demo.mp3 it works perfectly fine
host0040*CLI> channel originate DAHDI/g0/xxxxxxxxxx Application MP3Player /home/kaushal/obd-demo.mp3 [Sep 9 16:44:56] DEBUG[12691]: sig_pri.c:985 sig_pri_request: sig_pri_request 1 [Sep 9 16:44:56] DEBUG[12691]: sig_pri.c:6427 sig_pri_call: CALLER NAME: NUM: -- Requested transfer capability: 0x00 - SPEECH -- Launching MP3Player(/home/kaushal/obd-demo.mp3) on DAHDI/i1/9833754756-1
Asterisk is nothing to do with your problem.
[root@host0040 ~]# rpm -qa | grep sox sox-12.18.1-1.el5_5.1 [root@host0040 ~]# rpm -qa | grep lame lame-3.98.4-1.el5.rf lame-devel-3.98.4-1.el5.rf [root@host0040 ~]#
Having lame and lame-devel is good; you will also need libmad and libmad-devel. But the standard sox doesn't look for them.
MP3 support in SoX is optional and requires access to either or both the external libmad and libmp3lame libraries. To see if there is support for Mp3 run sox -h and look for it under the list of supported file formats as "mp3".
[root@host0040 ~]# sox -h sox: Version 12.18.1
Usage: [ gopts ] [ fopts ] ifile [ fopts ] ofile [ effect [ effopts ] ]
gopts: -e -h -p -q -S -V
fopts: -r rate -c channels -s/-u/-U/-A/-a/-i/-g/-f -b/-w/-l/-d -v volume -x
effect: avg band bandpass bandreject chorus compand copy dcshift deemph earwax echo echos fade filter flanger highp highpass lowp lowpass mask mcompand noiseprof noisered pan phaser pick pitch polyphase rate repeat resample reverb reverse silence speed stat stretch swap synth trim vibro vol
effopts: depends on effect
Supported file formats: aiff al alsa au auto avr cdr cvs dat vms gsm hcom la lu maud nul ossdsp prc raw sb sf sl smp sndt sph 8svx sw txw ub ul uw voc vorbis vox wav wve
Which package contains libmad and libmp3lame libraries available on CentOS 5.6
You will need to get libmad and libmad-devel from rpmforge, like you did lame and lame-devel. There might even be a sox package on there that was compiled with mp3 support. If not, you will need to obtain the SRPM for sox and recompile it with mp3 support on your system. That will probably involve editing the spec file to enable mp3.
Cheers Tony
I've packaged this on Centos 5.6 if anyone wants a copy :)
[root@karsites ~]# sox --help sox: invalid option -- - sox: Version 12.18.1
Usage: [ gopts ] [ fopts ] ifile [ fopts ] ofile [ effect [ effopts ] ]
gopts: -e -h -p -q -S -V
fopts: -r rate -c channels -s/-u/-U/-A/-a/-i/-g/-f -b/-w/-l/-d -v volume -x
effect: avg band bandpass bandreject chorus compand copy dcshift deemph earwax echo echos fade filter flanger highp highpass lowp lowpass mask mcompand noiseprof noisered pan phaser pick pitch polyphase rate repeat resample reverb reverse silence speed stat stretch swap synth trim vibro vol
effopts: depends on effect
Supported file formats: aiff al alsa au auto avr cdr cvs dat vms gsm hcom la lu maud mp3 nul ossdsp prc raw sb sf sl smp sndt sph 8svx sw txw ub ul uw voc vorbis vox wav wve
and told yum to stop updating it, by adding this:
# do not update these packages exclude=sox
to /etc/yum.conf
----------------------------------------------------------------- You will need to use the exact download links, as dir listing is turned off, and all you will get otherwise is an error message, or the homepage.
This is for Centos 5.6 32 bit.
http://www.karsites.net/centos/downloads/5.6/FILENAME
Where FILENAME is one of:
sox-reinstall-notes sox-rebuild.txt sox-12.18.1-1.src.rpm sox-12.18.1-1.i386.rpm karsites-GPG-public-key-2011-03-18.asc
I've just resigned the i386.rpm with my public key. The source rpm has the original vendors GPG key.
Kind Regards,
Keith
----------------------------------------------------------------- Websites: http://www.karsites.net http://www.php-debuggers.net http://www.raised-from-the-dead.org.uk
All email addresses are challenge-response protected with TMDA [http://tmda.net] -----------------------------------------------------------------