IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
MP3 frames and headers
Sebastian Mares
post May 14 2003, 17:09
Post #1





Group: Members
Posts: 3493
Joined: 14-May 03
From: Bad Herrenalb
Member No.: 6613



Hello!

I am just developing an ActiveX in Visual Basic, which can extract various information about MP3 files.
At the moment, I am adding support for the LAME tag and came across the following problems:

1. How can I check if the MP3 uses SCFSI?
2. How can I obtain the SCALEFAC scale?

I would appreciate it if you could give me some information or could provide source code in Visual Basic or Delphi (although I don't know it so good).

---

Another thing which I would like to know is if the LAME version can contain other information than "alpha" and "beta". To be more concrete: how are pre-releases marked?
Also, I have remarked the followings (please correct me if I am wrong): the Xing tag contains the short version, like "LAME3.90a", while at the end of the file you can find the whole thing, like "LAME3.90.2 (alpha)". Version 3.88 beta instead contained the whole "beta" string even in the Xing header. Also, the "beta" string at the end of the file was NOT together with "LAME" (example: "LAME3.88UUU...UUU(beta)UUU...UUUTAG...")

---

Problem 3: Does anyone have some code or knows DLLs which can calculate CRC16 (or the one LAME uses) for byte arrays?

---

Problem 4: Anyone here having VB/Delphi code for parsing frames?

---

Problem 5: The Xing/Info header can start at 3 offsets based on the MPEG version and channel mode. What about the VBRI header?

---

Problem 6: Does anyone know how to identify mp3PRO files?




Thank you in advance!
Sebastian Mares

This post has been edited by Sebastian Mares: May 25 2003, 11:27
Go to the top of the page
 
+Quote Post
Sebastian Mares
post May 16 2003, 12:52
Post #2





Group: Members
Posts: 3493
Joined: 14-May 03
From: Bad Herrenalb
Member No.: 6613



QUOTE
Problem 3: Does anyone have some code or knows DLLs which can calculate CRC16 (or the one LAME uses) for byte arrays?

Problem solved.

QUOTE
Problem 5: The Xing/Info header can start at 3 offsets based on the MPEG version and channel mode. What about the VBRI header?

I have encoded one file in stereo mode and another as mono. Both files had the VBRI header at the same position. I am not sure about MPEG 2(.5) files, as JetAudio doesn't allow me to set the sampling rate.
Anyway, I guess that the VBRI header is stored at a constant offset.

QUOTE
Problem 6: Does anyone know how to identify mp3PRO files?

I have noticed that EncSpot is looking for "mp3PRO", "Thomson" and "RCA". I have an mp3PRO file encoded with JetAudio, which does not contain any of the above strings, but EncSpot recognizes it as mp3PRO. VBR file are recognized as encoded by FhG.

This post has been edited by Sebastian Mares: May 16 2003, 12:54
Go to the top of the page
 
+Quote Post
Gabriel
post May 25 2003, 13:15
Post #3


LAME developer


Group: Developer
Posts: 2950
Joined: 1-October 01
From: Nanterre, France
Member No.: 138



Some information is located inside side_info. I'd suggest you to read "Design and implementation of a layer III bitstream processor" (mp3'tech, programmer's corner)

About Lame version: Lame is storing its version number as padding value if there is padding in the bitstream. That is why you can find a version string (sometimes incomplete) at various places in the bitstream.

About mp3pro, my guess is that you can probably identify it by looking at the ancillary data.
Go to the top of the page
 
+Quote Post
Sebastian Mares
post May 26 2003, 06:46
Post #4





Group: Members
Posts: 3493
Joined: 14-May 03
From: Bad Herrenalb
Member No.: 6613



QUOTE
1. How can I check if the MP3 uses SCFSI?
2. How can I obtain the SCALEFAC scale?

OK, so that kind of data isn't stored in the frame header, if I understood the documentation correctly.
Anyway, it is pretty hard to implement what the documentation says. Pretty massive. huh.gif
If anyone else has an easier way or already implemented that, please drop me a line.

QUOTE
Another thing which I would like to know is if the LAME version can contain other information than "alpha" and "beta". To be more concrete: how are pre-releases marked?
Also, I have remarked the followings (please correct me if I am wrong): the Xing tag contains the short version, like "LAME3.90a", while at the end of the file you can find the whole thing, like "LAME3.90.2 (alpha)". Version 3.88 beta instead contained the whole "beta" string even in the Xing header. Also, the "beta" string at the end of the file was NOT together with "LAME" (example: "LAME3.88UUU...UUU(beta)UUU...UUUTAG...")

OK, thanks for the explanation, but I still don't know how pre versions are marked. Only "beta" and "alpha"?

QUOTE
Problem 3: Does anyone have some code or knows DLLs which can calculate CRC16 (or the one LAME uses) for byte arrays?

As I said before, fixed.

QUOTE
Problem 4: Anyone here having VB/Delphi code for parsing frames?

I will try to do what that documentation told me to do.

QUOTE
Problem 5: The Xing/Info header can start at 3 offsets based on the MPEG version and channel mode. What about the VBRI header?

OK, I did some research and also looked at the official VBRI documentation, and it seems that the header is at a constant position (for both MPEG1/2 and stereo/mono). Anyway, I remember that once I had a MP3 file containing a VBRI header, which started at another position (not ,32, but +17).

QUOTE
Problem 6: Does anyone know how to identify mp3PRO files?

Still didn't find out how to do that. sad.gif

This post has been edited by Sebastian Mares: May 26 2003, 06:48
Go to the top of the page
 
+Quote Post
getID3()
post May 30 2003, 17:33
Post #5


getID3() developer


Group: Developer
Posts: 252
Joined: 20-September 02
From: Kingston, ON
Member No.: 3413



VBRI header is always at a constant offset. Xing/LAME header is at one of three possible offsets, depending on MPEG version and mono/stereo.

I'm also interested in extracting SCFSI, SCALEFAC, etc information, but I haven't (yet) succeeded in doing so.

I'd love to be able to identify mp3PRO files as well, but so far no luck in that department either sad.gif


--------------------
getID3() = PHP audio & video metadata parser: http://getid3.sourceforge.net
Current version: v1.7.0 (released January 19, 2004)
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: 21st November 2009 - 03:40