GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Vorbis(3) User Contributed Perl Documentation Vorbis(3)

Ogg::Vorbis - Perl extension for Ogg Vorbis streams

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

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.

Alex Shinn, foof@debian.org

Ao(3pm), ogg123(1), oggenc(1), perl(1).
2003-08-13 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.