Create podcast feeds from YouTube channels and playlists
- Generate RSS feeds that can be added to podcast apps with support for video podcasts (e.g. Pocket Casts)
- Simple web server for serving RSS feed data, video links, and UI
YouTubeCast has been re-architected from the ground up given the recent prioritization for self-hosting (see the December 2024 changes for context). Support for downloading videos at 1080p quality is now included natively inside YouTubeCast (alongside support for video streaming up to 720p) without needing to use the now-deprecated YouTubeCast Video Server.
Additional Changes:
- To simplify the setup, video quality is no longer configurable on a per-feed basis. Instead, by default, video streaming is enabled at up-to-720p quality, and you can optionally set
downloadVideos
to true in yoursettings.json
to download videos to your machine at up-to-1080p quality. - Settings are now stored in a
settings.json
file under aconfig
folder instead of using environment variables. If you would like to use YouTube cookies, you can place acookies.txt
file inside theconfig
folder instead of using environment variables. - Support for
ENABLE_PLAYLIST_SORTING
has been removed for now due to the complexity of supporting it. - Any video shorter than 2 minutes long is assumed to be a YouTube Short and is excluded from feeds. Inversely, any video longer than 2 minutes will be included even if it is a YouTube Short.
- There is currently no support for cleaning up old video downloads. This may be included in a future update.
Prerequisites:
- Ensure Docker is set up and running on your machine (https://docs.docker.com/get-docker)
- Set up a hostname that can be used to access your machine from the internet (can use a static IP address as well)
- Get a YouTube API v3 key set up (https://developers.google.com/youtube/v3/getting-started)
To run this application using Docker:
- Create the
docker-compose.yml
file as described below - Run
docker-compose up -d
in the folder where yourdocker-compose.yml
lives - Check the logs using
docker-compose logs -f
to see if there are any errors in your configuration - Open your
settings.json
file inside yourconfig
folder and set youryoutubeApiKey
- Access the UI on port 80, input a channel's name, and add the podcast feed to your podcast app of choice
services:
youtubecast:
image: trevorsharp/youtubecast:latest
container_name: youtubecast
restart: unless-stopped
ports:
- 80:3000
volumes:
- ./config:/app/config
Create a file named docker-compose.yml
with the contents above.
{
"youtubeApiKey": "",
"downloadVideos": false
}
If you want to download YouTube content that requires user authentication to download, you will need to add cookies to your configuration. One reason for needing this is to download members-only videos. Note that the source of these videos (channel, user, or playlist) still must be either public or unlisted. For members-only videos, go to the channel's home page and scroll down to find an auto-generated playlist titled "Members-only videos" which will contain all the videos posted for members of the channel.
To generate this file:
- Download a browser extension (such as this one for Chrome)
- Log in to YouTube
- With a YouTube tab open, open the cookies.txt extension and download the cookies.txt file
- Copy the file into your config folder and rename it to
cookies.txt
If you want to serve videos at 1080p quality, you will have to enable the option to download videos to your machine. Note that this will significantly increase your disk usage. Enabling this option may break the ability to download videos in within your podcast app.
To enable this option:
- Set
downloadVideos
totrue
in yoursettings.json
- Add
- ./content:/app/content
to thevolumes
section of yourdocker-compose.yml
file
NOTE - Everything inside your content
folder will be accessible via the web server. DO NOT place any files that you do not want to be accessed inside this folder. It should only contain the video files (and HLS playlist files) that are downloaded by YouTubeCast.
As of December 2024, YouTubeCast is no longer publicly hosted. YouTube has made changes to combat bot traffic that make it impractical to host a publicly available version of YouTubeCast. Self-hosting should be used instead moving forward.
Additional Changes:
- YouTubeCast Video Server is being deprecated in favor of unifying all of YouTubeCast's functionality in a single project. For now, support for videos in higher quality (above 720p) has been removed.
This functionality may become available directly within YouTubeCast at a later date. If you want to keep this functionality in the interim, you can continue to use the Docker images for both YouTubeCast and YouTubeCast Video Server with the tagSee the April 2025 changes for this feature directly within YouTubeCast.legacy
. - YouTube Shorts are now always exlcuded and the
excludeShorts
query parameter has been deprecated. - Support for Redis cache has been removed as distributed hosting is no longer practical (in-memory cache will be used instead).