Help - Search - Members - Calendar
Full Version: sync word detection in an MP3
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - Tech
Ravi
Hi All,

I am working on an application to run MP3s on various platforms. My understanding for MP3s is OK OK kind of. I got many documents on net and got a lot of information about it.
Now coming to the problem. I know the structure of MP3 files. How the data is organized and every other aspect related to it. I am quite aware about it.

But now while implementation I am facing a problem in detecting the 11 bits sync word. I am able to get sync words at different offsets but not able to figure out which one are false syncs.

I tried filtering out some of them with help of inavalid ID, IDTag, bitrateIndex, frequency and other factors. But still I am getting some of the sync words which are not valid. Can somebody explain it to me.

Second thing I want to ask is "Is it sure that if I got a sync word at offset SYNC_OFFSET_FRAME1, and the frame length of the frame of this sync word is FRAME1_LENGTH, then the next sync word has to be present at offset of SYNC_OFFSET_DATA1 + FRAME1_LENGTH?".

Please let me know if anybody has answer to above questions.

Thanks
-R/\\/I-
smack
This topic has been discussed several times already, just run a search for "mp3 header" or "mp3 sync"... rolleyes.gif

In this thread you may find all the answers: Foolproof MP3 validation...
Ravi
QUOTE(smack @ Nov 17 2007, 22:36) *

This topic has been discussed several times already, just run a search for "mp3 header" or "mp3 sync"... rolleyes.gif

In this thread you may find all the answers: Foolproof MP3 validation...

good info. Thanks Smack
Ravi
QUOTE(Ravi @ Nov 15 2007, 12:49) *

Hi All,

I am working on an application to run MP3s on various platforms. My understanding for MP3s is OK OK kind of. I got many documents on net and got a lot of information about it.
Now coming to the problem. I know the structure of MP3 files. How the data is organized and every other aspect related to it. I am quite aware about it.

But now while implementation I am facing a problem in detecting the 11 bits sync word. I am able to get sync words at different offsets but not able to figure out which one are false syncs.

I tried filtering out some of them with help of inavalid ID, IDTag, bitrateIndex, frequency and other factors. But still I am getting some of the sync words which are not valid. Can somebody explain it to me.

Second thing I want to ask is "Is it sure that if I got a sync word at offset SYNC_OFFSET_FRAME1, and the frame length of the frame of this sync word is FRAME1_LENGTH, then the next sync word has to be present at offset of SYNC_OFFSET_DATA1 + FRAME1_LENGTH?".

Please let me know if anybody has answer to above questions.

Thanks
-R/\\/I-

Just want to update for others who are reading this query. As I said in my query, the next sync has to be present at the offset of SYNC_OFFSET_DATA1 + FRAME1_LENGTH. I had checked this behaviour with a good number of MP3s and now kind of sure of it.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.