Kaushal Shriyan
2011-Sep-13 00:12 UTC
[asterisk-users] sox: Failed reading obd-demo.mp3: Do not understand format type: mp3
Hi,
Can someone please comment about the below issue
[root at host0040 kaushal]# file obd-demo.mp3
obd-demo.mp3: MPEG ADTS, layer III, v1, 256 kBits, 44.1 kHz, Monaural
[root at host0040 kaushal]# sox obd-demo.mp3 -e stat
sox: Failed reading obd-demo.mp3: Do not understand format type: mp3
[root at 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 at 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 at 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 at 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 at host0040 ~]# rpm -qa | grep sox
sox-12.18.1-1.el5_5.1
[root at host0040 ~]# rpm -qa | grep lame
lame-3.98.4-1.el5.rf
lame-devel-3.98.4-1.el5.rf
[root at 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 at 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
Sam Govind
2011-Sep-13 04:38 UTC
[asterisk-users] sox: Failed reading obd-demo.mp3: Do not understand format type: mp3
1- *-bash: obd-demo.ulaw: No such file or directory* // try use absolute file path i.e /usr/src/mymp3.mp3 . I guess that's why its saying no such file or directory. 2- http://lists.digium.com/pipermail/asterisk-users/2006-March/144689.html Go through this thread. 3- When everything fails from sox - libraries dependencies issues I use http://www.nch.com.au/switch/index.html this converter. This can help you for some time for free. On Tue, Sep 13, 2011 at 5:12 AM, Kaushal Shriyan <kaushalshriyan at gmail.com>wrote:> Hi, > > Can someone please comment about the below issue > > [root at host0040 kaushal]# file obd-demo.mp3 > obd-demo.mp3: MPEG ADTS, layer III, v1, 256 kBits, 44.1 kHz, Monaural > [root at host0040 kaushal]# sox obd-demo.mp3 -e stat > sox: Failed reading obd-demo.mp3: Do not understand format type: mp3 > > [root at 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 at 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 at 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 at 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 at host0040 ~]# rpm -qa | grep sox > sox-12.18.1-1.el5_5.1 > [root at host0040 ~]# rpm -qa | grep lame > lame-3.98.4-1.el5.rf > lame-devel-3.98.4-1.el5.rf > [root at 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 at 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 > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110913/4c84cab7/attachment.htm>
Eric Wieling
2011-Sep-13 08:48 UTC
[asterisk-users] sox: Failed reading obd-demo.mp3: Do not understand format type: mp3
"sox -h" will list the formats supported by your install of sox. If
mp3 is not listed, then your sox does not support mp3. This is not uncommon.
Many Linux distros do not ship support for patent encumbered formats. Either
stop using mp3 (this is what I suggest) or compile and install sox with mp3
support.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces
at lists.digium.com] On Behalf Of Kaushal Shriyan
Sent: Monday, September 12, 2011 8:12 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] sox: Failed reading obd-demo.mp3: Do not understand
format type: mp3
Hi,
Can someone please comment about the below issue
[root at host0040 kaushal]# file obd-demo.mp3
obd-demo.mp3: MPEG ADTS, layer III, v1, 256 kBits, 44.1 kHz, Monaural
[root at host0040 kaushal]# sox obd-demo.mp3 -e stat
sox: Failed reading obd-demo.mp3: Do not understand format type: mp3
[root at 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 at 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 at 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 at 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 at host0040 ~]# rpm -qa | grep sox
sox-12.18.1-1.el5_5.1
[root at host0040 ~]# rpm -qa | grep lame
lame-3.98.4-1.el5.rf
lame-devel-3.98.4-1.el5.rf
[root at 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 at 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
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Matthew J. Roth
2011-Sep-13 13:17 UTC
[asterisk-users] sox: Failed reading obd-demo.mp3: Do not understand format type: mp3
Kaushal,
Your version of SoX does not have MP3 support. Since you have LAME
installed, use it as a first step to produce an intermediate file
that SoX supports. Then use SoX to convert the intermediate file
to the desired format.
Step 1
------
# lame --decode obd-demo.mp3 obd-demo.wav
input: obd-demo.mp3 (8 kHz, 1 channel, MPEG-2.5 Layer III)
output: obd-demo.wav (16 bit, Microsoft WAVE)
skipping initial 1105 samples (encoder+decoder delay)
Frame# 16818/16818 16 kbps
# file obd-demo.wav
obd-demo.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono
8000 Hz
Step 2
------
# sox -V obd-demo.wav -r 8000 -b -t ul -c 1 obd-demo.ulaw
sox: Detected file format type: wav
sox: WAV Chunk fmt
sox: WAV Chunk data
sox: Reading Wave file: Microsoft PCM format, 1 channel, 8000 samp/sec
sox: 16000 byte/sec, 2 block align, 16 bits/samp, 19372126 data bytes
sox: 9686063 Samps/chans
sox: Input file obd-demo.wav: using sample rate 8000
size shorts, encoding signed (2's complement), 1 channel
sox: Output file obd-demo.ulaw: using sample rate 8000
size bytes, encoding u-law, 1 channel
sox: Output file: comment "Processed by SoX"
Regards,
Matthew Roth
InterMedia Marketing Solutions
Software Engineer and Systems Developer