Re: [LAU] Discovering file format

From: Dave Phillips <dlphillips@email-addr-hidden>
Date: Sat Sep 19 2015 - 23:26:08 EEST

On 09/19/2015 04:13 PM, Will Godfrey wrote:
> I have about 150 uncompressed audio files that I want to properly categorise,
> relatively quickly.
>
> The very oldest were recorded as 16bit 44.1k, more recent ones were 16bit, 48k
> and the latest ones 24bit 48k.
>
> I've moved them all into the same directory, so is there a simple script I can
> run that will scan this and list the name and details of each file?
>
> I can find plenty of programs that can change the format, but can't find any
> that will just tell me what it is :(
>

Maybe this :

     $ file bunting.wav
     bunting.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM,
16 bit, mono 44100 Hz

It works with wildcards.

     $file *.*

And you can redirect the output.

     $file *.* > mylist

The sfinfo utility is even better :

     $ sfinfo bunting.wav
     File Name bunting.wav
     File Format Microsoft RIFF WAVE Format (wave)
     Data Format 16-bit integer (2's complement, little endian)
     Audio Data 4398656 bytes begins at offset 44 (2c hex)
                    1 channel, 2199328 frames
     Sampling Rate 44100.00 Hz
     Duration 49.871 seconds

Also works with wildcards and redirection.

HTH,

dp
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Sun Sep 20 00:15:02 2015

This archive was generated by hypermail 2.1.8 : Sun Sep 20 2015 - 00:15:02 EEST