Bitrate Peeling with Ogg Vorbis
Yort writes "Thought this might be interesting to some audiophile /.ers - there's been some discussion on the Ogg Vorbis lists, summarized in the most recent Ogg Traffic, about "bitrate peeling". In short, it's where you can simply "peel off" the high resolution data from the ends of an audio stream packet to come up with a smaller, lower quality stream. Brings up a number of geek-cool opportunities."
"Beni Cherniavsky mentioned a very intriguing counterpart to bitrate peeling. If you have a peeler that saves the bits it chopped off, you could reconstitute the higher quality files by adding the missing bits to the lower quality file. This idea could lead to a music download service where you can download a low quality preview version of a song, and if you are interested, download the missing bits to make it a high quality version."
Or, Slightly modified, You could share all your high quality oggs on a P2P network, and have your client peel it down to 'future-legal-to-share' low quality files.
Pain lasts, kid. Its how you know you're alive. Sometimes I think this growing up thing is just pain management-TheMaxx
Well, you should try then one simple test, that I did for myself and my friends. I just ripped a track of one of my favorites CD and encoded it with my favorite MP3 encoder (lame) to 160, 192, 256 kbps. I then burned a new CD-R with four tracks (original, 160, 192 and 256) in a random order. Since then, I'm looking for someone to be able to put those tracks in the right order.
No one has been able to until then, and I'm not only talking (only) about average people. I have some friends which (unlike me) have a decent equipment.
Usually these guys were able to clearly distinguish 160kbps from the set. With 2-3 pass they detected the 192kbps track and they couldn't tell the difference between the 256kbps and the original.
Maybe I could send you guys some samples...
Just keep in mind also that MP3 is the same type of compression than DTS & AC3 (Dolby Digital) and I've never heard someone complain about those (especially DTS). If you're unhappy with quality, just increase bitrate. And if those guys in the MPEG consortium felt that 320kbps should be the maximum, It should mean something.
Lossless compressors have such a poor ratio!
Write boring code, not shiny code!
One thing that hasn't been discussed here is that a lot of people feel that Vorbis is transparent at something like quality setting 4. Other people think it's transparent at quality setting 3. Others think it's great at 1. I release my stuff at 4, but bitrate peeling will let people peel those down to what sounds good to them. Maybe they want to monkey with it, and maybe they don't, but the option to do this without re-encoding is sexy.
It's not just a 'chop it down for modem folks' thing, it's also a letting people choose for themselves situation that I think is more important.
Features are cool, but features that give people options apart from 'use it or not' are even cooler.
That's it for me. Please donate to Xiph.org, and then go listen to some tunes. Enjoy!
Scalable techniques like this are very cool, but hardly novel.
MPEG-4's scalable profiles provide a similar effect (albeit in the other direction, with enhancement layers). Some of the higher end audio codecs (beyond CELP and AAC), like ER BSAC (Error Resistant Bit Sliced Arithmetic Coding) do exactly this. The idea in this case is that the server will in real-time only provide as many bits as the connection can currently provide. Very nice for wireless.
QDesign's QDX format does almost exactly what is described for Ogg, with arbitrary bitrate peeling down to the 1 Kbps level. The idea is that you could copy as much data as you want to your mobile player, and it'd dynamically thin to the data rate that would fill up your device.
And still image codecs like JPEG have used progressive modes for years, where additional data adds more detail to the image.
My video compression blog
Okay, if each one is double the one before, that means you'll have a 2^100 ratio between lowest and highest data rate. Thus, if your lowest is 1 Kbps, the highest would be... Not going to happen that way.
Also, you assume the sweet spots are 2x the one before. In fact, jumps of more like 1.25 are likely to be optimal (albeit with a lot fewer jumps!).
My video compression blog
Could it possibly be used to progressively download an Ogg file and begin listening to it before it's 100% done? For example, have the 32kbit quality at the start of the file, then next have the next 32kbit (starting at the end of the file), then the next 64kbit, etc...
Luke-Jr
There aren't ANY free lossy codecs that can do bit-peeling right now. Some non-free codecs allow you to overlay data (like progressive JPEG), which is NOT the same thing. That's just like transmitting deltas at higher compression rates, which could be done with a simple side-band for any existing method, MP3 even.
The only option is transcoding, which compounds compression errors (decode, reencode). I often wished the MPEG group would have been more intelligent in the design of their bit-allocater so that you could "thin out" the quantization of the power bands by looking at the "right parts" of the MP3 frame. Alas, this is not possible.
But the Vorbis designers have made this possible, thus making it possible to have high-quality and low-quality versions derived from the same source file without additional processing. I imagine you have certain restricted choices, due to how quantization information is bundled up/packeted. But it isn't just sexy, it would be stupid to NOT DO IT. It takes just a little forethought on how to lay out the information in a hierarchial fashion. What makes anyone think that this is any harder then decoding/reencoding. I guarantee it has a time complexity on the order of a straight copy.
Hell, formats like SHN and FLAC can do it, just substitute short codes for long codes at a certain rate; it'll add a bit of wide-band energy on decode, raising the noise floor in proportion to the space savings you gain.
So anyway, "poop on you" to all these wanna-be audiophiles/slashdot-know-it-alls who don't no a good thing when they see it.
Don't like it, keep sucking on that Layer III.
THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
Interestingly enough I find that MP3 can even give superior sound to CD if encoded and decoded properly. MP3s don't have a set word size like PCM audio does, they just take the data they are given. Good encoders, like LAME, are perfectly capable of taking 24-bit files as input. At high bitrates (256-320k) I find that the compressed MP3 sounds superior to a 16-bit PCM file when taken from a 24-bit source, despite being smaller.
/ . It offers good 24-bit decoding in Winamp, which I happen to really like as a player.
By the way, you might want to check out the MAD Winamp plugin at http://www.mars.org/home/rob/proj/mpeg/mad-plugin
I think that the iPod does a very bad attempt at this. MP3s, encoded at 320k play back really badly on the iPod, far worse than 128/192k ones. I suspect that the iPod hardware hasn't enough horsepower - and it is discarding bits that it cannot decode fast enough. The MP3s sound fine on the pc, or decoded to wav and then played back on the iPod. But played back (as MP3) on the iPod, the result is dismal - there's a 5Hz "wobbling", rather like a steel band, and lots of distortion. (Apple won't help, but I have replicated this problem on multiple setups both Linux and OSX - it would be interesting to see if any /.ers have seen the same thing. You need a good recording of a classical CD with very large dynamic range eg Mahler 8, part II to demonstrate it - listen to the quiet bits.)
[I have some demo files, but can't link them - I'll get slashdotted off the net !]
Peel layers from a data file thin enough that no layer is independantly recognizable. Scatter the layers throughout a P2P system. Now no individual user possesses the whole file, but all users can reconstruct a working copy when they want to play it.
That Jesus Christ guy is getting some terrible lag... it took him 3 days to respawn! -NJ CoolBreeze