<story><title>Self hosted YouTube media server</title><url>https://www.tubearchivist.com/</url></story><parent_chain></parent_chain><comment><author>DCKing</author><text>Tube Archivist is quite heavyweight as it&amp;#x27;s meant to do heavy full archiving of YouTube channels and search through positively huge libraries. I&amp;#x27;m getting the sense that it&amp;#x27;s a data hoarding tool, not a casual web video watching tool. I found that I just want to add a few channels to my media library, for which I use Jellyfin already.&lt;p&gt;For people looking for a more lightweight option of that kind, I run the following script hourly [1]. This script uses yt-dlp to go through a text file full of YouTube RSS urls (either a channel RSS or a playlist RSS works for channels where you&amp;#x27;re only interested in a subset of videos) [2] and downloads the latest 5 videos organized in folders based on channel name. I watch these files by adding the output folder in a Jellyfin &amp;quot;Movies&amp;quot; type library sorted by most recent. The script contains a bunch of flags to make sure Jellyfin can display video metadata and thumbnails without any further plugins, and repackages videos in a format that is 1080p yet plays efficiently even in web browsers on devices released in at least the last 10 years.&lt;p&gt;It uses yt-dlp&amp;#x27;s &amp;quot;archive&amp;quot; functionality to keep track of videos it&amp;#x27;s already downloaded such that it only downloads a video once, and I use a separate script to clean out files older than two weeks once in a while. Running the script depends on ffmpeg (just used for repackaging videos, not transcoding!), xq (usually comes packaged with jq or yq) and yt-dlp being installed. You sometimes will need to update yt-dlp if a YouTube side change breaks it.&lt;p&gt;For my personal usage it&amp;#x27;s been honed for a little while and now runs reliably for my purposes at least. Hope it&amp;#x27;s useful to more people.&lt;p&gt;[1]: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;pastebin.com&amp;#x2F;s6kSzXrL&quot; rel=&quot;nofollow noreferrer&quot;&gt;https:&amp;#x2F;&amp;#x2F;pastebin.com&amp;#x2F;s6kSzXrL&lt;/a&gt;&lt;p&gt;[2]: E.g. &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;danielmiessler.com&amp;#x2F;p&amp;#x2F;rss-feed-youtube-channel&amp;#x2F;&quot; rel=&quot;nofollow noreferrer&quot;&gt;https:&amp;#x2F;&amp;#x2F;danielmiessler.com&amp;#x2F;p&amp;#x2F;rss-feed-youtube-channel&amp;#x2F;&lt;/a&gt;</text></comment>
<story><title>Self hosted YouTube media server</title><url>https://www.tubearchivist.com/</url></story><parent_chain></parent_chain><comment><author>simonw</author><text>I saw this was a Django app so I dug around to look at their models. As far as I can tell this is all they have: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;tubearchivist&amp;#x2F;tubearchivist&amp;#x2F;blob&amp;#x2F;master&amp;#x2F;tubearchivist&amp;#x2F;home&amp;#x2F;models.py&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;tubearchivist&amp;#x2F;tubearchivist&amp;#x2F;blob&amp;#x2F;master&amp;#x2F;t...&lt;/a&gt; - just a `Account` model.&lt;p&gt;It looks like Django + SQLite is used for user accounts, but all other data storage happens in Elasticsearch.&lt;p&gt;It&amp;#x27;s an interesting design decision. I would have gone all-in on the database, and used SQLite FTS in place of Elasticsearch for simplicity, but that&amp;#x27;s my own personal favourite stack. Not saying their design is bad, just different.</text></comment>