IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
MP3 frame: Where main data ends for a frame?, You do not need to repeat the title here.
Ravi
post Jun 9 2009, 07:05
Post #1





Group: Members
Posts: 18
Joined: 15-November 07
Member No.: 48770



Hi All,

I have a problem in reading the main data bits of an MP3 frame

I got it correct that the first 9 bits of side info points backward in mp3 file from where the main data starts for the corresponding frame. Now can we some how find where the relevant data for the frame ends?

For example:

lets say in a frame I have following data:

Frame starts at 5442nd byte of the file. First 4 bytes are for header.
Next 32 bytes are for the side info. so over all 36 (=32 + 4) bytes are there for fixed data.
Frame length = 418
The value from first 9 bits of side info is 44.


In this case the main data should start from 5442 - 44 = 5398th byte of the file.
So now in this frame the main data is starting from 5398 byte of the file.

So we have main data from the byte 5389 to 5442.
From byte 5442 to 5478 ( = 5442 + 36) the fixed data of the frame is present.
From byte 5478 again the main data starts for the frame.

But can anyone tell me where it will end?

Will it end on 5398 + 418 = 5816th byte? Or main data can end before also?


Go to the top of the page
 
+Quote Post
menno
post Jun 9 2009, 15:45
Post #2


Nero MPEG4 developer


Group: Developer (Donating)
Posts: 1187
Joined: 11-October 01
From: LA
Member No.: 267



Main data ends when decoding of the huffman codewords is done, the size is implicit. You could make a guess by getting the main data back pointer from the next frame to see how far in the current frame the next frame's main data starts. But there could be some padding or ancillary data included in the number you get then.
Go to the top of the page
 
+Quote Post

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: 22nd November 2009 - 01:43