Opus audio codec format [and OGG as its container] started to gain traction, which is great. However it also means that everyday problems surface. Mine today is a corrupted file, and the question is whether there are tools to repair the stream.
The actual stream is possibly created by a broken encoder, namely:
Encoded with Gagravarr.org Java Vorbis Tools v0.8 20160217
and opusinfo correctly complains:
**WARNING: Invalid header page in stream 1, contains multiple packets**
New logical stream (#1, serial: 000052c9): type opus
**WARNING: Implausibly low preskip in Opus stream (1)**
Encoded with Gagravarr.org Java Vorbis Tools v0.8 20160217
Opus stream 1:
Pre-skip: 0
Playback gain: 0 dB
Channels: 1
Original sample rate: 16000Hz
Packet duration: 60.0ms (max), 60.0ms (avg), 60.0ms (min)
Page duration: 60.0ms (max), 60.0ms (avg), 60.0ms (min)
Total data length: 12231171 bytes (overhead: 13.9%)
Playback length: 60m:49.920s
Average bitrate: 26.81 kb/s, w/o overhead: 23.08 kb/s
Logical stream 1 ended
which is fine. But while the data is visibly there, opusdec decides to force correctness:
Decoding to 48000 Hz (1 channel)
Extra packets on initial header page. Invalid stream.
and absolutely reject to process the file, which isn't very helpful.
My question is: how the user is supposed to salvage/repair/fix a broken, but salvageable file? Is there a (FOSS) code for that? Is there some hidden functionality in xiph stuff?