TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Self hosted YouTube media server

245 pointsby 037almost 2 years ago

12 comments

DCKingalmost 2 years ago
Tube Archivist is quite heavyweight as it&#x27;s meant to do heavy full archiving of YouTube channels and search through positively huge libraries. I&#x27;m getting the sense that it&#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.<p>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&#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 &quot;Movies&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.<p>It uses yt-dlp&#x27;s &quot;archive&quot; functionality to keep track of videos it&#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.<p>For my personal usage it&#x27;s been honed for a little while and now runs reliably for my purposes at least. Hope it&#x27;s useful to more people.<p>[1]: <a href="https:&#x2F;&#x2F;pastebin.com&#x2F;s6kSzXrL" rel="nofollow noreferrer">https:&#x2F;&#x2F;pastebin.com&#x2F;s6kSzXrL</a><p>[2]: E.g. <a href="https:&#x2F;&#x2F;danielmiessler.com&#x2F;p&#x2F;rss-feed-youtube-channel&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;danielmiessler.com&#x2F;p&#x2F;rss-feed-youtube-channel&#x2F;</a>
评论 #36750104 未加载
评论 #36750490 未加载
评论 #36749810 未加载
评论 #36750667 未加载
simonwalmost 2 years ago
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: <a href="https:&#x2F;&#x2F;github.com&#x2F;tubearchivist&#x2F;tubearchivist&#x2F;blob&#x2F;master&#x2F;tubearchivist&#x2F;home&#x2F;models.py">https:&#x2F;&#x2F;github.com&#x2F;tubearchivist&#x2F;tubearchivist&#x2F;blob&#x2F;master&#x2F;t...</a> - just a `Account` model.<p>It looks like Django + SQLite is used for user accounts, but all other data storage happens in Elasticsearch.<p>It&#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&#x27;s my own personal favourite stack. Not saying their design is bad, just different.
评论 #36749184 未加载
codetrotteralmost 2 years ago
Does it save the video thumbnail as well? Video description? Comments? Channel name? Channel avatar? etc<p>Currently I use yt-dlp to manually download individual videos that I want to keep. At the moment I only save the video itself. And most of the time I then also paste the URL of the video into archive.is save page and web.archive.org&#x2F;save so that there is a snapshot of what the video page itself looked like at the time. But this is still incomplete, and relies on those services continuing to exist. Locally saving a snapshot of the page like that, and then also saving the thumbnail and perhaps more of the comments would be nice.
评论 #36745915 未加载
评论 #36747738 未加载
评论 #36746947 未加载
评论 #36747279 未加载
评论 #36745764 未加载
评论 #36750348 未加载
评论 #36747975 未加载
c0brac0braalmost 2 years ago
I&#x27;ve had significant problems running this for extended periods.<p>It will crash and then restoration will fail internally with corruption errors, requiring reading through docker logs or just starting over from scratch completely.
renegat0x0almost 2 years ago
Ha, I have also wrote something similar<p><a href="https:&#x2F;&#x2F;github.com&#x2F;rumca-js&#x2F;Django-link-archive">https:&#x2F;&#x2F;github.com&#x2F;rumca-js&#x2F;Django-link-archive</a><p>I support not only youtube, but also any RSS source.<p>It functions as link aggregation software. I can also fetch meta for all videos in channel, and download videos, audios.<p>I am using standard Django auth module.<p>It still lacks polish, and it is under development. I am not a webdev, so I am still struggling with overall architecture
indusalmost 2 years ago
Interesting idea.<p>I always dream of writing a proxy server—-where all videos—-irrespective of device—-get stored in a local cache and served without going outside on subsequent requests.<p>Gonna try this one, and gonna take that direction.
评论 #36748207 未加载
评论 #36748875 未加载
评论 #36748375 未加载
snthdalmost 2 years ago
As a less sophisticated alternative there&#x27;s a metadata plugin for jellyfin <a href="https:&#x2F;&#x2F;github.com&#x2F;ankenyr&#x2F;jellyfin-youtube-metadata-plugin">https:&#x2F;&#x2F;github.com&#x2F;ankenyr&#x2F;jellyfin-youtube-metadata-plugin</a>
nullcipheralmost 2 years ago
I couldn&#x27;t find docs for installing from source. Is docker really mandatory ?<p>Also, &quot;Tube Archivist depends on Elasticsearch 8.&quot; . Wow, why?
评论 #36747742 未加载
评论 #36747258 未加载
评论 #36747053 未加载
MaikaDiHaikaalmost 2 years ago
I tried installing it half a year ago and the setup and documentation was really bad. Maybe I&#x27;ll try it again sometime
freefaleralmost 2 years ago
Looks great, I will try it, since YouTube broke my scirpts a while a go...<p>The way I was using them was to create a playlist named &quot;save&quot; and pulling from it once a day. It worked for a while, but YT started to ban somehow my script. Tube Archivist looks like would be ideal for that.<p>Thanks for sharing this!
评论 #36746663 未加载
ocdtrekkiealmost 2 years ago
I like prologic&#x27;s Tube. Way simpler, single Golang binary. Hosts video, not much else.
EGregalmost 2 years ago
How does it download videos? I thought YouTube blocked ripping videos?
评论 #36748839 未加载