Question about audio formats

Just an addition. Seeing as how I think I might have discovered the header… I copied and pasted the first 7 bytes of the mp3 over the first 58 bytes of the wav, renamed the wav to .mp3 and wow! it works! The big test however is if it streams… and what better way to test this than chopping bits and peaces, adding random data, and removing the end half of the once a wav? Works perfectly - with a few skips and blips. I copied part of the file over a few times and got a really cool skipping effect tho, so my time wasn’t wasted! :slight_smile:

>> this leads me to believe that the data inside the wav I made with the included with sound recorder (MPEG layer-3, just above PCM) is infact a real honest to god mp3 stream with a RIFF header

Krurst, that is exactly my point and I think you may have misunderstood what I said. A WAV file created with the same codec carries exactly the same audio informationas the .MP3 file. That is what I have been saying all along. It is the formatting information which is different.

Just renaming a .WAV to .MP3 does most certainly not make it an .MP3 file. Audio programs may still recognise the contents correctly but the file formats are different and renaming does nothing to change one to the other.

Now, a streaming file format is one which repeats the encoding information periodically so that you can start decoding in midstream even if you missed the beginning (like internet radio or video). I believe we all agree here that .WAV file format only contains this information once in the header and therefore is not a streaming format.

So the question is whether the .MP3 file format does or does not repeat the information i.e.: whether it is a streaming format or not. I have always believed that it was a streaming format but after searching online I cannot find the definition of the format. Maybe someone can find it. It seems some people use streaming erroneously so maybe they say MP3 is a streaming format when it really isn’t.

I have no personal experience with MP3 as I always use WAV which is much easier to create with audio programs and most widely accepted by other computers out there with no need for special players.

I understand fully “Just renaming a .WAV to .MP3 does most certainly not make it an .MP3 file. Audio programs may still recognise the contents correctly but the file formats are different and renaming does nothing to change one to the other.” its the header or “formatting” of the file that makes it (unless its a raw image, but never mind that…) but I’m saying that the wav player is just passing off all the bonafide mp3 data in the wav to the codec. great if you want the compatability of wav, but the mp3 header can have an id3, and people will have a program that’ll play mp3’s if they have the codec i.e. media player or I.E.

I just tested this, and yes, the wav file I created with sound recorder works with the first quarter cut off. I’m now down to 1/4 left of the original wav file. only works in winamp though. hasn’t worked in sound recorder since I stipped the wav header.

Krurst, I think we all agree that .WAV and .MP3 are different formats which will contain the same useful audio information if it was generated with the same codec but the header and other accessory information is different and therefore a WAV is not an MP3 “wrapped” in a WAV. A WAV is generated totally independent of a .MP3. In fact, I cannot create MP3s myself but I can create MP3 encoded WAVs. So we agree they are different formats.

I have the WAV specs and I know it only carries the format info in the header and, so, it cannot be used for streaming because if you tune in at mid stream your receiver has no way of knowing what it is receiving.

The question now is whether .MP3 is a true streaming format or not, in other words, if it will repeat the encoding information periodically. This is totally independent of the codec and solely dependent on the file format specs which I have been unable to find online. I have often been told .MP3 is a streaming format which, if true, means the information is repeated along the file but it is possible people are using the term incorrectly. So the question that needs to be answered definitively is whether MP3 is or is not a streaming format.

In any case, I find MP3 encoded WAVs much preferable for several reasons: I have never had anyone tell me they had any problem opening such files. Also they can be edited and processed using any number of programs while you need specific MP3 programs for .MP3 files. I find WAVs are much more universally accepted.

pst! hey, Kid ,
I think they might be at this a while. Wanna go grab a beer?

yeah, ahh sorry about the hyjack, but the first reply answers the OP pretty well - stating the best quality/avaliability format, a link to the encoder and settings to allow people to stream the music straight of the site. I just got a little riled up when sailor suggested a non streaming format for a 50-odd byte space saver (which isn’t really a space saver) and goes on to say that the MP3 codec doesn’t produce data.

http://www.iso.org/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=22412 has the full mp3 standard if you’re willing to pay…

http://www.dv.co.yu/mpgscript/mpeghdr.htm has a decent description of the mpeg header standard, which mpeg layer 3 (mp3) is part of and goes on to say

it does go on to say this is not 100% correct for mp3, but its correct enough for out purpose (and I tested this, remember?)
this is part of the mp3 standard and would require large rewrites to change this. All that the “MPEG layer 3” codec is doing is generating a mp3 stream, sound recorder adds on a header which will tell any wav player that supports windows codecs to send the data to this codec for play. In effect an MP3 “wrapped” in a WAV header. I’m sure you can get software to add this header, as that codec gives IMHO very bad quality as an encoder complies with the standards and so will play an mp3 stream made by any encoder (even lame!).

The wav header is only put in once, and can’t be streamed, but the mp3 data inside the wave has headers every fame, and therefore can be (if that makes sense?).

I’ve also never had anyone tell me they can’t play an mp3, and I’m pretty sure windows 98 and below didn’t include the codec by default. In fact I’m pretty sure it doesn’t come with 2000 or xp either, which is why they included one with the DIVX codec (you need wav audio in avi’s). You can also make ogg wavs, and even ac3 wavs if you have the right codec.

The reason most audio editing software won’t open mp3s, is because mp3 is lossy. You don’t want to keep compressing and decopressing mp3 audio - it’ll sound terrible! Most good wav codecs are lossless (basically like a wav in a zip) and can be open and saved without any quality loss).

If you really want a non streamable file to save space, try a variable bit rate mp3, which changes the bitrate in the header of each frame! The “MPEG Layer 3” codec supports playing this - all the divx’s I make have a lame encoded VBR soundtrack.