[vorbis] mixing and 'downgrading' of vorbis-files
Kristoff Bonne
kristoff.bonne at skypro.be
Tue Feb 20 12:03:07 PST 2001
Greetings,
On Mon, 19 Feb 2001, Mercier, Dave wrote:
> Well nobody else has answered this so I thought I'd take a shot.
Thanks!
> - If you want to mix the Vorbis bitstreams somehow in their final state
> (Huffman compressed into packets or whatever), that would surely be
> impossible. Nothing at all lines up, it is just random compressed data at
> that point.
> - You could try decoding the Huffman data so that you are left with
> frequency domain data for each Vorbis stream. It is possible to mix quite
> easily in the frequency domain. However, it is probably not possible to mix
> two Vorbis streams in the frequency domain easily, because I believe a
> Vorbis stream is comprised of "short" and "long" blocks. I think you can
> only add together blocks if they are the same size. I'm sure no two streams
> would line their blocks up that well, so you would have to recalculate the
> appropriate block sizes. Even if this technique worked it would use a lot of
> CPU anyway, all you are really gaining is saving the conversion of 2 streams
> to PCM and back to frequency domain again. I'm not sure exactly what state
> the data may be mixable other than the raw frequency domain data either, it
> may be possible to mix earlier.
> - The 3rd and pretty much only option that would work would be to just have
> 2 fully functional decoders hooked up to a mixer, and the encode again. That
> would be a huge amount of CPU for a server though. If you could just store
> your source audio as PCM, and mix that and then encode on the fly, that
> would save a good deal of CPU time.
Well, this question actually is the result of a message in this list,
concerning converting mp3-files to ogg.
The idea was "do NOT just decode the mp3 files and then re-encode them
into ogg! It is a 'very bad idea' (tm) to put multiple lossy codecs in
sequence".
Now, I don't know if this argument still holds when you put the SAME
(loosy) codec in sequence; so I was wondering if it would make a big
difference in final audio quality by mixing two streams without doing a
'loosy' compression/decompression sequence.
(I guess the transformation from PCM to the frequency-domain is the
'loosy' part of the process).
This question also originated from a discussion about digital radios. Most
radio-stations do not have any CD anymore. They just have everything in
one giant mp3-box. (And most stuff they just get of the net via napster
;-))
So, if you output is also mpeg (like stations transmitting in DAB or
DVB-S), it is best to mix the different audio-sources (like two songs, or
the voice of the radio-host with a piece of music) without having the
(loosy) decode/re-encode cycle.
This is for mp3 (as mp3 is used as a broadcast codec in a number of
digital-radio and digital-TV standards); but -from a codec-point-of-view-
it would make sence to look into this also for vorbis/ogg.
Cheerio! Kr. Bonne.
--
KB905-RIPE Belgacom IP networking
(c=be,a=rtt,p=belgacomgroup,s=Bonne,g=Kristoff) Internet, IP and IP/VPN
kristoff.bonne at skypro.be Faxbox : +32 2 2435122
--- >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