MP3-Icecast
view release on metacpan or search on metacpan
#can generate M3U and PLSv2 media playlists.
print STDERR $icy->m3u, "\n";
print STDERR $icy->pls, "\n";
$connection->close;
}
=head1 ABSTRACT
MP3::Icecast supports streaming Icecast protocol over socket
or other filehandle (including STDIN). This is useful for writing
a streaming media server.
MP3::Icecast also includes support for generating M3U and PLSv2
playlist files. These are common formats supported by most modern
media players, including XMMS, Windows Media Player 9, and Winamp.
=head1 SEE ALSO
The Icecast project
http://www.icecast.org
Title : streamll: 1 at /raid5a/allenday/projects/MP3/Icecast.pm line 459.
Usage : $icy->stream('/usr/local/mp3/meow.mp3',0);
$icy->stream('/usr/local/mp3/meow.mp3',0,$io_handle);
Function: stream an audio file. prints to STDOUT unless a
third argument is given, in which case ->print() is
called on the second argument. An IO::Handle or
Apache instance will work here.
Returns : true on success, false on failure
Args : 1) system path to the file to stream
2) offset in file to start streaming
3) (optional) object to call ->print() on, rather
than printing to STDOUT
=cut
sub stream{
my ($self,$file,$offset,$handle) = @_;
return undef unless -f $file;
#a contrived example to demonstrate that MP3::Icecast
#can generate M3U and PLSv2 media playlists.
print STDERR $icy->m3u, "\n";
print STDERR $icy->pls, "\n";
$connection->close;
}
ABSTRACT
MP3::Icecast supports streaming Icecast protocol over socket or other
filehandle (including STDIN). This is useful for writing a streaming
media server.
MP3::Icecast also includes support for generating M3U and PLSv2
playlist files. These are common formats supported by most modern
media players, including XMMS, Windows Media Player 9, and Winamp.
INSTALLATION
To install this module type the following:
( run in 0.250 second using v1.01-cache-2.11-cpan-4d50c553e7e )