Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Ogg bitrate peeling (Read 8006 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Ogg bitrate peeling

Using Ogg and I like it a lot. One thing I haven't found though is how to change the bitrate without reencoding. Is this already supported in the 1.0 specs?

Merg

Ogg bitrate peeling

Reply #1
Don't know about the specs, but as far as I know it is in principle supported, but not yet implemented.
Juha Laaksonheimo

Ogg bitrate peeling

Reply #2
Hi,
Tom Daschle here, of the U.S. Senate.  Senate majority leader, actually.  And I'm from South Dakota.  Anyways, in response to your query, yes, there is, in fact, a bit peeler program for the Ogg Vorbis technology.  In fact, there are three such programs, available at this site.  There is a smart peeler and a dumb peeler.  The dumb peeler when compiled produces two binaries.  You will find the sound quality completely unacceptable with any of these peelers.
Sincercely,
Tom Daschle
Senate Majority Leader of the 107th Congress
P.S.  We here at the U.S. senate are highly excited about the recent Ogg Vorbis 1.0 release and we plan to incorporate its use into Senate and House proceedings, as well as U.S. federal government operations.

Ogg bitrate peeling

Reply #3
Quote
Originally posted by tomdaschle
In fact, there are three such programs, available at this site.  There is a smart peeler and a dumb peeler.  The dumb peeler when compiled produces two binaries.  You will find the sound quality completely unacceptable with any of these peelers.
Yep, but those peelers are quite old, very experimental and preliminary.
Quote
Sincercely,
Tom Daschle
Senate Majority Leader of the 107th Congress
P.S.  We here at the U.S. senate are highly excited about the recent Ogg Vorbis 1.0 release and we plan to incorporate its use into Senate and House proceedings, as well as U.S. federal government operations.
Yeah, sure.
Juha Laaksonheimo

Ogg bitrate peeling

Reply #4
Quote
Originally posted by tomdaschle
Sincercely,
Tom Daschle
Senate Majority Leader of the 107th Congress


Hmm... It appears that our senate leaders can't spell the word "Sincerely"  Seriously though, what could have possibly made you want to pose as a senator?

Ogg bitrate peeling

Reply #5
Okay, I tried to compile and use the peelers actually, but wasn't very succesful until now.

Compiling the dumb peelers package gives you two binaries peel1 and peel2, compiling the smarter peeler package gives you only 'peel'.
I didn't look at peel1 and peel2 yet, but if they're even dumber than peel...

'peel' has its target bitrate (15000 by default) hardcoded in its peel.c and expects input from stdin and gives output to stdout. I tried to cat test.ogg | peel and got something, but don't know what to do with the stuff from stdout.
I didn't understand what the program actually does, but since it didn't really work anyway...

dev0
"To understand me, you'll have to swallow a world." Or maybe your words.

Ogg bitrate peeling

Reply #6
It worked!
I finally peeled a -q 5 file down to 15 kbps (cat test.ogg | peel > peel.ogg).
The files (source + peeled) will be available here.
The result sounds like sh**, but I will continue testing with different target bitrates.

dev0
"To understand me, you'll have to swallow a world." Or maybe your words.

Ogg bitrate peeling

Reply #7
Quote
Originally posted by merg
Using Ogg and I like it a lot. One thing I haven't found though is how to change the bitrate without reencoding. Is this already supported in the 1.0 specs?

Merg


This is supported by the 1.0 specs. The software to do it is still only of 'experimental' quality though.

--
GCP

Ogg bitrate peeling

Reply #8
Whoa, the quality you get sure does suck. Those who want to try it themselves can use the compiled win32 binary.
Usage: peel <file.ogg> <newfile.ogg> [bitrate_in_bps]

Ogg bitrate peeling

Reply #9
Some more bitratepeeling examples:

The Movielife - Walking On Glass

Encoded with -b 64
Transcoded from -q 5 to -b 64
Peeled from -q 5 to 64 kbps
Peeled from -q 5 to 15 kbps

all samples encoded with the outdated RC3!!!

peel in action
linux binary of case's version

At the moment bitrate peeling is clearly inferior to transcoding, but it is possible and will hopefully be improved.

dev0
"To understand me, you'll have to swallow a world." Or maybe your words.

Ogg bitrate peeling

Reply #10
Case.

Can you remove the output to screen, it SLOOOOOWing it down ... :

EDIT:

HOLY CRAP!!! this is _BAD_ quality, it sure needs some work, now case, go hack it up ..

Ogg bitrate peeling

Reply #11
Quote
Originally posted by treech
Can you remove the output to screen, it SLOOOOOWing it down ... :

That was mildly put, the peeling seems to be instantaneous without screen output. Add 2> NUL: at the end of commandline and you won't see anything on screen.

Ogg bitrate peeling

Reply #12
Quote
HOLY CRAP!!! this is _BAD_ quality

That's why no-one has announced 'look, we have a working peeler'. It's just a simple proof-of-concept piece of code. A decent quality peeler will take quite a lot more work, but *is* on the agenda for some point.

Ogg bitrate peeling

Reply #13
I thought that one of the nice things about OGG was that it could be peeled easily later on for streaming etc... but it appears that it is not that simple.

What really IS peeling? I mean, is it just basically reencoding the file? Does it involve throwing out the least significant 2 bits or whatever?

Unless the format is saving quality information along with the data stream, peeling is going to be a bitch. How do you know which frames (or blocks, or whatever they are called) can be reduced more and which ones less? Will it be just a set scaling factor?

Ogg bitrate peeling

Reply #14
Quote
Originally posted by dev0
Some more bitratepeeling examples:

The Movielife - Walking On Glass

Encoded with -b 64
Transcoded from -q 5 to -b 64
Peeled from -q 5 to 64 kbps
Peeled from -q 5 to 15 kbps

all samples encoded with the outdated RC3!!!

peel in action 
linux binary of case's version

At the moment bitrate peeling is clearly inferior to transcoding, but it is possible and will hopefully be improved.

dev0


From my understanding of bitrate peeling it will never be able to span big ranges of bitrates.
For larger spans you need very large code books (gigabytes large), and even when such codebooks
are used you still have not the possibility to change strategies (lossless stereo => lossy stereo).

MPEG-4 BSAC uses bitrate peeling for peeling 96 kbps down to 80 or 64 kbps
and the method used there might be more powerful than the Ogg Vorbis method.

Bitrate peeling can be usable for fine adjusting bitrate and to avoid to store a douzen of streams depending
on the receivers capabulities, but not something to span bitrates from 15...150 kbps with one stream.

In image compression it is easier to span larger ranges.
--  Frank Klemm

Ogg bitrate peeling

Reply #15
Quote
I thought that one of the nice things about OGG was that it could be peeled easily later on for streaming etc... but it appears that it is not that simple.


Nothing is ;-)


Quote
What really IS peeling? I mean, is it just basically reencoding the file? Does it involve throwing out the least significant 2 bits or whatever?


I am making a great deal of speculation here, however I made a post about this a while back. It has a lot more to do with cascading the VQ residue I think would be the best way to put it. Not so much of the bitpacking convention. I was looking through the residue specification: I recommend looking at it first.

http://www.xiph.org/ogg/vorbis/doc/vorbis-spec-res.html

I correlated that with something about making m step passes through the residue when I looked for information a while back about it on the xiph.org archives. I wasn't specifically sure what that person had been talking about, because the residue specification had not been out at the time and I hadn't seen it in the sources: my post

http://www.hydrogenaudio.org/forums/showth...=8002#post20052

I don't know how efficiently it works for the time being, but I am not going to make any assumptions that it can't possible become better.
budding I.T professional

Ogg bitrate peeling

Reply #16
Quote
Originally posted by Frank Klemm


From my understanding of bitrate peeling it will never be able to span big ranges of bitrates.
For larger spans you need very large code books (gigabytes large), and even when such codebooks
are used you still have not the possibility to change strategies (lossless stereo => lossy stereo).

MPEG-4 BSAC uses bitrate peeling for peeling 96 kbps down to 80 or 64 kbps
and the method used there might be more powerful than the Ogg Vorbis method.

Bitrate peeling can be usable for fine adjusting bitrate and to avoid to store a douzen of streams depending
on the receivers capabulities, but not something to span bitrates from 15...150 kbps with one stream.

In image compression it is easier to span larger ranges.


Hmmm, but AAC Scalable also supports Layering. It codes the audio with the CELP core coder and can then encode the residual in upto 8 layers of AAC. This gives a bitrate scaling from the lowest CELP bitrate to the highest AAC bitrate.
BSAC is introduced in MPEG-4 Version 2 to give a finer control in bitrate.

Menno