Hi Kanishka,
On Tue Jan 20 02:05:28 2009, koolkanishka wrote:
Show quoted text> I have a query: Isn't MP3 a standard which mentions the details regarding
> audio frame sync, where it should be, etc.?
As far as I know, the frame sync can appear anywhere in the file. I think the standard is like
this to allow streaming live MP3, but it certainly makes recognizing an MP3 file more difficult.
Scanning further into the file to look for the frame sync has 2 problems:
1) It slows down exiftool processing, and
2) It increases the chances of encountering some random data that resembles a frame sync
and frame header (I already get enough false positives when looking for MP3 files).
So my strategy is to scan no further than necessary, and since I have found no better option,
I must resort to guessing and trial-and-error.
If anyone knows a more reliable technique to identify MP3 files, I would be very happy to
know it.
I can't just rely on the file extension because exiftool is designed to work on name-less files
like streams and pipes.
- Phil