Mastermind
Member
With the help of youtube-dl you can download entire youtube channels and playlists.
It's available for both Windows and GNU/Linux.
Windows
If you are under windows, download the executable (or compile it) from https://github.com/ytdl-org/youtube-dl/releases and put it into a folder.
In the same folder you'll need ffmpeg. You can downlad and compile the source from https://ffmpeg.org/download.html or get the executable from https://www.gyan.dev/ffmpeg/builds/
Create a .bat file and put the following inside:
Double click on the bat file and it will download all the missing videos in sequence.
GNU/Linux
If you are under GNU/Linux the easiest way to install youtube-dl is using the package manager.
On devuan/debian/ubuntu you'd run
Create a .sh file and put the following inside:
Example:
Add execution rights:
Then execute it:
Config files
Here's an example for an audio only download:
For audio and video, change the -f (format) parameter to:
high quality:
medium quality:
low quality:
If you want to download a playlist instead of a channel, just give it the playlist URL instead of the channel URL.
Right now youtube is limiting downloads to about 70 kb/s. If you want to download faster you'll have to add the cookie parameter. I just leave it at 70 kb/s and it'll download everything eventually.
It's available for both Windows and GNU/Linux.
Windows
If you are under windows, download the executable (or compile it) from https://github.com/ytdl-org/youtube-dl/releases and put it into a folder.
In the same folder you'll need ffmpeg. You can downlad and compile the source from https://ffmpeg.org/download.html or get the executable from https://www.gyan.dev/ffmpeg/builds/
Create a .bat file and put the following inside:
Code:
[path to youtube-dl.exe] --config-location "[path to config file for channel 1]"
[path to youtube-dl.exe] --config-location "[path to config file for channel 2]"
[path to youtube-dl.exe] --config-location "[path to config file for playlist 1]"
GNU/Linux
If you are under GNU/Linux the easiest way to install youtube-dl is using the package manager.
On devuan/debian/ubuntu you'd run
Code:
sudo apt install youtube-dl
Code:
#!/bin/bash
youtube-dl --config-location "[path to config file for channel 1]"
youtube-dl --config-location "[path to config file for channel 2]"
youtube-dl --config-location "[path to config file for playlist 1]"
Example:
Code:
youtube-dl --config-location "~/Adrian_von_Ziegler/__config"
Add execution rights:
Code:
sudo chmod u+x your_script.sh
Code:
./your_script.sh
Config files
Here's an example for an audio only download:
Code:
# Output format
-o "~/Adrian_von_Ziegler/%(title)s.%(ext)s"
# Archive Settings
--download-archive "~/Adrian_von_Ziegler/__downloaded"
# skip on error
-i
# continue downloads
-c
# do not overwrite
--no-overwrites
# Uniform Format
--merge-output-format webm
# Debug
-v
# Format
-f "bestaudio[acodec=opus]"
--playlist-reverse
--limit-rate 500k
--no-call-home
--force-ipv4
--sleep-interval 15
--max-sleep-interval 45
--write-info-json
--add-metadata
# Channel URL
https://www.youtube.com/c/AdrianvonZiegler/videos
For audio and video, change the -f (format) parameter to:
high quality:
Code:
-f "best"
Code:
-f "bestvideo[height=720][vcodec^=vp9][fps<=30]+bestaudio[acodec=opus]/bestvideo[height=720][vcodec^=avc1][fps<=30]+bestaudio[acodec=opus]/bestvideo[height=720]+bestaudio[acodec=opus]/best"
Code:
-f "bestvideo[height=360][vcodec^=vp9][fps<=30]+bestaudio[acodec=opus]/bestvideo[height=360][vcodec^=avc1][fps<=30]+bestaudio[acodec=opus]/bestvideo[height=360]+bestaudio[acodec=opus]/worst"
If you want to download a playlist instead of a channel, just give it the playlist URL instead of the channel URL.
Right now youtube is limiting downloads to about 70 kb/s. If you want to download faster you'll have to add the cookie parameter. I just leave it at 70 kb/s and it'll download everything eventually.