Turning a bucket of MP3s into a podcast

I wrote a Python script, s3cast, to convert an Amazon S3 bucket of MP3 files into a podcast feed.

You see, there is a satellite radio show that I really enjoy called The Saturday Night Safety Dance with DJ Bueller. It’s one of the few shows on Sirius XM that they don’t allow you to stream afterward, which is a shame. It’s an 8-hour block that’s basically an extended megamix of 80s and 90s music, some popular and some more obscure. It makes for a great Kitchen Dance Party, but I’m not always around (or remember) when it’s on the air.

Lately, I’ve taken to recording it with an overly-elaborate setup. This lets me timeshift as well as split it across multiple nights. But this leaves me with a handful of 600MB audio files to organize and manage. I can manually transfer them to the media player in the kitchen (an old iPhone), but that’s a pain. I could put them into a service like Dropbox, but then I’m eating into my storage quota. Additionally, most of the Dropbox-based audio players assume albums of music, not long-form audio like audiobooks or podcasts. They don’t remember your place in the file. Podcast players, though, remember your position! Manually crafting an XML file to represent a podcast RSS feed is certainly possible, but I wanted to automate things, so I did.

I now have a setup where, after recording, I can upload the MP3 file into an AWS S3 bucket and then run s3cast. That script spiders through the bucket looking for MP3s, synthesizes a podcast RSS XML file, and then uploads that file into the bucket. I can then set up the podcast player in the kitchen (and the living room, as well as my main phone) to point to that XML. Those players can then download or stream the show, and remember exactly where I left off. It was a few hours of code, but will save me a lot of time and will be more accurate than doing things manually.

Posted in: Code Projects

Published by

Brian Enigma

Brian Enigma is a Portlander, manipulator of atoms & bits, minor-league blogger, and all-around great guy. He typically writes about the interesting “maker” projects he's working on, but sometimes veers off into puzzles, software, games, local news, and current events.

Leave a Reply

Your email address will not be published. Required fields are marked *