IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
MP3 is a Container or Codec alone
cernall
post Jul 2 2010, 09:14
Post #1





Group: Members
Posts: 3
Joined: 29-June 10
Member No.: 81920



We can se files with MP# extension. Is MP3 a container also, or it is a codec alone?

If its a codec alone, then how can we play and have some meta information in the mp3 files?
Go to the top of the page
+Quote Post
db1989
post Jul 2 2010, 09:37
Post #2





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



http://en.wikipedia.org/wiki/MP3#File_structure
Metadata is stored in ID3 tag(s).

MP3 is MPEG-1 Audio Layer 3. MPEG-1 can be a container of sorts, though I don't know if this applies to MP3 files, which have just one audio track: http://en.wikipedia.org/wiki/MPEG-1#Program_streams

This post has been edited by dv1989: Jul 2 2010, 09:40
Go to the top of the page
+Quote Post
odyssey
post Jul 2 2010, 13:50
Post #3





Group: Members
Posts: 2296
Joined: 18-May 03
From: Denmark
Member No.: 6695



I understand your confusion.

mp4 is a container, usually containing aac audio and/or avc video.
mp3 is audio probably with a sort of it's own container, allowing tags etc to be stored.


--------------------
Can't wait for a HD-AAC encoder :P
Go to the top of the page
+Quote Post
probedb
post Jul 2 2010, 15:50
Post #4





Group: Members
Posts: 1233
Joined: 6-September 04
Member No.: 16817



But it's not actually a container as such, audio formats have headers and such so I'm guessing tags are essentially just extra data in the headers?

Of course I could be completely wrong wink.gif
Go to the top of the page
+Quote Post
spoon
post Jul 2 2010, 20:50
Post #5


dBpowerAMP developer


Group: Developer (Donating)
Posts: 2748
Joined: 24-March 02
Member No.: 1615



I think the definition of a container (m4a, wav, aiff, etc) is that it should be able to contain different audio formats. Mp3 (if you ignore the mp3 surround distraction), only holds mp3.


--------------------
Spoon http://www.dbpoweramp.com
Go to the top of the page
+Quote Post
Aleron Ives
post Jul 2 2010, 21:21
Post #6





Group: Members
Posts: 189
Joined: 22-March 10
From: California
Member No.: 79208



QUOTE (spoon @ Jul 2 2010, 12:50) *
I think the definition of a container (m4a, wav, aiff, etc) is that it should be able to contain different audio formats. Mp3 (if you ignore the mp3 surround distraction), only holds mp3.

Yeah, the naming convention isn't consistant, which is rather confusing to people. MP3 is just a codec, because a file with the .mp3 extension is always MP3 audio. The successor to MP3 is AAC, and files with the .aac extension are "raw" AAC audio the same way MP3 audio is always presented. Unfortunately, AAC is often stored in MP4, which is a container, not a codec. MP4 can hold AAC audio, AVC video, or both, but MP4 itself is not content. It always has to hold something else, which is what makes it a container. (MP4 can also hold MP3 audio, XviD or DivX video, and any other number of formats. AVC/AAC are just the most common contents of MP4 containers.)
Go to the top of the page
+Quote Post
saratoga
post Jul 2 2010, 22:46
Post #7





Group: Members
Posts: 4971
Joined: 2-September 02
Member No.: 3264



QUOTE (cernall @ Jul 2 2010, 04:14) *
We can se files with MP# extension. Is MP3 a container also, or it is a codec alone?

If its a codec alone, then how can we play and have some meta information in the mp3 files?


MP3 is basically a raw bitstream (similar to .AAC) with tags stuck into it by exploiting how the mp3 spec says a bitstream should be parsed to hid extra data in a semi-backwards compatible way. Its not really a container in that its not officially standardized, but rather grew organically over the years.
Go to the top of the page
+Quote Post
mjb2006
post Jul 2 2010, 22:51
Post #8





Group: Members
Posts: 811
Joined: 12-May 06
From: Colorado, USA
Member No.: 30694



Answering the original questions... [this is basically just a longer version of saratoga's reply, which came in while I was typing]
QUOTE
how can we play and have some meta information in the mp3 files?

QUOTE
I'm guessing tags are essentially just extra data in the headers?


MP3 data is just the audio data segments ('frames') which, in series, compose a 'stream'. Each frame has its own header containing technical metadata about that frame (format version, bitrate, stereo mode, etc.), but nothing about the entire stream - no artist, title, etc.; AFAIK that kind of metadata was deliberately omitted from the MP3 spec, perhaps because it was thought that if a container format were needed, a suitable one would be properly developed by the industries that were interested in MP3.

So instead, at least for the way most of use MP3, various ad-hoc, not-very-well-thought-out-or-standardized methods have been devised to append or prepend chunks of formatted data ('tags') to a given stream. The most popular tag format has long been ID3, of which there are several versions, but APEv2 seems to be increasingly popular. These tags are basically garbage (in that they're not MP3 data) on the ends of the stream, but the programmers' maxim "be strict in what you produce and lenient in what you accept" dictates that consumers of ".mp3" files concentrate on whatever MP3 frames are there, and either properly handle or just ignore any garbage—er, tags. You can think of the file as being a 'container', then, but really it's just an MP3 stream possibly with other stuff embedded. Generally, you should expect that any MP3 file you run across will have no tags, or one tag, or many tags, all in different formats, and possibly at inconsistent locations.

This post has been edited by mjb2006: Jul 2 2010, 22:57
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 September 2014 - 23:09