Welcome Guest ( Log In | Register )

MP3 Header in LAME
post Feb 18 2013, 13:26
Post #1

Group: Members
Posts: 1
Joined: 18-February 13
Member No.: 106721


I am trying to encode a raw pcm stream as mp3 with LAME before entering it into an FLV container. To encode the raw pcm stream as mp3, I am using the following functions:

In both these functions, the mp3 encoded samples are stored in buffers of type unsigned char. My question(s):

1. Is it correct to assume that the first 32 bits of the buffer would be the MP3 header? In other words does the MP3 "frame" as output by the above function contain the header as well? I tried to output the contents of the mp3 buffer byte by byte. I see that most frames have 255 as the first element but some do not.

2. If the MP3 header is not part of the first 32 bits, how do I write the header? What is a Xing header? Is it a version of the MP3 header or ID3v2 tag?

3. Using the LAME API, how do we find the bitrate of the file?

I have been scratching my head on these issues for some time and some help would be most welcome.

This post has been edited by ssriram: Feb 18 2013, 13:27
Go to the top of the page
+Quote Post

Posts in this topic
- ssriram   MP3 Header in LAME   Feb 18 2013, 13:26

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: 21st December 2014 - 12:42