1 Sep 2005 14:42
Re: sound file interrogation: length of play
David Graff <graff <at> ldc.upenn.edu>
2005-09-01 12:42:52 GMT
2005-09-01 12:42:52 GMT
mytofi <at> hotmail.com said:
> I am a software developer and am looking for a way to query a sound file
> (ie: wav or au) to see how long it will take to play the sound file. My
> work is on a Linux system, thus I have been looking at sox, but don't see
> anything obvious, and don't see anything after looking it over a bit.
This command line will spit out a summary of header contents on stderr:
sox -V file.name -e
Here's a sample of output for a .wav file:
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, 72116 data bytes
sox: Input file sw02015-A0008.wav: using sample rate 8000
size shorts, encoding signed (2's complement), 1 channel
And for a .au file:
sox: Detected file format type: au
sox: Found Sun/NeXT magic word
sox: Input file 1552.au: using sample rate 20000
size shorts, encoding signed (2's complement), 1 channel
(Continue reading)
RSS Feed