IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Convert any audio to CCITT .wav format
ninjawarrior
post Jan 18 2010, 13:55
Post #1





Group: Members
Posts: 3
Joined: 18-January 10
Member No.: 77267



Well I have requirement of converting any audio file in .wav/.mp3 format to following format

The destination file format is different in windows and in linux

in windows it shows:
64kbps, 8bit mono, 8khz, CCITT A-Law

in linux it shows:
RIFF (little-endian) data, WAVE audio, 20294 channels 1413894985 Hz

The question is why in different operating system same audio file is shown in different format and while converting any wav file or mp3 file what should be my destination file format.

As I am working in linux, let me choose linux format, so how can I convert any .wav file / .mp3 file in the above written LINUX sound file format.

I tried LAME but its not working.
Go to the top of the page
+Quote Post
trout
post Jan 18 2010, 20:00
Post #2





Group: Members
Posts: 424
Joined: 26-March 09
Member No.: 68400



try SoX
(you might also need libmad to decode mp3)

command: sox input.wav -A -c 1 -r 8000 output.wav
Go to the top of the page
+Quote Post
ninjawarrior
post Jan 19 2010, 10:43
Post #3





Group: Members
Posts: 3
Joined: 18-January 10
Member No.: 77267



QUOTE (trout @ Jan 19 2010, 00:30) *
try SoX
(you might also need libmad to decode mp3)

command: sox input.wav -A -c 1 -r 8000 output.wav



I tried this but it says
sox formats: can't open input file `input.wav': WAVE: RIFF header not found

I have libmad installed, both devel version and original one on the linux box.

This post has been edited by ninjawarrior: Jan 19 2010, 10:45
Go to the top of the page
+Quote Post
trout
post Jan 19 2010, 17:38
Post #4





Group: Members
Posts: 424
Joined: 26-March 09
Member No.: 68400



QUOTE (ninjawarrior)
can't open input file `input.wav': WAVE: RIFF header not found

if the input has no header, then you need to specify the file type

sox -t <file-type> -e <data-encoding> -b <bits> -r <sample-rate> -c <channels> input.wav -A -r 8000 -c 1 output.wav

man page - http://sox.sourceforge.net/sox.html
Go to the top of the page
+Quote Post
ninjawarrior
post Jan 20 2010, 18:48
Post #5





Group: Members
Posts: 3
Joined: 18-January 10
Member No.: 77267



Thank you , it worked. biggrin.gif
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 2nd October 2014 - 05:40