unknown file type error for all files

The place for "I can't figure out how to..." questions.
Post Reply
duggoff
User
Posts: 1
Joined: Wed Jan 25, 2006 9:36 pm

unknown file type error for all files

Post by duggoff » Wed Jan 25, 2006 10:06 pm

I'm using the demo.mysql.php script to test getid3 on Apache 2.0.55 and PHP 4.4.2. The script allows me to enter the directory containing the mp3 files. When I click on "Go", it returns a listing of all the files in the directory, and after each file, it says "unknown file type". I have tried with mp3 files created by Windows Media Player and Audacity using the Lame encoder.
I have been using the Drupal CMS audio.module, which uses getid3, and it tells me "Uploaded file is not an audio file", not that I'm expecting you to troubleshoot Drupal for me :D .

Thanks,

Doug Gough

Allan Hansen
getID3() v2 developer
Posts: 445
Joined: Sun May 04, 2003 2:22 pm
Location: Holmegaard, Denmark

Post by Allan Hansen » Thu Jan 26, 2006 1:08 pm

getID3() can usually detect files based on format related magic bytes within the files. However, some versions of LAME adds garbage in front of mp3 files and makes them undetectable. You should only experience this if your files does not end with .mp3.

James Heinrich
getID3() v1 developer
Posts: 1477
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Post by James Heinrich » Thu Jan 26, 2006 1:19 pm

Allan Hansen wrote:some versions of LAME adds garbage in front of mp3 files and makes them undetectable.
Specifcally, that's LAME v3.90 through v3.92, when called through the DLL (not the EXE version), and only when in CBR mode. These versions of LAME reserve 1 frame of space at the beginning of the file for the Xing/LAME (VBR) header, but never go back to fill it in, so you end up with a few hundred bytes of nulls.

Post Reply