the Vorbis FAQ says: "mid to high quality (8kHz-48.0kHz, 16+ bit, polyphonic) audio and music at fixed and variable bitrates from 16 to 128 kbps/channel." What is the difference between Hz and bitrate? Doesn't MP3 support higher bitrates? Pointers for more reading are welcome.
> the Vorbis FAQ says: > "mid to high quality (8kHz-48.0kHz, 16+ bit, polyphonic) audio and music > at fixed and variable bitrates from 16 to 128 kbps/channel." > > What is the difference between Hz and bitrate?The kHz measurement refers to the characteristics of the original audio being fed to the encoder, and similarly to the decompressed audio output by the decoded. The bitrate refers to the average number of bits per second used to encode the compressed data itself. An average case would be 44.1 kHz, 16-bit stereo input, which is literally 1411.2 kbps. A typical bitrate for compressed audio is 128 kbps, which is right about elevenfold compression. Then the 128 kbps Vorbis file is uncompressed during playback to a 44.1 kHz, 16-bit stereo signal. Put differently, the uncompressed input is 1411.2 kbps, aka 44.1 kHz, 16-bit stereo. The compressed file uses 128k bits per second to store the 'same' audio. And that file decompresses to 1411.2 kbps again. Vorbis supports inputs as low as 8 kHz, 16-bit mono, and as high as 48.0 kHz, 24-bit (I think) 5.1.> Doesn't MP3 support higher bitrates?Not really. Note that the bitrates listed are *per channel*, so 128 kbps per channel for a stereo file will result in a 256 kbps total bitrate. And I just encoded a random WAV file into Vorbis at quality 10 (the max), and the resulting file averaged 470 kbps (235 kbps per channel), so I think that maybe the FAQ is in error there. Or maybe I'm doing something wrong. Note that quality 10 is definitely overkill; I haven't encountered ANYONE who could successfully ABX Vorbis audio at bitrates higher than 256 kbps.> Pointers for more reading are welcome.I always love selfishly pointing people to my "Introduction to Compressed Audio with Ogg Vorbis", which is a bit dated but still a good intro to the major concepts involved: http://grahammitchell.com/writings/vorbis_intro.html -- Graham Mitchell - computer science teacher, Leander High School "Come thou no more for ransom, gentle herald. They shall have none, I swear, but these my joints, which if they have as I will leave 'em them, shall yield them little." - Henry the Fifth
James wrote:> the Vorbis FAQ says: > "mid to high quality (8kHz-48.0kHz, 16+ bit, polyphonic) audio and > music at fixed and variable bitrates from 16 to 128 kbps/channel." > > What is the difference between Hz and bitrate? > Doesn't MP3 support higher bitrates? > > Pointers for more reading are welcome. >The sampling rate (quoted in Hz) is the rate of sound samples; a sound wave is a continuous signal, but computers can only record points (single numbers), so you sample those at some frequency to get a discrete signal. (In playback through a soundcard it gets converted back to a continuous signal, which is why the 'stepped' signal picture that Creative use to promote 24/192 equipment is a bit misleading) <http://en.wikipedia.org/wiki/Sampling_rate> <http://www.saecollege.de/reference_material/pages/Recorders.htm> In raw sound files (such as wavs) the data rate is directly coupled to bit rate, because they simply record the signal value at each sample: 2channels * 16 bits per channel * 44.1kHz gives 1411.2kbps for CD audio. Lossless codecs like FLAC use compression to reduce the bitrate while retaining the unmodified sample values (so the signal is the same as a raw format records). I have a FLAC file here that averages 857kbps, there is an argument to be made that this represents the amount of information in the recording. Lossy codecs like Ogg and MP3 attempt to throw away parts of the sound that your ears can't detect (eg, your hearing has very low frequency resolution at high frequencies). They then do straightforward compression on the result. The amount of information they retain determines the bitrate of the final file. I can't find the quote you give in the current version of the FAQ, but a Q10 encode of the same file gives a 468kbps bitrate (therefore 234kbps per channel). I don't know how high mp3 bitrates can go (I think they may suffer from tighter technical restrictions than Ogg/Vorbis - but I seem to remember seeing upwards of 200kbps ie 100kbps per channel). The following are relevant reading for Vorbis as a lossy codec. <http://www.vorbis.com/faq/#lossy> <http://en.wikipedia.org/wiki/Vorbis> Finally, the technical background for most lossy codecs: <http://en.wikipedia.org/wiki/Modified_discrete_cosine_transform> (http://www.xiph.org/ also has some detail on the MDCT, probably under the documentation link) Fraunhoffer page, just don't pay attention when it claims mp3 is CD quality at 128kbps: <http://www.iis.fraunhofer.de/amm/techinf/layer3/> I also seem to remember discussion (on this list?) about 192kbps in Ogg/Vorbis (although I have Opinions on the usefulness of that). -- imalone ?
James wrote:> the Vorbis FAQ says: > "mid to high quality (8kHz-48.0kHz, 16+ bit, polyphonic) audio and music at > fixed and variable bitrates from 16 to 128 kbps/channel."hmmm, I actually think those numbers need to be revised.> What is the difference between Hz and bitrate?hmmm. This is going to take a bit of explaining. I'm not an expert on the technicalities, but I understand it enough to try and describe it. Hz is probably not a good term to use, but it's become a standard so we will. The true count is samples per second. To represent a sound, you need to take a snapshot of audio, called a sample. Actually, you need two snapshots or samples before you can do anything. Since sound is a series of vibrations, you need to be able to capture both the on and off nature of a given vibration before you can reproduce it. This means that the higher the sound you want to record digitally, the more samples you need to take. 8000 samples per second will be able to reproduce sounds of up to 4000 vibrations per second, the kind of signal you get over a telephone line. If you want to represent the theoretical limit of human hearing, 20000 vibrations per second, you need at least 40000 samples per second. This is where the CD standard of 44100 samples per second (or Hz) comes from. Note that I think it's more complicated than this, hence the extra 4100 (I'm sure someone else on the list will explain this). It's a bit like frame rate with video. If you record something at 15 fps, movement will look jerkier than movement recorded at 30fps, etc. Except in the case of audio, the lower the rate, the more muffled it will sound. Bit rate is simply a measure of data, or at least data per second. With uncompressed audio, there is a direct relationship between the sample rate and the amount of data it takes to represent that sample rate. A 44.1kHz 16-bit stereo signal takes 1411.2 kbps, or approximately 10.4 megs per minute to record. A 44.1kHz 16-bit mono file would take half of this, as would a 44.1kHz 8-bit stereo file or a 22.05kHz 16-bit stereo file. I won't get into a discussion of bits per sample, just to say that samples of lower bit depth are noisier than samples of higher bit depth. Now, formats like Ogg Vorbis and MP3 compress audio by making calculated guesses about the sounds humans aren't likely to hear. As part of this process, such formats allow us to make some of the decisions by deciding how much to throw away, or to put it more simply, how much data to use to represent the original sound. So, using our 44.1kHz stereo sample, We can choose to use as little as 48kbps or as much as approx 500kbps to store this sound. At 500kbps, more of the original sound should be present than at 48kbps. This is also why we can go lower with lower sampling rates. A 44.1kHz mono sound or a 22.05kHz stereo sound is less complex than a 44.1kHz stereo sound, and is therefore easier to store. Also note that a file's bit rate is simply an indicater of data size. You can, for example, have a 64kbps 44.1kHz stereo sound, or a 64kbps 22.05kHz stereo sound, or a 64kbps 44.1kHz mono sound. All will take up the same amount of disk space. But the first file will be using less data to represent more complex sound than the other two. So at lower rates, one needs to decide whether it's better to have higher complexity sound represented more poorly, or lower complexity sound represented more accurately. And of course, when you get lower, you also have to decide whether it's better to have say 11.025kHz stereo sound, or 22.05kHz mono sound, at a given rate. ONe more comment about bit rates and sound quality. Bit rates are, as I've said above, merely a measure of quantity of data. This means that it's only at all valid to compare bit rates of a given codec to itself. Encoding at 128kbps may be overkill with one codec, and insufficient with another. Especially with MP3, even the sound quality that you'll get at a given bit rate will vary from encoder to encoder. So ultimately, unless you need to use a specific data size (e.g. for streaming), the best measure of how good something sounds is to listen to it and see.> Doesn't MP3 support higher bitrates?Yes, and so does Ogg Vorbis. Quality 10 in the Xiph encoder aims at approx 500kbps for a 44.1kHz stereo sound. I've only ever seen MP3 go to 320kbps, but there may be encoders which go higher. But it's all a matter of how much data you want to represent a sound - you could write an encoder which uses 4 times the uncompressed bit rate for storage, but there wouldn't be much point. It's only an indicator of how much data is being used to store the sound. Geoff.