[asterisk-users] sox: Failed reading obd-demo.mp3: Do not understand format type: mp3

Kaushal Shriyan kaushalshriyan at gmail.com
Tue Sep 13 20:16:11 CDT 2011


On Wed, Sep 14, 2011 at 6:42 AM, Steve Edwards
<asterisk.org at sedwards.com> wrote:
> On Wed, 14 Sep 2011, Kaushal Shriyan wrote:
>
>> Also please let me know the difference between .ulaw and .alaw format and
>> is there a way i can play this file formats.
>
> alaw = Europe, ulaw = US & Japan
>
> Wikipedia has articles on both algorithms if you are interested in the
> specifics.
>
> If you format your file correctly, Asterisk can play it.
>
> --
> Thanks in advance,
> -------------------------------------------------------------------------
> Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
> Newline                                              Fax: +1-760-731-3000
>
> --
> _____________________________________________________________________
> -- 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
>

Hi Steve,

I have carried out the below steps

[root at host0040 test]# lame --decode obd-demo.mp3 obd-demo.wav
input:  obd-demo.mp3  (44.1 kHz, 1 channel, MPEG-1 Layer III)
output: obd-demo.wav  (16 bit, Microsoft WAVE)
skipping initial 1105 samples (encoder+decoder delay)
Frame#   887/886    256 kbps
[root at host0040 test]# sox -V obd-demo.wav -r 8000 -b -t ul -c 1 obd-demo.alaw
sox: Detected file format type: wav

sox: WAV Chunk fmt
sox: WAV Chunk data
sox: Reading Wave file: Microsoft PCM format, 1 channel, 44100 samp/sec
sox:         88200 byte/sec, 2 block align, 16 bits/samp, 2041438 data bytes
sox:         1020719 Samps/chans
sox: Input file obd-demo.wav: using sample rate 44100
	size shorts, encoding signed (2's complement), 1 channel
sox: Output file obd-demo.alaw: using sample rate 8000
	size bytes, encoding u-law, 1 channel
sox: Output file: comment "Processed by SoX"

sox: resample opts: Kaiser window, cutoff 0.800000, beta 16.000000

[root at host0040 test]# ls -ltr
total 2932
-rwxr-xr-x 1 root root  741459 Sep 14 06:32 obd-demo.mp3
-rw-r--r-- 1 root root 2041482 Sep 14 06:32 obd-demo.wav
-rw-r--r-- 1 root root  185165 Sep 14 06:32 obd-demo.alaw

Am i doing it correctly ? Please comment

Regards,

Kaushal



More information about the asterisk-users mailing list