[LAU] Need to determine bit depth from command line

Kevin Cosgrove kevinc at cosgroves.us
Sun Jan 13 11:22:07 EST 2008

Is there any command-line way to tell what the bit depth of a sound 
file is?  Sox's '-e stat' doesn't say that.  /usr/bin/file only gives 
the sample rate.  Audacity, not command-line, tells me that my file 
in question is "Mono, 44100 Hz, 32-bit float".  I'd rather not have 
to use Audacity on all my files to figure out which ones are 16-bit 
and which ones are 32-bit.  I suppose I could use sox to find out how 
many samples, file to find out the sample rate, /bin/ls to determine 
the size, and then calculate the bit depth.




More information about the Linux-audio-user mailing list