[vorbis] Bit Rate Peeling Quality

Graham Mitchell graham at grahammitchell.com
Sun Jun 22 22:57:59 PDT 2003



> So, for:
>
> 	a.wav --> b.ogg (at q6) --> c.ogg (at q2)
> 	a.wav --------------------> d.ogg (at q2)
>
> how are c.ogg and d.ogg likely to compare in terms of audio quality?

Assuming the files were encoded with current encoders, c.ogg would probably be 
noticeably less good than d.ogg, but I think better than if you'd done:

        a.wav --> b.ogg (at q6) --> b.wav --> c'.ogg (at q2)

> Also a related question (in terms of my proposed use):  Are there likely
> to be any changes to the Vorbis codec which will cause problems doing
> bit rate peeling in, say, four years time on a file encoded today with v1?

Erm, you're using terminology a little loosely here.  What do you mean by 
"changes to the Vorbis codec"?

The vorbis file format is frozen.  That means any file created with a 1.0 
encoder can be handled by any future 1.x decoder.

Anyway, I think I understand what you're getting at.  You want to know, "If I 
encode my whole collection at q6 with the v1 encoder, will I be able to peel 
them well with the smart tools that will eventually appear in the future, or 
will I have to encode the files from scratch with the then-current encoder to 
get easily peelable files?"

In which case, I'm pretty sure the answer is, "Don't worry, in this 
hypothetical future you'll be able to peel your then-old vorbis files just as 
well as files you'd encode then.  Or pretty darn close, anyway."

Current oggs *are* peelable, just not very well.  With current tools, they're 
not peelable very well at all, because the proof-of-concept peelers are 
pretty unsophisticated.  With future tools, even current oggs aren't very 
peelable (in the sense that peeled oggs would be noticeably worse than a 
"pure" one at the same bitrate) because they aren't encoded with that in 
mind.

However, Segher claims (and I believe him) that it's possible to losslessly 
re-encode a v1 vorbis stream in such a way to make a peeler's job much 
easier.  That is (to quote my man Bill Nye), "consider the following":

        a.wav --> b.ogg (at q6) --> [MAGIC] --> c.ogg (also q6) --> d.wav
        a.wav --> b.ogg (at q6) -------------------------------------> e.wav

Okay, the important thing is that d.wav and e.wav are bit-for-bit identical.  
Thus the [MAGIC] phase is "lossless".  The other important thing is that 
c.ogg is easily peeled, even though b.ogg is not.  So c.ogg could be peeled 
down to q2, and the resulting ogg would sound a lot closer to a "pure" q2 
vorbis file directly from a.wav than would attempting to peel b.ogg.  
Finally, I'm pretty sure b.ogg and c.ogg would be identical in size, as well.

Anyway, it's assumed that eventually the (not-yet-written) code from the 
[MAGIC] phase would be incorporated into the stock encoder.  Thus any files 
produced by that encoder would be easily peelable, out of the box.  But it 
would almost certainly also be incorporated into a separate utility to 
losslessly re-encode existing oggs.  There'd be no reason not to write such a 
tool, and in fact you'd probably want to write that tool first and make sure 
it works before trying to incorporate that code into the encoder.

Anyway, I think this answers your question.  Of course, as with anything about 
technical capabilities of vorbis, I'm just repeating what I've heard others 
say; I have no ability to look at the code or file format and promise you 
that what I'm saying is true or even possible.  (Which is to say, Segher, if 
you're reading, feel free to correct me if I'm wrong.)


-- 
Graham Mitchell - computer science teacher, Leander High School
"Reading is to the mind what exercise is to the body."
	- Sir Richard Steele

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.




More information about the Vorbis mailing list