Adding podcasts to MPD using castget

In order to play mp3 files on my RasPi, I’ve installed the Music Player Daemon (MPD). Music playback can be controlled with Mozilla Firefox using the Minion plugin. By placing *.m3u files into MPDs’ playlists folder, as configured in /etc/mpd.conf, it is possible to listen to internet radio streams.

Unfortunately, subscription to podcasts is not directly supported by MPD. However there’s a way to automatically download podcasts to MPD’s mp3 directory using a program called castget. It’s not in the Wheezy repo. Thus, it must be compiled from source:

$ ./configure --prefix=/usr
$ make
$ make install

To build castget, make sure to have the glib2, libxml2, libcurl and id3lib development packages installed on your Pi. Castget is using a default ./castgetrc in /home/pi for configuration, but one can point it to a different location by using the –rcfile=/etc/castgetrc flag. The castget tarball provides a sample configuration file.

# Global settings.
[*]
id3contenttype=Podcast
spool=/media/usb/podcasts

# Per-channel settings.
[dsc]
url=http://www.deutschlandfunk.de/podcast-computer-und-kommunikation-komplette-sendung.416.de.podcast.xml
playlist=/var/lib/mpd/playlists/Computer_u_Kommunikation.m3u

[dsc]
url=http://www.deutschlandradiokultur.de/podcast-reportage.948.de.podcast.xml
playlist=/var/lib/mpd/playlists/Deutschland_Reportage.m3u

All you need to do is to define a spool directory for downloading the podcasts, to enter the URLs of the podcast’s RSS feeds and to tell castget where to store the playlist.m3u files (must be the the same directory as defined in /etc/mpd.conf).

To automatically check and download new podcasts each 24 hours at 02:00 am, I placed a new line into my /etc/crontab

 0  2    * * *   root    /usr/bin/castget -r --rcfile=/etc/castgetrc

If the download was successful, new podcasts should appear in Minion’s playlists tab.

Subscribe
Notify of
2 Comments
Inline Feedbacks
View all comments
8 years ago

You can also convert the podcast rss feeds to m3u playlist files and put them in the playlists folder. You can then stream each episode from within the playlists. That way you don’t have to pre-download all the episodes. See https://github.com/buzink/rss2m3u