Ogg::Vorbis(3perl)

Ogg::Vorbis3perl

Perl extension for ogg vorbis streams

Usage

  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);

Overview

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, [email protected]

From libvorbis-perl 0.05-2 in Debian 3.1 (Sarge). Parsed by carta from the page's man source.