From: John Joyce Date: 2007-08-16T12:07:18+09:00 Subject: Re: mp3 file magic number identification On Aug 15, 2007, at 5:45 PM, Stefan Mahlitz wrote: > John Joyce wrote: >> Does anybody know how to identify (validate) mp3 files (other audio >> files would be interesting as well) by 'magic number'? > >> I did find this online as a purported mp3 magic number (in hex of >> course), >> 49 44 33 >> but I'm not even going to bother using it since I don't know >> definitively that all mp3's will have it, and I don't know where to >> expect it in the file. > > does this help: http://raa.ruby-lang.org/project/filemagic/ > > Stefan > Thanks Stefan, but I should have said, I was hoping for the pure Ruby implementation. More portable that way.