[vorbis] Encoding question

David Mitchell vorbis at themitchells.org
Wed Mar 13 21:17:16 PST 2002



On Wednesday 13 March 2002 01:06 am, Michael Smith wrote:

> Encode a file as normal. Strip off the first 3 packets (the 3 headers),
> and store these seperately. Store the rest of the file as normal (but
> note that normal players won't be able to play these, as the headers
> are missing). Repeat (except now just discard the headers, as they'll
> be the same for the other files) for every other file.
>
> Now, you have the headers seperately, then lots of very small files
> containing only the vorbis audio packets.
>
> When decoding, submit the header packets directly to the decoder
> (you'll need to use libvorbis directly for this, rather than vorbisfile
>  - but that's reasonably straightforward). THEN start sending the audio
> packets to the decoder as you normally would.
>

Another method that might work depending on your situation is to
just concatenate all of the audio clips into one long file and
encode that. When the game starts up, you can decompress
it and just play the individual chunks as you need them. You''ll
waste some memory, but that may or may not be a problem.
I don't think this would be easier or harder than Michael's
suggesting. Just a different tack.

-David Mitchell

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