[vorbis-dev] oggenc and Encoding with VBR
Murray
murray at minty.org
Sat Jun 28 09:53:14 PDT 2003
Apologies if this is know. But I've spent most of today Googling for a way
to get this working, and to me, something is wrong here. But it might well
be me. Anyway...
I've been trying to record direct from the soundcard into an ogg file.
I came up with
rawrec -t 10 | oggenc -r -Q -q 5 - > foo.ogg
which partially works. ogg123 will play it, but ogginfo reports
Warning: Hole in data found at approximate offset 4500 bytes. Corrupted
ogg.
along with all the regular stuff, and WinAmp on Windows refuses to play it
at all.
Turns out, despite the -Q flag, "Encoding with VBR" is still output and thus
corrupts the file.
Using -o flag on oggenc doesn't work, as rawrec get's a broken pipe.
rawrec: write syscall to output failed: Broken pipe
However, using the first command above (> foo.ogg), and then deleting the
first line from foo.ogg (Encoding with VBR), makes the file pass through
ogginfo without issue, and also plays on WinAmp. I used vi foo.ogg, dd, :wq
I'm on Debian Linux, and I downloaded and installed libao-0.8.3, libogg-1.0,
libvorbis-1.0, vorbis-tools-1.0 from the website today.
The perl script below will also fix ogg files with this error
#!/usr/local/bin/perl -w
use strict;
open(IN, $ARGV[0]) or die("$!\n");
binmode(IN);
open(OUT, ">$ARGV[0].tmp") or die("$!\n");
binmode(OUT);
while(<IN>) {
next if ($_ =~ /Encoding with VBR/);
print(OUT $_);
}
close(OUT) or die("$!\n");
close(IN) or die("$!\n");
I dunno if this is a bug, but it was darn confusing. It would be really
useful if the man page for oggenc included an example of the correct way to
encode on the fly, rather than having to first create a .wav file, and then
encoding it.
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis-dev
mailing list