HydrogenAudio

Lossy Audio Compression => Ogg Vorbis => Ogg Vorbis - General => Topic started by: Yumi on 2013-05-25 08:37:25

Title: Undo rehuff on .ogg files?
Post by: Yumi on 2013-05-25 08:37:25
I ran a tool over some files which ran rehuff (https://wiki.xiph.org/Rehuff) over some Ogg Vorbis files.
I only just found out that there's a known bug with the tool causing seek failures.

Unfortunately it seems to be a bit more than merely unseekable files - some of these files are no longer recognised by various players, such as foobar2000 and MPC-HC.  As this didn't affect all .ogg files, I didn't notice this at first.

The files still seem decode-able in some though (VLC seems to play them back fine, although the seek bar is messed up), which seems to suggest that they may be recoverable.

Does anyone happen to know of a way to 'reverse' the effects of rehuff, or rebuild a valid .ogg file / Vorbis stream, without transcoding?


Things I've noticed:
- ogginfo dumps a lot of "Negative or zero granulepos (-1) on vorbis stream outside of headers. This file was created by a buggy encoder" errors
- vcut seems to cut the file fine, where the resulting file seems to be larger than the rehuff'd one (probably to be expected), however it seems to show the same characteristics as the rehuff'd file
- remuxing the file into an .mka container seems to improve seek handling in VLC.  It also gets recognised in foobar2000 but fails to play.
- remuxing with ffmpeg (ffmpeg -i in.ogg -acodec copy out.ogg) throws a lot of warnings, and seeking still seems broken in VLC
- remuxing the .mka with ffmpeg, however, gives only a few warnings (listed below), but seeking behavior still seems broken in VLC, and the file still isn't recognised in foobar2000

Code: [Select]
[vorbis @ 0000000001e2c460]  Invalid code lengths while generating vlcs.
[vorbis @ 0000000001e2c460]  Vorbis setup header packet corrupt (codebooks).
[vorbis @ 0000000001e2c460] Setup header corrupt.
[vorbis @ 0000000001e2c460]  Invalid code lengths while generating vlcs.
[vorbis @ 0000000001e2c460]  Vorbis setup header packet corrupt (codebooks).
[vorbis @ 0000000001e2c460] Setup header corrupt.


Thanks in advance!