Hack 37. Podcast Without a Blog
Use Podcastamatic or DirCaster to build a podcast from just your MP3 podcast files.
At its core, a podcast is a set of MP3 files and the RSS 2.0 XML file that catalogs them. You don't really need a blog, though there are advantages to having one. In fact, you can start with just the basic set of MP3 files and the RSS 2.0 feed, and add the blog later if that suits you.
Hack 6.2.1. A Short Introduction to RSS 2.0
You need to know a little about RSS and, in particular, RSS 2.0, to be able to get your podcast off the ground. RSS stands for Really Simple Syndication. I kid you not. There is some confusion around the different standards and their numbering. Suffice to say they all are XML and all are used primarily to summarize and syndicate the most recent postings (articles, photos, audio recordings, and more) on a web site.
Web browsers such as Firefox and Safari understand RSS, which allows them to treat certain bookmarks as live bookmarks: instead of having to visit a site several times a day to see if any thing's new, you can glance at your bookmarks to see if the web page has been updated. Suppose you subscribe to Apple's Hot News feed. If you're all caught up on the recent items, the live bookmark will appear as "Apple Hot News." But if the site contains three new articles you haven't read yet, the bookmark might appear as "Apple Hot News (3)." Specialized applications called aggregators are dedicated RSS readers. For example, Bloglines (http://www.bloglines.com/)is a web-based aggregator, and NetNewsWire (http://ranchero.com/netnewswire/) is an RSS aggregator that runs on the Macintosh.
The only RSS standard that matters for podcasting is RSS 2.0. The podcasting equivalent of an RSS aggregator is called a podcatcher [Hack #1].
Here is an example RSS file from Adam Curry's Daily Source Code show:
<?xml version="1.0"?> <!-- RSS generated by UserLand Frontier v9.0.1 on Sun, 20 Feb 2005 20:29:52 GMT --> <rss version="2.0"> <channel> <title>Adam Curry's Weblog</title> <link>http://www.curry.com/</link> <description>There are no secrets, only information you don't yet have…</description> <language>en-us</language> <pubDate>Sat, 19 Feb 2005 23:00:00 GMT</pubDate> <lastBuildDate>Sun, 20 Feb 2005 03:30:04 GMT</lastBuildDate> <docs>http://backend.userland.com/rss</docs> <generator>UserLand Frontier v9.0.1</generator> <category domain="http://www.weblogs.com/rssUpdates/changes.xml"> rssUpdates</category> <managingEditor>email@example.com (Adam Curry)</managingEditor> <webMaster>firstname.lastname@example.org (Adam Curry)</webMaster> <cloud domain="live.curry.com" port="8080" path="/RPC2" registerProcedure="manilaRss.pleaseNotify" protocol="xml-rpc" /> <item> <title>Daily Source Code for February 17th 2005</title> <link>http://homepage.mac.com/dailysourcecode/dsc/dsc-2005-02-17.mp3 </link> <description>…</description> <category>Daily Source Code</category> <guid>http://www.curry.com/2005/02/18#a2742</guid> <comments>http://www.curry.com/comments?…</comments> <enclosure url="http://static2.podcatch.com/blogs/gems/dscedit/DSC20050217.mp3" length="19643677" type="audio/mpeg"/> </item> <item> <title>Ssales bonanza!!</title> <link>http://www.curry.com/2005/02/16#a2704</link> <description>…</description> <category>Blog Posts</category> <guid>http://www.curry.com/2005/02/16#a2704</guid> <comments>http://www.curry.com/comments?…</comments> </item> </channel> </rss>
I've put the important parts in bold. At the top of the file is the title of the podcast, the author, a short description, and so on. Each entry is listed in its own <item> block, with the URL of the entry, the time it was made, and a description. And, in the case of a podcast entry, the enclosure tag points to the MP3 file of the podcast using a URL. The length and MIME type (i.e., audio/mpeg) of the media item are also listed.
Podcasting works because of RSS 2.0's normalized XML format. The feeds are always structured the same way so that aggregators and podcatchers can read this XML to see what media are available for download by looking at the <enclosure> tags. And they can make sure they don't download it twice by looking at the <guid> or <pubDate> (not shown in this example) for each entry.
The open nature of the <enclosure> tag means that this mechanism can be used to transmit audio, video, images, or any other type of attached content.
Hack 6.2.2. Blogless Podcasting Alternatives
You have three alternatives for podcasting without a blog: writing your own RSS file, using Podcastamatic to write the XML file for you, and using Dir-Caster, which is a PHP script that you run on your server.
Hack 184.108.40.206 Writing your own RSS file.
Copying an existing RSS 2.0 file makes writing one a lot easier. First you need to find one that is valid to start with. FEED Validator (http://feedvalidator.org/) will tell you if a feed is valid when you give it the URL of the feed. In a pinch, just use a copy of Adam Curry's RSS 2.0 feed at http://www.curry.com/.
Once you have an RSS 2.0 file in hand you will want to cut it down to just the description and a single entry:
<?xml version="1.0"?> <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"> <channel> <title>My Blog Title</title> <link>http://myblog.com</link> <description>A description of my blog.</description> <language>en-us</language> <copyright>(c) Copyright 2004 - 2005.</copyright> <lastBuildDate>Sun, 20 Feb 2005 18:35:21 GMT</lastBuildDate> <ttl>60</ttl> <item> <title>First podcast</title> <link>http://myblog.com/podcasts/firstpodcast.mp3</link> <description>My very first podcast!</description> <pubDate>Sun, 20 Feb 2005 18:34:50 GMT</pubDate> <enclosure url="http://myblog.com/podcasts/firstpodcast.mp3" length="680734" type="audio/mpeg"/> </item> </rss>
Replace the title, link, description, and lastBuildDate fields with the appropriate information. For date fields, follow the format shown here exactly.
Next, add your first podcast in as the first item, then copy, paste, and change the information for all the subsequent MP3 files. The length field is simply the size of the MP3 file that you can get from a directory listing.
I recommend naming the file rss.xml and putting it in your site's root directory. This is one common place podcatchers look when people only specify a site's domain name. The podcast entries should be in their own directory, called podcasts, right below the root directory.
With all of this set up, use your FTP or SFTP client to upload the files to your server. Then validate the URL using FEED Validator and start publicizing your podcast.
As you add new podcasts, you will have to add another <item> tag group and change the <lastBuildDate> tag to the current date.
Hack 220.127.116.11 Use Podcastamatic to write the RSS file for you.
Podcastamatic (http://bradley.chicago.il.us/projects/podcastamatic/) is a small Perl script that uses a directory of MP3 files as source material to create the RSS 2.0 file. It also creates a nice HTML file to act as the site's frontend. You can customize the HTML using the HTML template.
The first step in using Podcastamatic is to download and unpack it. From there, you will need to download ActiveState Perl on Windows (other platforms, including Mac OS X and Linux, include a copy of Perl). Next, make sure you have the MP3::Info Perl module [Hack #7]. More details are available on the Podcastamatic site.
You can check if you have MP3::Info already, and if Perl is installed correctly, by typing this on the command line:
% perl use MP3::Info;
After you press Return on the use statement, Perl will complain if it can't find the module. If Perl does not complain, you should be able to use Podcastamatic. Press Ctrl-D to finish your Perl session.
The next step is to configure your Podcastamatic installation. This starts with creating the configuration file.
Copy example_podcastamatic.conf to podcastamatic.conf. Then open podcastamatic.conf in your favorite editor. About 20 variables can be tweaked, but only 7 really need adjustment in the beginning:
Remember, all you need when you show up to this party are the MP3 files. The Perl script will create the RSS 2.0 and HTML files for you. You just need to tell it where the MP3 files are, and where you want to put the RSS and HTML files both on your machine and on the server. The script will do the rest.
To run Podcastamatic, use this command:
% perl podcastamatic.pl Reading configuration file "podcastamatic.conf" … Done. Looking for audio files… Found bc/bc_0805074562.mp3 1 audio files were found. Building XML file "bc/rss.xml" Adding "Revolution in the Valley" XML file is done. Building automatic HTML file "bc/index.html" Adding "Revolution in the Valley" Automatic HTML file has been created. No template driven HTML file to be generated per config file.
The output files, located in the bc directory where I configured the output to go, are now ready for uploading to your web server with FTP or SFTP. Once the files are uploaded, use FEED Validator (http://feedvalidator.org/) to make sure the feed is valid before you publicize it. You should also subscribe to your feed with your favorite podcatcher to make sure everything is created properly.
18.104.22.168 Use DirCaster to podcast a directory on the server.
I saved the easiest tool for last. DirCaster (http://www.shadydentist.com/wordpress/software/dircaster)is a PHP script that you download into a directory on a PHP-enabled web server. For example, you might choose a directory called podcast. You upload your MP3 files into that directory as well. When you access the dircaster.php script through your web browser, you will see that the script has read all the MP3 files in the directory and has created a properly formatted RSS 2.0 feed. How simple is that? To add more podcasts, you simply upload another MP3 file to the directory.
Before you upload the script, you will want to make a few changes to it with your favorite text editor. At the top of the file, you need to set the $titleTAG variable to the title of your podcast, the $linkTAG variable to the URL of your home page, and the $descriptionTAG variable to a description of your pod-cast.
Once you make these changes, you should upload the dircaster.php file, and your MP3s, and then try it out. Always make sure you use FEED Validator (http://feedvalidator.org/) to test your feed. Then use your podcatcher to subscribe so that you see what your audience will see.
6.2.3. See Also