[vorbis] mixing and 'downgrading' of vorbis-files

Mercier, Dave dmercier at ea.com
Mon Feb 19 10:03:04 PST 2001



Well nobody else has answered this so I thought I'd take a shot.

- 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.

The same arguments would probably apply to any frequency domain type of
compression (MP3, AAC, etc.).

Well I don't really know that much about the Vorbis format so correct me if
I am wrong on any points.

Thanks,
Dave.

-----Original Message-----
From: jaromil [mailto:jaromil at dyne.org]
Sent: Monday, February 19, 2001 2:56 AM
To: vorbis at xiph.org
Subject: Re: [vorbis] mixing and 'downgrading' of vorbis-files

On Thu, Feb 15, 2001 at 02:40:29PM -0700, Aaron Porter wrote:
> > Concerning 'mixing' music, it would be interesting to be able to mix two
> > ogg-files without the need to decode and re-encode the files?
> > Also, can it be done to mix vorbis-file with different data-rates?
> 
> It shouldn't be too hard to have two separate Vorbis streams that get
mixed
> by the player but I don't think there's any software that does that yet.

muse does it:

http://muse.dyne.org

(in the pcm domain doe)

jrml

--- >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.

--- >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