NAME

Ogg::Vorbis - Perl extension for Ogg Vorbis streams

SYNOPSIS

use Ogg::Vorbis;
$ogg = Ogg::Vorbis->new;
open(INPUT, "< file.ogg");
open(OUTPUT, "> file.pcm");
$ogg->open(INPUT);
$info = $ogg->info;
%comments = %{$ogg->comment};
$buffer = '-' x 4096;
while ($bytes = $ogg->read($buffer,4096,0,2,1,$current_bitstream) > 0) {
  syswrite(OUTPUT, $buffer, $bytes);
}
$ogg->clear;
close(OUTPUT);
close(INPUT);

DESCRIPTION

This is an object-oriented interface to the Ogg Vorbis libvorbisfile convenience library. To create a vorbisfile object, call Ogg::Vorbis->new. You can then open it on input streams with the open() method, read data from it with read() method, and clean up with clear(). Other methods for obtaining information are available as in libvorbisfile.

The info() method returns an Ogg::Vorbis::Info object. You can access the various fields of the vorbis_info struct with methods of the same name.

The comment() method returns a hash of comment name => value entries.

Currently libvorbisfile does not support writing or encoding, so you cannot change comment values or encode a new file, but the functionality to do so will be added soon.

AUTHOR

Alex Shinn, foof@debian.org

SEE ALSO

Ao(3pm), ogg123(1), oggenc(1), perl(1).