Welcome Guest ( Log In | Register )

Parsing the MP3 Data, Isolating the MP3 Data Only
post Dec 16 2011, 06:57
Post #1

Group: Members
Posts: 8
Joined: 16-December 11
Member No.: 95828

Hello Everyone.

I am still a newbie when it comes to MP3 and its detail/internal structure.

This past few days, I have been parsing different MP3 files most of which have ID3vxx format. So basically to get the Mp3 data, I just read the data after the tag in case of ID3v2 and before the tag in case of ID3v1.

So now I am given a Lame encoded? MP3 file. I can get the Header Information but not the actual audio data. crying.gif

So basically what I'm trying to do is to get the MP3 header and MP3 data only and ignore any tag/header or info within it.

Thank you for any information.

** I hope I posted this in the correct area smile.gif
Go to the top of the page
+Quote Post
Start new topic
post Jan 5 2012, 17:06
Post #2

Winamp Developer

Group: Developer
Posts: 670
Joined: 17-July 05
From: Brooklyn, NY
Member No.: 23375

once you skip the ID3v2 tag, you can basically send the data to the decoder. If the decoder requires complete frames, you'll need to parse the 4 byte MPEG frame header to determine the complete size of the frame (trivially computed from the bitrate index, samplerate index, layer and version. unfortunately the byte size isn't encoded directly like it is with ADTS AAC, for example). As Sebastian stated, things like "Xing Headers" and "LAME padding area" are actually parts of valid MP3 data and your decoder will be able to deal with it. In this case, LAME is putting useful, but not necessary for decoding, data into the "ancillary data" portion of the fist MP3 frame. Not all encoders produce this silent first frame with data embedded in the ancillary data.

This post has been edited by benski: Jan 5 2012, 17:09
Go to the top of the page
+Quote Post

Posts in this topic

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 25th November 2015 - 10:14