Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When the audio_getid3 module is enabled, it attempts to parse all uploaded audio files for ID3 info, whether they're MP3s or not. This causes an error, for example, when uploading a wav file. Attached patch fixes this, with a simple regex check for a '.mp3' extension on the file.
Comment | File | Size | Author |
---|---|---|---|
wav_no_id3.patch | 1.05 KB | Jaza |
Comments
Comment #1
drewish CreditAttribution: drewish commentedall new changes need to go into HEAD first.
Comment #2
mfbgetid3 can extract info from many formats including wav and ogg. wav files with metadata are common in film and television for example.
Comment #3
Jaza CreditAttribution: Jaza commentedI'm not an expert on getid3, so I can't comment on its wav handling ability. Nor am I an expert on the wav format - I wasn't aware that it supports any id3-like metadata. However, what I do know is that when I try uploading plain old wav files (without metadata), and that when getid3 tries to parse them, it borks and dies.
Maybe this is a bug with getid3, or maybe we're not calling the right function. But from looking at the source code, it would seem that we are calling getid3 in the right way (i.e. "$getID3->analyze($filepath)"). It also seems that wav files are NOT supported: I see that '.wv' files ("WavPack") are mentioned in the source (getid3.php), but not '.wav'. So the problem is probably with getid3.
Comment #4
mfbI don't have 5.x-2.x-dev installed so I can't really help look into the problem. but I do know that getid3 does support WAV (see the RIFF module) and wav metadata. Sounds like it might be a harmless warning message that needs to be suppressed..