# Backup Script with yt-dlp
<https://github.com/yt-dlp/yt-dlp>
## Simple Download
```bash
./yt-dlp \
-c \
-N 8 \
-f bestvideo*+bestaudio/best \
--merge-output-format mkv \
# output in folder named as playlist
-o '%(playlist)s/%(title)s.%(ext)s' \
# use aria2c as downloader
--downloader aria2c \
# Faster Download with aria2c
--downloader-args aria2c:"-j 16 -x 16 -s 16 -k 1M" \
# How to not get throttled by yt
--extractor-args youtube:player_client=android \
--throttled-rate 100K \
# No Spaces and Shit in file Names
--restrict-filenames \
https://www.youtube.com/watch?v=dQw4w9WgXcQ
```
## Download video_linklist
```bash
./yt-dlp \
# List of YT Videos / Playlists / Channels
-a linklist.txt \
-c \
-N 8 \
-f bestvideo*+bestaudio/best \
--merge-output-format mkv \
# output in folder named as playlist
-o '%(playlist)s/%(title)s.%(ext)s' \
--downloader aria2c \ # use aria2c as downloader
# Faster Download with aria2c
--downloader-args aria2c:"-j 16 -x 16 -s 16 -k 1M" \
# How to not get throttled by yt
--extractor-args youtube:player_client=android \
--throttled-rate 100K \
# No Spaces and Shit in file Names
--restrict-filenames \
# stores youtube video IDs of already downloaded videos, makes the cronscript MUCH faster
--download-archive alreadydownloaded.txt
```
## Watch Later -- firefox has to be installed and logged in into youtube
```bash
yt-dlp \
https://www.youtube.com/playlist?list=WL \
--cookies-from-browser firefox \
-c \
-N 8 \
--merge-output-format mkv \
-o 'watchlater/%(title)s.%(ext)s' \
--downloader aria2c \
--downloader-args aria2c:"-j 16 -x 16 -s 16 -k 1M" \
--extractor-args youtube:player_client=android \
--throttled-rate 100K \
--restrict-filenames \
--download-archive watchlater_alreadydownloaded.txt
```
## Music Download
```bash
yt-dlp \
-f ba \
-x \
--audio-format aac \
--sponsorblock-remove all \
-a music_linklist.txt \
-c \
-N 8 \
--merge-output-format mkv \
-o 'music/%(playlist)s/%(title)s.%(ext)s' \
--downloader aria2c \
--downloader-args aria2c:"-j 16 -x 16 -s 16 -k 1M" \
--extractor-args youtube:player_client=android \
--throttled-rate 100K \
--restrict-filenames \
--download-archive music_alreadydownloaded.txt
```
## linklist.txt
```
# Channel
https://www.youtube.com/user/melodysheep
```