On 8/15/07, John Joyce <dangerwillrobinsondanger / gmail.com> wrote:
> Does anybody know how to identify (validate) mp3 files (other audio
> files would be interesting as well) by 'magic number'?

I know for sure that:
= wave files start with the characters 'RIFF' followed by 4 bytes
(filesize-8) followed by 'WAVE'.
= ogg vorbis files start with 'oggS' followed by 24 bytes then 0x01
and the string 'vorbis'
= MIDI files start with 'MThd'

and according to wikipedia (and verified with one file on my system)
= MP3 files should start with 0xFF FB or 0xFF FA.

-Adam