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

Adam Rosi-Kessel adam at rosi-kessel.org
Thu Jun 18 07:05:45 PDT 2009


Ivo Emanuel Gonçalves wrote, on 6/18/2009 6:14 AM:
> On 6/18/09, Conrad Parker<conrad at metadecks.org>  wrote:
>> This sounds like it needs a new tool specifically for fixing broken
>> Ogg files.
>
> I see two solutions:
>
> 1) the new vcut which I reckon will fix the problem since it has to
> split and rebuild the audio in a new Ogg

vcut built today from svn doesn't work here:

Processing: Cutting at 0.000000 seconds
Page error, continuing
Header packet corrupt
Processing failed

> 2) an Hex editor, even if just to check what's wrong in the metadata section

What should I look at with a Hex editor? The oggz dump for an example 
header shows the following -- packetno 1, where the metadata would be, 
is just skipped:

00:00:00.000: serialno 1225743615, granulepos 0, packetno 0 *** bos: 30 
bytes
       0000: 0176 6f72 6269 7300 0000 0002 44ac 0000  .vorbis.....D...
       0010: 0000 0000 006b 0300 0000 0000 b801       .....k........

00:00:00.416: serialno 1225743615, calc. gpos 18368, packetno 2: 1 byte
       0000: 00                                       .

00:00:00.419: serialno 1225743615, calc. gpos 18496, packetno 3: 1 byte
       0000: 0a

[etc, same through packetno 16]

00:00:00.460: serialno 1225743615, calc. gpos 20288, packetno 17: 448 bytes

[real data here]

The first 50 kB of a hexdump -c of a sample corrupt file is attached 
here (approximately the mailing list limit). An entire hexdump is here:

http:///adam.rosi-kessel.org/bugs/liboggz/484/hexdump.txt

Adam
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: hexdump.txt
Url: http://lists.xiph.org/pipermail/ogg-dev/attachments/20090618/3e2f51c0/attachment-0001.txt 


More information about the ogg-dev mailing list