From: John Joyce Date: 2007-08-16T15:52:32+09:00 Subject: Re: mp3 file magic number identification On Aug 16, 2007, at 1:30 AM, Ben Bleything wrote: > On Thu, Aug 16, 2007, John Joyce wrote: >> Though I'm going to need some testing... the magic file (not always >> easy to read) >> says this : >> # MPEG 1.0 Layer 3 >> 0 beshort&0xfffe =0xfffa \bMP3 >> >> I'm not 100% sure, but Adam said 0xFFFB or 0xFFFA, and the magic file >> lists only FFFA or does it mean FFFE and/or FFFA ? > > Do "man magic" (or possibly man 5 magic, or man -s 5 magic), and it > should describe the format of the file. Basically, it's offset, type, > magic, message. Numeric types can be specified with &0xnnnn, where > the > number is ANDed with the magic. I'm basically just quoting from the > manpage, though, so give it a gander. > > Unix is cool :) > > Ben > Yeah, I read that already. Seemed simple. Many file descriptions are readable, but the MP3 one is one of many that don't make sense to me. " Numeric types can be specified with &0xnnnn, where the > number is ANDed with the magic." Makes no sense to me at all. I'm not a C person really. >> # MPEG 1.0 Layer 3 >> 0 beshort&0xfffe =0xfffa \bMP3 So what does the above mean?? I see hex numbers. but what is that '=' doing ? That's cryptic. The other lines after that make sense. They all describe the second byte and that it determines the bitrate. so do I care about 0xfffe? or 0xfffa? or both? I'm hoping I'm doing this right.