Difference between revisions of "YouTube Download Server"
(Created page with "{{{!}} class="wikitable" style="float: right; width: 322px;" border="2" {{!}}+ Proven on: {{!}}- < --="" debian="" --> {{!}} style="text-align: center; width: 60px;" {{!}} [[File:Logo Debian.png{{!}}60px{{!}}link=https://www.debian.org/{{!}}center{{!}}middle{{!}}frameless]] {{!}} style="text-align: center; width: 40px;" {{!}} 13 (trixie) {{!}} This includes a lightweight LXC <br> {{!}}} {{{!}} class="wikitable" style="border-collapse: collapse; width: 33%; left;"...") |
|||
| Line 29: | Line 29: | ||
= yt-dlp (formerly youtube-dl) = | = yt-dlp (formerly youtube-dl) = | ||
[https://github.com/yt-dlp/yt-dlp yt-dlp] is a pretty awesome tool. | [https://github.com/yt-dlp/yt-dlp yt-dlp] is a pretty awesome tool. | ||
As an added bonus, it also works with a fairly large number of other video sharing sites... | |||
'''Note:''' You'll need ffmpeg... | '''Note:''' You'll need ffmpeg... | ||
Revision as of 13:11, 18 September 2025
| 13 (trixie) | This includes a lightweight LXC
|
| As always... | |
|---|---|
|
Start with: |
|
There are a few good reasons to be set up to download YouTube videos.
- Geofencing
- Reliability
- Bandwidth Management
Fortunately, it's pretty easy to do.
yt-dlp (formerly youtube-dl)
yt-dlp is a pretty awesome tool.
As an added bonus, it also works with a fairly large number of other video sharing sites...
Note: You'll need ffmpeg...
sudo apt install ffmpeg
But don't install it through the package manager. It gets incredibly regular updates & the package manager kinda borks this.
Instead, install it directly:
sudo wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux -O /usr/local/bin/yt-dlpsudo chmod a+rx /usr/local/bin/yt-dlp
This allows you to regularly update (maybe even through cron) it with the command:
sudo yt-dlp -U
Which guarantees you keep up with the multitude of random changes made at YouTube.
Scripting
Example of a useful script to update a local copy of a YouTube Channel:
yt-dlp -w --download-archive 11111111-ARCHIVE --write-description -t mp4 -o "%(upload_date)s - %(title)s.%(ext)s" https://www.youtube.com/user/LastWeekTonight
This particular little script maintains a local archive of a channel that YouTube thinks Canadians should not be allowed to watch... (needless to say, it gets run on the VPN equipped Download Server.)
Storage
Storage space for downloading (Torrents & such) should be done on a dedicated drive.
I tend to do most of my storage via NFS served up by my dedicated storage server.
Create a DONE & a WIP folder on the storage drive. This will make it easier to keep things organised.
sudo mkdir /mnt/Download_Spacesudo vi /etc/fstab
StorageServer:/Download_Space /mnt/Download_Space nfs rw,user,exec 0 0
sudo mkdir /mnt/Download_Space/YTDL
If you don't want to use an NFS share for this, you could either add a dedicated drive or just set up the folders on the boot drive. I'd seriously recommend, at minimum, 500GB of available space.
Useful things
Configure your download server to use a good VPN.
sudo apt install mosquitto-clients- Handy for integrating the download server into your IoT infrastructure...
Also... Sidequest... Desktop YT downloading
YoutubeDownloader (Desktop downloader)
Quite functional as long as you don't mind a purely GUI application that can't remember where you really want it to put the files.
Doesn't seem to have any sort of installer...
Just hunt through the folder for the actual application in yer file explorer & double-click it.
It works & isn't particularly hard to use...
For a GUI app, the UI is incrediply limited, but functional enough to get the job done.