A photo of Michelangelo's sculpture of David wearing headphones djing (DALL·E 2023-07-08 18.21.59)
Using Podsync to convert YouTube channels to podcasts
— 2 min readtl;dr: commit that do the job and link to @Pravonapoplavu as podcast
Why?
I recently discovered that one of my favorite YouTube show @Pravonapoplavu does not publish new episodes on podcast platforms anymore.
So I decided to convert the YouTube channel to a podcast format using the Podsync tool.
It was very easy to do (except hosting, dns and ssl and debugging), and I will walk you through the steps I took to do it.
Few notes before we start
Podsync is a tool which converts youtube channels into podcast feeds. It allows you to listen to your favorite YouTube channels on any podcast app.
How it works in a nutshell:
- Run as a background job
- Fetches YouTube channels and playlists via YouTube Data API
- Download new videos via youtube-dl
- Generate Podcast feed and place audio files in the right order
- Serves static content
1. Setup docker image
Why do we need custom image and re-install yt-dlp? Because of this bug
2. Setup podsync config
The main poinst here are:
- YouTube Data API key which you can find here (you need to create a project and access to the YouTube Data API)
opml = true
which will generate OPML file for you
Of course it will be great to have a custom domain, persistent storage but it’s not required.
If you need any customizations, see example config.
3. Run it via docker-compose
Test and verify locally before deploying to production.
It should be available on http://localhost:8080
and contain the poplava
folder with .mp3 files in it and poplava.xml
file which can be passed to the podcast app. I’m using https://overcast.fm and it works great.
Fin
Now you need to deploy it to the server in order to access URL from the internet, but it’s out of scope of this article, however, I’m using Traefik Proxy and Linode for it. You can explore my infra here and here is commit which do the steps above.
In my case, final link looks like this: https://podsync.katsick.cloud/poplava.xml