After a lot of feedback, I've decided to rename this project from "YouTubarr" to "Subarr". The name "Subarr" also helps define the project a little clearer in how it's based on RSS subscriptions (intended to be a "subscribe to playlists/channels & take action on new uploads") rather than a full PVR & media management system. If you're looking for a more true "Sonarr for YouTube", I recommend checking out one of the solutions below.
Subarr is a lightweight YouTube channel/playlist/subscription follower that will take action on new uploads (actions can be a webhook - like Discord - or a process - like downloading through yt-dlp). "Lightweight" means it needs few resources and can run on something like a raspberry pi.
This is an attempt to create a Sonarr-like application for YouTube videos. A lot of inspiration has been taken from Sonarr (mostly the UI), but this has been written entirely from scratch.
Why not use one of the existing solutions?
Here are all the similar things I could find and how this is different:
| Name | Active? | Stars | Indexer | Comment |
|---|---|---|---|---|
| Tube Archivist | ✅ | yt-dlp | Based on yt-dlp | |
| Pinchflat | ✅ | yt-dlp (but can also do RSS for "fast-sync") | ||
| ytdl-sub | ✅ | yt-dlp | No UI | |
| TubeSync | ✅ | yt-dlp | ||
| YTPTube | ✅ | yt-dlp | Essentially a web UI wrapper around yt-dlp | |
| Youtarr | ✅ | yt-dlp | ||
| Youtubarr | ✅ | YouTube API | Focused on music videos & Lidarr integration (also only recently created) | |
| Subscribarr | ✅ | RSS feeds | Includes YouTube playlists but is more generic *arr management (Sonarr & Radarr) | |
| Tubarr | ✅ | yt-dlp | No UI, “pre-pre-pre-alpha” status | |
| MetaTube | ❌ | N/A | Seems to only handle individual videos, not playlists | |
| Ytmdl | ❌ | youtube-dl | Also music-video specific | |
| Tubarr (Capstone Project) | ❌ | N/A | yt-dlp | Private (a student's capstone project) |
As you can see, there's a few other solutions, but most are based on yt-dlp for getting playlist information. This works fine if you want to index an entire playlist (which a user may, very well, want to do) but it can require a LOT of polling activity (particularly for large channels). Tube Archivist above even calls out 2-4GB of memory dedicated to its functionality. This project is lightweight and can easily run on a raspberry pi or similar. Additionally, none of the above services can automatically keep your actual subscriptions on YouTube in sync with the app.
Sonarr is based on RSS feeds - explicitly designed for this purpose of getting new updates from subscription-like sources. This is much lighter in processing requirements. I've also tried to make this UI as similar as possible to the other *arr apps for familiarity.
What are the limitations of the RSS feed approach?
YouTube already provides RSS feeds for playlists (eg https://www.youtube.com/feeds/videos.xml?playlist_id=PLopY4n17t8RDoFQPcjBKWDEblGH1sOH2h). However, they can be severly limited:
- Feeds seem to be limited to only the last 15 items
- However, Subarr will list more items as they are found because the internal database will be updated
- Since the feed is limited to only the last 15 items, if (for some reason) Subarr is down for an extended period of time (or a large amount of videos are published to the playlist in a short period of time), Subarr may miss some videos entirely.
- YouTube RSS feed items are always in "playlist order", meaning a new video added outside of the first 15 items will not be seen as an update to the RSS feed
- This means that, currently, RSS feeds will not work in the following situations: (issue logged with YouTube: https://issuetracker.google.com/issues/429563457)
- YouTube playlists greater than 15 items where items are added outside the "top 15" (regular playlists can be in any order - as determined by the playlist owner - which means that "newly added items" aren't necessarily at the top. Some creators' playlists are ordered oldest -> newest)
- >=15 items added to a playlist quickly (eg if a playlist has 1 item, then when it updates 15 minutes later it has 20 items, 4 of those items will be missed because only the top 15 will be in the RSS feed)
- This means that, currently, RSS feeds will not work in the following situations: (issue logged with YouTube: https://issuetracker.google.com/issues/429563457)
- RSS feeds may be somewhat slow to update (updates are approximately every 15 minutes). 15 minutes is pretty fast, but other methods (like the direct YouTube API - or perhaps even TubeSync's yt-dl method) could check for new videos even faster
- [May not be a big deal] RSS feeds will not include "Members Only" items
However, this works perfectly fine for mine (and maybe other people's) needs.
Subarr is NOT intended to do the following:
- Index an entire channel/playlist or get "older" videos. Subarr's RSS approach is specifically for "subscriptions": new video is posted, take some action
- Media management. Once Subarr kicks off the post-processor (like yt-dlp), its job is done. Use Plex/Jellyfin/etc or another one of the linked solutions above if you require more control over your media
- Add playlists
- Limit playlist items by regular expression
- Exclude shorts
- ytsubs.app integration to import user's YouTube subscriptions and keep them in sync
- Post processors (an action to run when a new video is found)
- Webhook: call a webhook (eg Discord, Raindrop.io, etc)
- Process: execute a process (eg yt-dlp to download the video)
- API key for authenticating calls to the server
- It would be neat to have some sort of web socket or other real-time communication between the server & client that will do things like updating the "last checked" or video list on the UI
- Native "url base" support like sonarr (for reverse proxies or cloudflare tunnels)
- Backup & Restore functionality (should be pretty easy by just giving a copy of the sqlite db?)
- Index more than 15 items initially? (this would require significant up-front processing power like TubeSync does - so...unlikely)
Make sure you have Node >= 18 installed, then run the following:
git clone https://github.com/derekantrican/subarr.git
cd subarr
npm install
# optionally create server/.env with PORT=5000 or whatever
npm run start-server # On Windows, use 'npm run start-server-win'
And if you'd like to set it to run at startup, put that last command into a .service file (Linux) or your Startup folder (Windows).
I am currently just building this as a hobby project for myself and I already have about 10x the amount of hobby projects that I can handle. I'll probably fix some bugs or maintenance issues as they arise, but I don't plan to work on any major features. If you'd like to contribute, please reach out!