file 4.21 problem with multi-channel WAV files

Ben Stanley Ben.Stanley at exemail.com.au
Tue Jun 17 07:39:23 EEST 2008


Hi,

I have Ubuntu 7.10, bundling file 4.21-1. I don't know if this has been
fixed in newer versions, but I thought I would report it to make sure. I
wasn't able to test the latest version 4.24.

I downloaded a multi-channel wave file from

http://www.lindberg.no/hires/2L50SACD_tr01_multi_48.wav
(Beware - the file is 149Mb! But you only need the first little bit to
test the file command.)

(The file comes from the first musical album released in BluRay format,
see [1]. Some tracks are available in various formats for free download,
see [2].)

When I run the file command, I get some strange output, particularly for
the number of channels:

$ file --version
file-4.21
magic file from /etc/magic:/usr/share/file/magic

$ file 2L50SACD_tr01_multi_48.wav 
2L50SACD_tr01_multi_48.wav: RIFF (little-endian) data, WAVE audio, 2396
channels

Reading the header in khexedit shows that this file has 6 channels only,
but the file command is reporting an absurdly large number of channels,
and fails to report the sampling rate.

Some further output from other files downloaded from that site is shown
below. 

$ file *
2L38SACD_tr1_DTS_44kHz.wav:            RIFF (little-endian) data, WAVE
audio, Microsoft PCM, 16 bit, stereo 44100 Hz
2L38SACD_tr1_mch_48kHz.wav:            RIFF (little-endian) data, WAVE
audio, 7435 channels
2L38SACD_tr1_stereo_96.flac:           FLAC audio bitstream data, 24
bit, stereo, 96 kHz, 54146863 samples
2L38SACD_tr1_stereo_96.wav:            RIFF (little-endian) data, WAVE
audio, 4957 channels
2L50SACD_tr01_multi_48.wav:            RIFF (little-endian) data, WAVE
audio, 2396 channels
2L50SACD_tr1_DTS.wav:                  RIFF (little-endian) data, WAVE
audio, Microsoft PCM, 16 bit, stereo 44100 Hz
Beethoven_op111_sats1_multikanal.flac: FLAC audio bitstream data, 24
bit, 6 channels, 96 kHz, 57235892 samples

It might be nice if one day file recognised DTS and Dolby Digital
encoding within the audio samples of a WAV stream (see [3] for example
files), but that would be icing on the cake.

Thanks for your work on file!
Ben Stanley

[1] http://www.2l.musiconline.no/shop/displayAlbum.asp?id=34188
[2] http://www.2l.no/hires/index.html 
[3] http://www.sr.se/cgi-bin/mall/index.asp?programid=2445







More information about the File mailing list