HydrogenAudio

Hosted Forums => foobar2000 => Support - (fb2k) => Topic started by: detmek on 2008-06-29 17:01:21

Title: Can't play vorbis
Post by: detmek on 2008-06-29 17:01:21
This is my first post on the forum and I would like to say hello to all members.
I started to use fb2k 6 months ago and I did not have any problem so far. But, latest beta reffuses to play ogg files from my library. I get a message that files might be corrupted. Those files worked, and work well with previous versions. Files are created using Audiograbber with official vorbis dll 1.2.0. I think.
P.S. Sorry for my bad english.
Title: Can't play vorbis
Post by: Yirkha on 2008-06-29 18:15:39
As stated in the official changelog, version 0.9.5.4 contains strengthened security checks for various formats, including more rigorous validation of Ogg Vorbis files.

I had a similar problem as you with some Vorbis tracks extracted from a movie in Matroska container. As I learned, the cause was "mkvextract" writing invalid granule positions to the Ogg file. While this jitter was inaudible because of MDCT windowing, the files were wrongly decoded because of this (and half a second shorter in the end!).
The Ogg Vorbis specification says decoders should handle this kind of errors gracefully, but I'm glad the new foobar2000 version refused to play these files so I could fix them.

I've made myself a simple command-line program to do this. You might try it on one of your problematic files and see if it helps: revorb.exe (http://yirkha.fud.cz/progs/foobar2000/revorb.exe) (72 KB)
Code: [Select]
C:\Data\src\xiph>revorb
-= REVORB - <yirkha@fud.cz> 2008/06/29 =-
Recomputes page granule positions in Ogg Vorbis files.
Usage:
  revorb <input.ogg> <output.ogg>

C:\Data\src\xiph>revorb "BCW title music (eng).ogg" "BCW title music (eng).fixed.ogg"

C:\Data\src\xiph>
Title: Can't play vorbis
Post by: detmek on 2008-06-29 19:20:37
Thanks. It works. The only problem now is that I have 223 files to correct. Is there any way to do this in batch mode?
P.S. I am not realy good at writing batch scripts.

Moderation:Removed unnecessary full quote of the preceding post.
Title: Can't play vorbis
Post by: Yirkha on 2008-06-29 22:18:10
Great.

I created an updated version of that Revorb program, it can now replace files in place if only one parameter is specified. That lowers the complexity of mass processing a lot - just get into the base directory and execute it like this:
Code: [Select]
C:\Music\Whatever>for /r %f in (*.ogg) do @revorb "%f"
With the @, it will also write nothing else than possible errors to the window, so it will be easier to review if there were any (I hope they won't).

The updated version is available at the same location as before (http://yirkha.fud.cz/progs/foobar2000/revorb.exe).

And I of course recommend to make a backup of everything and verify the files afterwards - if not by listening, then at least their integrity (e.g. using foobar2000's ReplayGain scanner or optional File Verifier component).
Title: Can't play vorbis
Post by: detmek on 2008-06-29 23:52:25
Yirkha, your program works perfect! Well done.
Unfortunatlly, over a half of my files seams to be corrupted. Error message is:
Bitstream error.
Corrupted or missin data in bitstream.
Files without this error startet to work.
I have to re-rip all those files with errors. Untill then, I forund workaround. I am using foo_input_std.dll from 0.9.5.3 version.
Thank you again.
Title: Can't play vorbis
Post by: Yirkha on 2008-06-30 00:19:08
I've looked when it could actually spit out those two errors. The first one means some packets in the file were missing or in a wrong order. The second means there were some superfluous bytes between pages (packet groups) or that the page checksum did not match.
I might have let Revorb create the output anyway in these cases, maybe the output would be fine. On the second thought, these files seem to be created with a really buggy encoder. If you can, reripping is apparently the best solution.
Title: Can't play vorbis
Post by: Yirkha on 2008-07-25 11:56:22
By request, revorb.cpp (http://yirkha.fud.cz/progs/foobar2000/revorb.cpp).
Title: Can't play vorbis
Post by: TedFromAccounting on 2008-07-25 15:11:55
Yirkha, your program works perfect! Well done.
Unfortunatlly, over a half of my files seams to be corrupted. Error message is:
Bitstream error.
Corrupted or missin data in bitstream.
Files without this error startet to work.
I have to re-rip all those files with errors. Untill then, I forund workaround. I am using foo_input_std.dll from 0.9.5.3 version.
Thank you again.


Your ogg files do not have id3 tags on them do they?  Some programs improperly tag ogg files and add id3 tags, which will break the files in the majority of players.  I used to strip the id3 tags off of ogg files by changing the ogg extension to mp3 and opening the file in winamp.  Winamp wouldn't play the file, but it would show the tag and allow me to remove it.  There's probably another program that would do it without the renaming etc.
Title: Can't play vorbis
Post by: Kein on 2013-06-29 11:09:48
Just wanted to say quick thanks for the tool, really useful little thing.