MP3::Podcast - Perl extension for podcasting directories full of MP3 files


  use MP3::Podcast;
  my $dirbase = shift; #Base directory, e.g. Music
  my $urlbase = shift; #Base URL that dir is mapped to
  my $dir = shift; # Subdir, e.g. 2009-02-28
  my $pod = MP3::Podcast->new($dirbase,$urlbase);
  my $rss = $pod->podcast( $dir, "This is a test" );
  print $rss->as_string;


Create podcast easily from directories, using MP3's own info.


Creates a podcast, basically a RSS feed for a directory full of MP3 files. Takes information from the MP3 files themselves; it needs MP3 files with their ID tags completed.

The bundle includes two programs in the examples dir:, used this way:

  bash% ./ <dirbase> <urlbase> <dir to scan>

which generates a static RSS from a dir, and podcast.cgi, to use from a webserver. To use it, copy podcast.cgi and podcast.conf to a cgi-serviceable dir; edit podcast.conf to your liking and copy it to the directory you want. Copy also .podcast to the directory you want served as a podcast (this is done mainly to avoid dir-creeping), edit the path to fetch the MP3::Podcast lib, and call it with[dirname].rss The name of the directory to scan will be taken from the URI

This new version includes in the test directory MP3s by the Spanish group Anima Adversa (which you can find at, which are freely distributed under a CC license.


new( $base_directory, $base_url )

Creates the object. Takes basic info as input: the address of the directory that will be scanned, the base URL that will be used to podcast this URL base.

podcast( $subdirectory, $podcast_title)

Creates the podcast for a dir, that is, an RSS file with enclosures containing the MP3s it can find in that dir. Information to fill RSS fields is contained in the ID3 fields of the MP3 files. Returns an XML::RSS object, which you can manipulate, if you feel like doing so.


Info on podcasting:

Podcast in perl:

Check out also the examples in the examples dir in the bundle.


Juan Julian Merelo Guervos, <jmerelo {at}>. Thanks to Juan Schwindt <juan {at}>, Matt Domsch <matt {at}>, Gavin Hurlbut <gjhurlbu {at}> and Eric Johnson <eric {at} > for patches, suggestion and encouragement.


Copyright 2005-2009 by Juan Julian Merelo Guervos

This library is free software; you can redistribute it and or modify it under the same terms as Perl itself.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 63:

'=item' outside of any '=over'

Around line 142:

You forgot a '=back' before '=head1'