Help - Search - Members - Calendar
Full Version: how2distinguish mp3 from mp3pro ?
Hydrogenaudio Forums > Lossy Audio Compression > Other Lossy Codecs
chrizoo
Hi folks. I have a question, which I believe, matters to everybody who has mp3 files on his hard disk.

If you have mp3's on your disk and didn't convert all of them yourself, how can we be sure it's mp3 files and not mp3pro files ? (Without special software the latter are only played back at half the sampling rate, thus reducing the audio quality significantly!!)

Anybody knows how to determine for any given .mp3 file whether we are dealing with an mp3 or mp3pro file ? How is a mp3pro file recognizable ... ?
My various audio apps all said "codec: mp3" and viewing them with a hex editor didn't show me anything revealing (magic value, signature, etc.) ...
pdq
QUOTE (chrizoo @ Aug 8 2008, 23:13) *
Hi folks. Would be very thankful if someone could tell me how I know for any given .mp3 file whether I am dealing with an mp3 or mp3pro file ?

My various audio apps all said codec:mp3 and viewing them with a hex editor didn't show me anything revealing (magic value, signature, etc.) ... but maybe the sample files I had were simple mp3 files and not pro and that's why.

Still: how can an .mp3pro file be recognized?
Thanks.

I believe that mp3pro files consists of regular mp3 data at half the original sample rate plus some extra data that an ordinary mp3 player will ignore, so check the sample rate of your files.
chrizoo
I believe that any sample rate possible for normal mp3 is also possible for mp3pro, so from what I've read so far on the issue this is not an indicator it seems.

(quote from wikipedia: Any mp3 player can play mp3PRO files but they will be played at half the intended sample rate. To play mp3PRO files with the full sample rate in Microsoft Windows, users are required to install additional software.)
kornchild2002
Right. So open the mp3 file in something like iTunes or Windows Media Player (without any direct show filters), right-click on the song, and see what they say for properties. If they report the file as being 22.05KHz then you have an mp3pro file, if they report it as being 44.1KHz then it is an mp3 file. I believe that foobar2000 can also make this distinction but I am not sure as the last time I even messed with mp3pro was back in 2002 whenever I looked at it, encoded some songs, and then laughed.
chrizoo
Sorry I can't follow you. If it says 22 khz why do I know it's an mp3pro file? There are normal mp3 files with 22 khz too !
lvqcl
Adobe Audition can open & create MP3pro files.
There are also mp3pro decoder for Winamp 2.x and standalone player at http://www.mp3prozone.com/download.htm
IIRC NeroBurningRom also can read mp3pro.
gasmann
easiest way I see to be absolutely sure about it: 1) open the file in an mp3pro-capable player and look at sample rate 2) open the same file in an non-mp3pro-capable player and look at sample rate.
if both match, it is an standard mp3, if sample rate in 1) is twice of sample rate in 2), it's an mp3pro.
edit: @kornchild2002: checked, foobar2000 can't distinct. It just detects an ordinary mp3 with, in my case, 22050Hz instead of 44100Hz.
chrizoo
QUOTE (lvqcl @ Aug 9 2008, 09:36) *
Adobe Audition can open & create MP3pro files. There are also mp3pro decoder for Winamp 2.x and standalone player at http://www.mp3prozone.com/download.htm IIRC NeroBurningRom also can read mp3pro.
Thanks for the info. My objective is to distinguish mp3 files from mp3pro files. I may be bissing something, but in which way can your information help me with this ?
chrizoo
QUOTE (gasmann @ Aug 9 2008, 11:46) *
easiest way I see to be absolutely sure about it: 1) open the file in an mp3pro-capable player and look at sample rate 2) open the same file in an non-mp3pro-capable player and look at sample rate. if both match, it is an standard mp3, if sample rate in 1) is twice of sample rate in 2), it's an mp3pro. edit: @kornchild2002: checked, foobar2000 can't distinct. It just detects an ordinary mp3 with, in my case, 22050Hz instead of 44100Hz.

Thanks. If it worked, it would be quite complicated to check with multiple applications and compare (and also needs additional software installed). I'd rather have a fast and reliable way to see it... for example by looking for a special byte-code at the beginning of the file (signature) with a hex-editor. Like JFIF for a jpeg file. Or another easy method.
But actually your method does not work reliably, because even with normal mp3 files (not mp3pro) players sometimes display different sample rates. This happens particularly often for mpeg 2 layer 3 files.
lvqcl
QUOTE
I may be bissing something, but in which way can your information help me with this ?


Adobe Audition: link
Nero: link
chrizoo
hey, thanks for taking the time to make screenshots. Didn't know that they would display if it's the pro codec. I was sure they wouldn't as I have not seen any application so far that would do that.
I wish winamp could tell me ....
... well seems I have to install additional software to be sure.

Anyway, thanks a lot for your help and if by any chances someone still passes by here and knows a way to distinguish the pro files manually, then please don't hesitate to tell me... smile.gif
kornchild2002
QUOTE (chrizoo @ Aug 9 2008, 03:01) *
Sorry I can't follow you. If it says 22 khz why do I know it's an mp3pro file? There are normal mp3 files with 22 khz too !


I am not talking about the lowpass filters. Normal mp3 files are always reported as being 44.1KHz (that is 22.05KHz per channel) no matter what the lowpass filter is per channel. However, mp3pro files are always reported as being half of that in non-mp3pro compatible programs. So you can open up an mp3pro file in Windows Media Player or iTunes and it will report the file as having a sample rate of 22.05KHz (that is 11.025KHz per channel). mp3pro compatible software will display an mp3pro file as being 44.1KHz and that is simply because they have the proper decoder. When an mp3pro file is decoded using standard mp3 methods, you will always get half the sample rate. Hence the 22.05KHz.
lvqcl
QUOTE
I am not talking about the lowpass filters. Normal mp3 files are always reported as being 44.1KHz (that is 22.05KHz per channel)

kornchild2002, both left and right channels have samplerate=44.1 kHz in this case.
pdq
QUOTE (kornchild2002 @ Aug 9 2008, 15:58) *
I am not talking about the lowpass filters. Normal mp3 files are always reported as being 44.1KHz (that is 22.05KHz per channel) no matter what the lowpass filter is per channel.

Under some conditions LAME will automatically resample to 32 kHz or 22.05 kHz, such as at low bitrates or with a low lowpass filter.
chrizoo
QUOTE (kornchild2002 @ Aug 9 2008, 19:58) *
QUOTE (chrizoo @ Aug 9 2008, 03:01) *
Sorry I can't follow you. If it says 22 khz why do I know it's an mp3pro file? There are normal mp3 files with 22 khz too !
I am not talking about the lowpass filters. Normal mp3 files are always reported as being 44.1KHz (that is 22.05KHz per channel) no matter what the lowpass filter is per channel. However, mp3pro files are always reported as being half of that in non-mp3pro compatible programs. So you can open up an mp3pro file in Windows Media Player or iTunes and it will report the file as having a sample rate of 22.05KHz (that is 11.025KHz per channel). mp3pro compatible software will display an mp3pro file as being 44.1KHz and that is simply because they have the proper decoder. When an mp3pro file is decoded using standard mp3 methods, you will always get half the sample rate. Hence the 22.05KHz.
First I cannot see what lowpass filters would have to do with my topic (distinguishing mp3 from mp3pro), but anyway, I don't think you are right here, neither about "22.05khz (that is 11.025 khz per channel)" nor that normal mp3 files are always reported as being 44.1khz ... you can send me a wav if you want and I can easily convert that to an mp3 file with less than 44.1khz.

QUOTE (lvqcl @ Aug 9 2008, 20:38) *
QUOTE
I am not talking about the lowpass filters. Normal mp3 files are always reported as being 44.1KHz (that is 22.05KHz per channel)
kornchild2002, both left and right channels have samplerate=44.1 kHz in this case.
correct.


QUOTE (pdq @ Aug 9 2008, 23:42) *
QUOTE (kornchild2002 @ Aug 9 2008, 15:58) *
I am not talking about the lowpass filters. Normal mp3 files are always reported as being 44.1KHz (that is 22.05KHz per channel) no matter what the lowpass filter is per channel.
Under some conditions LAME will automatically resample to 32 kHz or 22.05 kHz, such as at low bitrates or with a low lowpass filter.
correct, for low bitrates you often don't have the choice ("automatically" as you said) and for higher bitrates, you are technically able to choose less than 44 khz if you absolutely want to for some reasons ... (I have a couple of times seen such mp3 files, probably converted by people who were not aware of sampling rates)
chrizoo
QUOTE (sld @ Oct 25 2003, 11:40) *
QUOTE (~*McoreD*~ @ Oct 25 2003, 07:25 PM)
To me mp3PRO is the most annoying audio format I have ever seen. :sad:

Unlike for any other format, if a player does not support mp3PRO, it does not refuse it play it; it plays at 22.025 kHz instead! I am worried about the quality of the audio file for days, until I suddenly realise it is not a MP3 file that has been encoded at 96 kbps.

The second reason is it is using the same extension (*.mp3) as the standard MP3 file. They should have at least changed the extension to *.mp3p or something. The ability to distinguish between MP3 and mp3PRO is very low.

[...] Of course if one has a few mp3PRO files interspersed within a library of 2000+ mp3 songs it becomes a niggling problem.


Other people sharing the same concern here:

http://www.hydrogenaudio.org/forums/index....showtopic=14264
j7n
QUOTE (chrizoo @ Aug 9 2008, 06:13) *
I have a question, which I believe, matters to everybody who has mp3 files on his hard disk.

I don't think there are so many MP3/SBR files around to worry about it. The max bitrate of MP3Pro is 160 kBit/s, but encoding tools (Nero, Cool Edit Pro) restrict it to 96 kBit/s. So I would avoid these files in the first place because of small size.

Audiobooks are known to be released with ridiculously low bitrates. So, perhaps this question is of greater concern to people who listen to them.

If I had any important irreplaceable MP3/SBR files, I'd identify them with Cool Edit Pro, as already been suggested, and label them in the filename.

SBR has caused too much confusion. In my opinion they should have developed own file format instead of attempting to cash in on the popularity of "MP3" name.
chrizoo
It happened to me a couple of times already (and to other users as well, e.g. *McoreD*, see above), also for 128 kbs files, and no matter how likely or unlikely you think it is, I want an umistakable method to see if it's mp3 or mp3pro.

So far the only one who has presented a solution was lvqcl, but it requires to purchase special software for it.

Does nobody here know how the mp3pro file is structured compared to an mp3 file? Is there nothing in the file header I can identify an mp3pro file with ?? Or any other method ?
j7n
There is no "file header" in an MP3 stream.

Gabriel Bouvigne wrote:
QUOTE
the criterion would be to look at the ammount of ancillary data. Mp3pro should have more ancillary data (around 4-10kbps) than regular mp3.


Apparently Mp3Pro 'detection' process is more complex than it would seem because somebody has managed to patent an implementation.
kornchild2002
QUOTE (chrizoo @ Aug 9 2008, 18:15) *
First I cannot see what lowpass filters would have to do with my topic (distinguishing mp3 from mp3pro), but anyway, I don't think you are right here, neither about "22.05khz (that is 11.025 khz per channel)" nor that normal mp3 files are always reported as being 44.1khz ... you can send me a wav if you want and I can easily convert that to an mp3 file with less than 44.1khz.


I didn't know what you were talking about. I have corrected my statement as seen below. Still, an mp3pro file will be reported as being 22.05KHz. As I said below, open the files in a non-mp3pro compliant application whether it be WinAmp, iTunes, or Windows Media Player. If a 128kbps file is reported as being 22.05KHz, it is more than likely an mp3pro file. That is unless someone has forced Lame (or whatever mp3 encoder they are using) to resample the song down to 22.05KHz. I don't see why anyone would do that though. I think this is really the only method that you can do without using special software. Just open the files in a regular media player and see what happens. This is what Wikipedia says: "Any mp3 player can play mp3PRO files but they will be played at half the intended sample rate." Half of 44.1KHz is 22.05KHz. So, if you open an mp3pro file in non-compliant software, it will report the sample rate as being 22.05KHz and will play it as such. Here is a screenshot from iTunes playing a 96kbps mp3pro file encoded with Nero:


You can see that the sample rate is in fact reported as being 22.050KHz

Here is a screenshot from iTunes of a 96kbps CBR Lame mp3 file:



You can see it is reported as being 32KHz. So, I am just saying that if you have a file encoded at 64kbps or higher, it should have a sample rate of at least 24KHz or above unless someone has told their mp3 encoder to resample down to a lower rate. I encoded a file at 64kbps CBR with Lame and iTunes reported it as being 24KHz. I think this is the easiest method to use without downloading any special software. By default, Lame will also downsample to 16KHz when encoding at 32kbps as well. So I think you will be fine if you just open the files in your normal, non-mp3pro compatible player.

QUOTE (pdq @ Aug 9 2008, 17:42) *
Under some conditions LAME will automatically resample to 32 kHz or 22.05 kHz, such as at low bitrates or with a low lowpass filter.


Right. I guess I should have said that mp3's are normally reported as being 44.1KHz unless they are encoded at low bitrates or have been forced to lower sample rates. I am not sure which bitrate will cause Lame to start resampling down to lower levels though. Still, if a 128kbps+ mp3 is reported as being 44.1KHz in iTunes, it is a normal mp3 file. If a 128kbps mp3 is reported as being 22.05KHz in iTunes, it is more than likely an mp3pro file.



QUOTE (lvqcl @ Aug 9 2008, 14:38) *
kornchild2002, both left and right channels have samplerate=44.1 kHz in this case.


Oops, I don't know why I made so many mistakes in my other post. Yes, audio CDs are encoded at 44.1KHz per channel. I think I had too many Wiki windows open and was all confused.
lvqcl
QUOTE
So far the only one who has presented a solution was lvqcl, but it requires to purchase special software for it.


Winamp 2.xx + in_mp3pro plugin. It's a free solution.

1) Install Winamp and mp3pro plugin.
2) Disable built-in mp3 decoder plugin.
3) Enable mp3pro plugin.
4) Add mp3 files with samplerates <=24kHz to playlist
5) Try to play them. IIRC mp3pro plugin adds some string to playlist entry for mp3pro files.
chrizoo
Thanks again lvqcl, I tried it and that works, too. Great!! Very happy about this.

QUOTE (j7n @ Aug 10 2008, 07:22) *
There is no "file header" in an MP3 stream.
Maybe not in the stream, but the mp3pro file surely has a file header and I thought it might have a special byte sequence somewhere which would identify it unambiguously...
QUOTE
Apparently Mp3Pro 'detection' process is more complex than it would seem because somebody has managed to patent an implementation.
Gosh, yes. Incredible. This format gets more and more on my nerves ... tongue.gif
gasmann
QUOTE (chrizoo @ Aug 9 2008, 18:26) *
QUOTE (gasmann @ Aug 9 2008, 11:46) *
easiest way I see to be absolutely sure about it: 1) open the file in an mp3pro-capable player and look at sample rate 2) open the same file in an non-mp3pro-capable player and look at sample rate. if both match, it is an standard mp3, if sample rate in 1) is twice of sample rate in 2), it's an mp3pro. edit: @kornchild2002: checked, foobar2000 can't distinct. It just detects an ordinary mp3 with, in my case, 22050Hz instead of 44100Hz.

Thanks. If it worked, it would be quite complicated to check with multiple applications and compare (and also needs additional software installed). I'd rather have a fast and reliable way to see it... for example by looking for a special byte-code at the beginning of the file (signature) with a hex-editor. Like JFIF for a jpeg file. Or another easy method.
But actually your method does not work reliably, because even with normal mp3 files (not mp3pro) players sometimes display different sample rates. This happens particularly often for mpeg 2 layer 3 files.


Okay, I didn't expect you to use buggy mp3 players. Normally this procedure works fine.

QUOTE (kornchild2002 @ Aug 10 2008, 10:06) *
Right. I guess I should have said that mp3's are normally reported as being 44.1KHz unless they are encoded at low bitrates or have been forced to lower sample rates. I am not sure which bitrate will cause Lame to start resampling down to lower levels though. Still, if a 128kbps+ mp3 is reported as being 44.1KHz in iTunes, it is a normal mp3 file. If a 128kbps mp3 is reported as being 22.05KHz in iTunes, it is more than likely an mp3pro file.


Hah! So the problem lies in the "more than likely"! He wanted a definite answer.
chrizoo
QUOTE (gasmann @ Aug 10 2008, 12:59) *
Okay, I didn't expect you to use buggy mp3 players.
so your different apps always display the same values (sampling rate, bitrate, etc.) for mpeg 2 layer 3 files ? Congratulations. That's not my experience.

QUOTE (kornchild2002 @ Aug 10 2008, 10:06) *
Hah! So the problem lies in the "more than likely"! He wanted a definite answer.

that also crossed my mind, yes ... smile.gif
but in the thread I linked to above, I think we have found one. At least for people who don't use normal mp3 files with sampling rates below 44.1 kHz. Because from what I've gathered there, mp3pro files have a maximum sampling rate of 22.05 kHz plus spectral band replication data which is discarded by not-mp3pro-enabled-players. So the latter only display 22.05 kHz for those files and if you don't deal with files below 44.1 kHz, you know 100% for sure that it's either an mp3pro file or a standard mp3 file with not enough quality and in either case I would delete the file.

Well, it's not quite the method I had hoped for, but I think it won't get any better than this ...
j7n
What do you mean by different sampling rates? I have never encountered a file which caused a decoder to play faster or slower than it's supposed to, except if sampling rate changes during the file (bad stream).

Mp3pro sampling rates can be 16000, 22050, 24000 + SBR.
These rates indicate a regular mp3 file: 32000, 44100, 48000.
chrizoo
QUOTE (j7n @ Aug 10 2008, 15:38) *
What do you mean by different sampling rates? I have never encountered a file which caused a decoder to play faster or slower than it's supposed to, except if sampling rate changes during the file (bad stream).
I have never said anything about faster or slower nor "changes during the file". All I said is that when encountering mpeg 2 audio layer 3 files, I've often experienced that different applications show different information.

QUOTE
Mp3pro sampling rates can be 16000, 22050, 24000 + SBR.
Not if you ask a mp3pro-enabled-player. He will tell you a different story.

QUOTE
These rates indicate a regular mp3 file: 32000, 44100, 48000
Mp3 files can also have other rates. But yes, basically that was my question. If it's 100% sure that a mp3pro file will never be shown as 44.1 kHz in a non-mp3pro-enabled-player, than at least we can say that a file with a lower sampling rate is either mp3pro or an normal mp3 with not enough quality (if the user's accepted minimum is 44.1 kHz).
kornchild2002
QUOTE (chrizoo @ Aug 10 2008, 18:00) *
Mp3 files can also have other rates. But yes, basically that was my question. If it's 100% sure that a mp3pro file will never be shown as 44.1 kHz in a non-mp3pro-enabled-player, than at least we can say that a file with a lower sampling rate is either mp3pro or an normal mp3 with not enough quality (if the user's accepted minimum is 44.1 kHz).


That is the point that I have been trying to get across. mp3pro files will never, ever, ever, ever be displayed as anything higher than 22.05KHz (or maybe 24KHz depending on the encoder) in non-mp3pro compatible software. My screenshots of iTunes showed this. The only thing is that Nero's mp3pro encoder can only go pu to 96kbps. I would have tested 128kbps and 160kbps just to see what the sample rate were (I am guessing that they still would have been 22.05KHz) but I don't have any software previously installed on my computer other than Nero that can encode mp3pro files without downloading some extras.

There are sometimes whenever Lame encodes at a lower sample rate but I don't think that it normally encoded at 22.05KHz for any bitrate. I know that the sample rate drops down to 32KHz for 96kbps and then 16KHz for 32kbps. I don't think Lame uses 22.05KHz unless someone enforces it. Then again, I could be wrong. The main thing is that mp3pro files will be displayed as having a sample rate of 22.05KHz (or 24KHz) in non-mp3pro compatible software.
j7n
QUOTE (kornchild2002 @ Aug 11 2008, 04:45) *
The only thing is that Nero's mp3pro encoder can only go pu to 96kbps. I would have tested 128kbps and 160kbps just to see what the sample rate were (I am guessing that they still would have been 22.05KHz)

Cool Edit Pro can encode VBR MP3Pro. But the bitrate rarely climbs up to 144 or 160 kBit/s at max quality. Of course MP3 data is still encoded at ½-sampling rate.
chrizoo
QUOTE (kornchild2002 @ Aug 11 2008, 01:45) *
That is the point that I have been trying to get across.
OK, then I didn't understand what you meant, sorry.
QUOTE
mp3pro files will never, ever, ever, ever be displayed as anything higher than 22.05KHz (or maybe 24KHz depending on the encoder)
.... never ever ever ever higher than 22.05 ... but maybe 24 ... LOL biggrin.gif
QUOTE
I don't think Lame uses 22.05KHz unless someone enforces it.
The codec does what the user tells it to do (within the scope of what's technically possible of course). If the user asks the codec to do 22.05, it will do it. If you want to suggest that it's not the default settings, than you are right of course. But I've said a several times here that I'm not interested in knowing how likely or unlikely it is ... I want absolute certainties.


QUOTE (j7n @ Aug 11 2008, 02:09) *
Cool Edit Pro can encode VBR MP3Pro. But the bitrate rarely climbs up to 144 or 160 kBit/s at max quality. Of course MP3 data is still encoded at ½-sampling rate.

OK, it was never 100% clear to me, but at least I think the bottom line thus far was that the highest sampling rate mp3pro can use is 22.05 kHz + SBR.
Your statement (½-sampling rate) is different. That would mean that a .wav file with 48 kHz sampling rate would convert to a 24 kHz + SBR mp3pro file and a 88.2 kHz .wav file to a 44.1 kHz + SBR mp3pro file.

I would *love* if we could somehow once and for all establish the upper limit for the mp3pro sampling rate and I'd be even happier if there were a link to a trustworthy reference backing up that claim.
j7n
There is no 88200 Hz MP3. There would be no point in lossy encoding at this rate because the high frequencies are not audible. See my post above for valid Pro and non-pro sampling rates.

A file that says 32, 44.1 or 48 kHz in a regular player can not be Pro/SBR.
A 16, 22.05, 24 kHz file may be. Period.

I tested the mp3TYRE utility together with in_mp3pro.dll v1.2, and it indeed identified and renamed all my "Pro" files.
chrizoo
QUOTE (j7n @ Aug 11 2008, 03:38) *
There is no 88200 Hz MP3.
Please read my post. I said wav not mp3.
QUOTE
I tested the mp3TYRE utility together with in_mp3pro.dll v1.2, and it indeed identified and renamed all my "Pro" files.
Thanks a lot for reporting. I think the tool is gonna help a couple of us here.
QUOTE
A file that says 32, 44.1 or 48 kHz in a regular player can not be Pro/SBR.
A 16, 22.05, 24 kHz file may be. Period.
Okay. Good to have this stated clear and concise.

What's still open:

QUOTE
OK, it was never 100% clear to me, but at least I think the bottom line thus far was that the highest sampling rate mp3pro can use is 22.05 kHz + SBR.
Your statement (½-sampling rate) is different.
[...]
I would *love* if we could somehow once and for all establish the upper limit for the mp3pro sampling rate and I'd be even happier if there were a link to a trustworthy reference backing up that claim.
gasmann
It's NOT still open! Read j7n precisely... He said it all very well!
A mp3pro file can have 16, 22.05 or 24kHz + SBR, which results in 32, 44.1 or 48KHz, respectively.
What you want, an mp3pro with 44.1KHz + SBR is not possible, because it would result in 88.2KHz, and as j7n pointed out, there's no point in compressing lossy at this sample rate...
Therefore you CANNOT encode a 88.2KHz wav with mp3pro!
And it's ABSOLUTELY wrong that the highest sample rate mp3pro can use is 22.05kHz, it can use 24KHz, too. I remember myself encoding some dvd-video-audio, which is always 48KHz, to mp3pro back the old days *shame*, and it came out at 24KHz + SBR as expected smile.gif
Please point me to a decoder showing wrong sample rates on mpeg 2 layer 3 files. I wanna see myself. Thanks!

EDIT: To make it absolutely clear: mp3pro sampling rate is ALWAYS either 16KHz, 22.05KHz or 24KHz + SBR. Nothing else is possible. So, as j7n already said, you can be ABSOLUTELY sure that a mp3 showing up with a different sampling rate in your decoder is NOT an mp3pro.
[JAZ]
First: Mp3pro is dead (I believe it was more an experiment before HE-AAC could get standarized).

Mpeg 1 layer 3:
Sample rates: 32Khz, 44Khz, 48Khz,
bitrates: from 32kbits to 320kbits.

Mpeg 2 layer 3:
Sample rate: 16Khz, 22Khz, 24Khz
from 8kbits to 160kbits.

So-called Mpeg2.5 layer 3:
Sample rate: 8Khz, 11Khz, 16Khz.
from 8kbits to 160kbits.


Mp3Pro uses mpeg 2 layer 3 to encode the mp3 portion of its data, and on playback, doubles that sampling rate. This is also why an mp3pro's theoretical max bitrate is 160kbps.

The higher part of the frequency spectrum (which cannot come from the mp3) is filled with data generated from the SBR-like information stored in the ancillary data. For a 64kbps mp3pro, around 5~10kbps are from ancillary data, and the rest is mp3 data.

You can be almost certain that there is no implementation of mp3pro using mpeg1 layer 3 for the mp3 data. The "almost" is there just for the sake of not knowing it, but with HE-AAC, there's the possibility to use SBR on input signals of more than 48khz, although i haven't found any information on the subject right now. It may not even be a standard (yet?)



OUCH!! Anyone said MP2PRO ? :S http://www.codingtechnologies.com/products/layer2.htm
chrizoo
QUOTE (gasmann @ Aug 11 2008, 18:29) *
It's NOT still open! Read j7n precisely... He said it all very well!
Yes, sorry, now that you say that, I've read through the whole thread once more and yes, j7n said 24kHz is the top limit, if his statement "Mp3pro sampling rates can be 16000, 22050, 24000 + SBR" was meant to be "exclusive". I got confused with two other threads which suggested 22.05kHz is the top limit.
QUOTE (gasmann @ Aug 11 2008, 18:29) *
there's no point in compressing lossy at this sample rate... Therefore you CANNOT [...]
the fact that there is no point (sense) in doing something is completely independent of and not a proof for it not being possible.

QUOTE (gasmann @ Aug 11 2008, 18:29) *
Please point me to a decoder showing wrong sample rates on mpeg 2 layer 3 files. I wanna see myself. Thanks!
I believe I had some cases, please subscribe to this thread and the next time I encounter this problem, I'll post here.

QUOTE (gasmann @ Aug 11 2008, 18:29) *
To make it absolutely clear: mp3pro sampling rate is ALWAYS either 16KHz, 22.05KHz or 24KHz + SBR. Nothing else is possible. So, as j7n already said, you can be ABSOLUTELY sure that a mp3 showing up with a different sampling rate in your decoder is NOT an mp3pro.
OK, wonderful. I am feeling relieved. I felt so contaminated by the (remote) possibility of taking mp3pro files for regular mp3 files that I almost felt as if the pro files could "infect" the regular ones ... (just joking).

Now if someone still has a link/reference to back up the claim that 24kHz is the top limit, now that would be most wonderful !!
chrizoo
QUOTE (JAZ @ Aug 11 2008, 18:38) *
First: Mp3pro is dead
Yes, the only problem is that some files are still floating around and I want to be able to identify them 100% for sure, so that I don't get "infected" smile.gif


Anyway, thanks a lot for this good explanation [JAZ], I understand the issue a bit better now. I feel rather confident now, that chances of confusing a 44.1+ kHz mp3 with any mp3pro file are very low.
It's just a little distressing for me that I can't be 100% sure.
Looking back through the thread, there were some good explanations. Most notably yours. The bottom line is - at least so far - as you said yourself : "you can be almost certain".

If someone is able to change "almost certain" to "100% certain" by quoting official references and/or by logical reasoning that proves that any other possibility cannot exist, feel *VERY* welcome ...
chrizoo
QUOTE (j7n @ Aug 10 2008, 07:22) *
There is no "file header" in an MP3 stream.

What about :

QUOTE (http://en.wikipedia.org/wiki/Mp3)
An MP3 file is made up of multiple MP3 frames, which consist of the MP3 header and the MP3 data. This sequence of frames is called an Elementary stream. Frames are not independent items ("byte reservoir") and therefore cannot be extracted on arbitrary frame boundaries. The MP3 data is the actual audio payload. The diagram shows that the MP3 header consists of a sync word, which is used to identify the beginning of a valid frame. This is followed by a bit indicating that this is the MPEG standard and two bits that indicate that layer 3 is used; hence MPEG-1 Audio Layer 3 or MP3. After this, the values will differ, depending on the MP3 file. ISO/IEC 11172-3 defines the range of values for each section of the header along with the specification of the header. Most MP3 files today contain ID3 metadata, which precedes or follows the MP3 frames; this is also shown in the diagram.




You see there are special bits indicating the mp3 standard or the presence of layer 3.
I was hoping that there was a byte-sequence or at least bit somewhere that would unambiguously reveal the mp3pro file.
j7n
Now you are describing the frame header. There is simply not enough space in each frame to write a magic number as in JPEG: two bytes. Two bytes equal 0.67 kBit/s at 48 kHz, which is alot since MP3Pro usually comes between 32-96 kBit/s.

You can see for yourself that the frame header itself is not a unique magic number. It contains fields of data that indicate the stream's format.

In order for you to be able to reliably scan across directories in search for MP3Pro files there should be at least 4 bytes of data unique to this format.
chrizoo
Ok, but I thought maybe the beginning of the file (let's leave aside the id3 tags for now) would be somehow special/different than the rest of the file ... If there are no id3 tags, does the file start right away with the mp3 header of the first frame?
j7n
Yes, it does. With the exception of VBR files, which may start with one of two special kinds of a frame. It indicates variable bitrate and allows to compute the length of the stream. Still you cannot just search for "Xing" or "VBRI" to find VBR files, because this frame might be absent.
chrizoo
So the very first bit of a CBR mp3 file is actually the first bit of the mp3 header of the first frame ?
pdq
As said above, if there are no ID3 V1 tags or special (VBR) frames then the file starts with the first frame of audio data.

Edit: I meant to say ID3 V2. ID3 V1 goes at the end of the file, not the beginning.
chrizoo
So is my last statement true? [yes/no]
j7n
True. Or you could just consult a hex editor and answer the question yourself. The 'sync word' and 'layer' makes recognizable byte values of FFFB for MPEG-1. If you train the eye to see these values, you'll learn how to cut and paste MP3, MP2, AAC, AC-3 and DTS streams without decoding and loss of quality.
gnypp45
QUOTE (chrizoo @ Aug 12 2008, 13:59) *
So is my last statement true? [yes/no]


Why don't you have a look yourself using a hex editor? wink.gif
pdq
MP3 was designed to work well in a streaming environment, where playback can begin anywhere within the data. Because of this, every frame must be self-contained in terms of identifying itself as to type and encoding, so the amount of bits dedicated to this must be very small to keep the overhead as low as possible. Even a few extra bits to identify MP3 Pro vs. standard MP3 would be significant. If you were to put this extra information in a single "header" at the start of the file then in a streaming environment it could be missed completely and the data would be decoded incorrectly.
chrizoo
QUOTE (gnypp45 @ Aug 12 2008, 12:58) *
Why don't you have a look yourself using a hex editor? wink.gif
I know hex, I would recognize a constant pattern of course, the structure of the mp3 audio frame is not that easy (at least for me). I opened some mp3's in my hex editor, but they were all very different. I guess I would have had to do some calculations and add up the bits as shown in the image above.


QUOTE (pdq @ Aug 12 2008, 13:05) *
it could be missed completely and the data would be decoded incorrectly.
OK, your point concerning the overhead is perspicuous. If the identification bit is only at the beginning of the file, yes, it would be lost if you stream and miss the beginning.
But it has no disadvantages compared to the current situation, because for offline files you would be able to identify them as mp3pro and for streaming, well, if you miss the beginning you're right, you don't get the identification bit then, but that's exactly the current situation, where the mp3pro-enabled-decoder plays the additional SBR info and all other decoders play only the mp3 part. So for streaming it's exactly the same and for offline files you have an advantage in my view.
But it's useless to discuss this anyway, as apparently, no byte sequence or ID-bit exists for mp3pro.


QUOTE (j7n @ Aug 12 2008, 12:56) *
True. Or you could just consult a hex editor and answer the question yourself. The 'sync word' and 'layer' makes recognizable byte values of FFFB for MPEG-1. If you train the eye to see these values, you'll learn how to cut and paste MP3, MP2, AAC, AC-3 and DTS streams without decoding and loss of quality.
Thanks for confirming. And the extra info. Yes, I'll try to learn this. In which situations have you used it so far?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.