Ivo Emanuel Gonçalves
2009-Jun-18 10:14 UTC
[ogg-dev] Fixing ogg vorbis corruption caused by bad metadata
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 2) an Hex editor, even if just to check what's wrong in the metadata section -Ivo
Adam Rosi-Kessel
2009-Jun-18 14:05 UTC
[ogg-dev] Fixing ogg vorbis corruption caused by bad metadata
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 Oggvcut 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 sectionWhat 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
Conrad Parker
2009-Jun-18 14:12 UTC
[ogg-dev] Fixing ogg vorbis corruption caused by bad metadata
2009/6/18 Adam Rosi-Kessel <adam at rosi-kessel.org>:> 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]yow, that's pretty badly corrupted, the vorbis codebooks (usually the third packet) is completely gone. It looks like you'd need to throw away the first 16 packets, start with fresh headers, and copy in the rest of the data (packet by packet, or page by page?) K.