[ogg-dev] Fixing ogg vorbis corruption caused by bad metadata

Monty Montgomery monty at xiph.org
Mon Jul 13 21:45:49 PDT 2009


>
> Is it impractical to suggest a generic tool that simply starts reading
> an ogg file from the beginning, and once it gets past any corruption it
> outputs the rest as a valid file?

Yes.  Without the first three packets (which hold all the codec
settings and all the instruction how to handle the subsequent packets)
the rest of the stream is gibberish.  Vorbis can't even unpack the
bits without the codebooks packed into the third header.

> For example, if you just split an ogg
> vorbis file in half, and only had the second half, is there no currently
> existing tool, or one that could be easily developed from the existing
> libraries, that would take that second half and make it playable?

...only if it was able to read (and tack on) the first three packets
from the first half.

Monty


More information about the ogg-dev mailing list