From: John Joyce Date: 2007-08-16T12:11:13+09:00 Subject: Re: mp3 file magic number identification On Aug 15, 2007, at 7:23 PM, Adam Shelly wrote: > On 8/15/07, John Joyce 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 > Thanks Adam, that's the kind of thing I'm looking for exactly. If anyone can contribute more audio file magic numbers, please do! I guess video/AV files should be next as well, primarily things like .mov, .wmv, etc... Oh, and I think we should find out if smaf is the same as midi. These kind of validation tools can be useful to us all these days.