Failed to open file file.wav as a WAV due to: file does not start with RIFF id

Alex picture Alex · Sep 4, 2014 · Viewed 20.6k times · Source

I am getting this error when trying to open a RIFF file (which as I understand it is a type of WAV) in python.

Failed to open file file.wav as a WAV due to: file does not start with RIFF id

When I inspect it with various tools which leads me to believe that it is really a WAV / RIFF file.

$ file file.wav 
file.wav: MBWF/RF64 audio, stereo 96000 Hz


$ file -i file.wav 
file.wav: audio/x-wav; charset=binary




$ mediainfo file.wav 
General
Complete name                            : file.wav
Format                                   : Wave
Format profile                           : RF64
File size                                : 4.10 GiB
Duration                                 : 2h 7mn
Overall bit rate mode                    : Constant
Overall bit rate                         : 4 608 Kbps

Audio
Format                                   : PCM
Format settings, Endianness              : Little
Format settings, Sign                    : Signed
Codec ID                                 : 1
Duration                                 : 2h 7mn
Bit rate mode                            : Constant
Bit rate                                 : 4 608 Kbps
Channel(s)                               : 2 channels
Sampling rate                            : 96.0 KHz
Bit depth                                : 24 bits
Stream size                              : 4.10 GiB (100%)

Answer

Ignacio Vazquez-Abrams picture Ignacio Vazquez-Abrams · Sep 4, 2014

What you have is a 64-bit RIFF. wave does not support 64-bit RIFF files.