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

Kaushal Shriyan kaushalshriyan at gmail.com
Thu Sep 15 06:39:49 CDT 2011


On Thu, Sep 15, 2011 at 11:45 AM, Steve Edwards
<asterisk.org at sedwards.com> wrote:
> On Wed, 14 Sep 2011, Kaushal Shriyan wrote:
>
>> Please let me know the correct procedure to get .alaw file format since I
>> belong to India region.
>
> Well, let's see...
>
> You used '-t ul' and got a 'ulaw.'
>
> I wonder what '-t al' will give you?
>
> Failing that, I suspect 'sox --help' or Google would be a more responsive
> resource.
>

Thanks Steve. it worked this time. Also is there a way to verify .alaw
file without playing the file. Although i did play obd-demo.alaw it
worked fine.

I did ran the below command

[root at host0040 test]# file obd-demo.alaw
obd-demo.alaw: data
[root at host0040 test]#
[root at host0040 test]# sox obd-demo.alaw -e stat
sox: Failed reading obd-demo.alaw: Do not understand format type: alaw

[root at host0040 test]#

Basically trying to understand the properties of the .alaw file about
encoding and details. Please guide.


[root at host0040 test]# sox -V obd-demo.wav -r 8000 -b -t al -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 a-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 -ltrh
total 2.9M
-rwxr-xr-x 1 root root 725K Sep 14 06:32 obd-demo.mp3
-rw-r--r-- 1 root root 2.0M Sep 14 06:32 obd-demo.wav
-rw-r--r-- 1 root root 181K Sep 15 16:57 obd-demo.alaw



More information about the asterisk-users mailing list