download-youtube-videos.sh
· 827 B · Bash
Raw
#!/bin/bash
# */3 * * * /bin/bash -c "download-youtube-videos.sh"
path="/path/to/youtube"
sudo chown -R airikr:airikr "${path}"
yt-dlp \
--check-formats \
--progress \
--ignore-errors \
--download-archive "${path}/downloaded.txt" \
--format "bv*[height<1080][ext=mp4]+ba" \
--cookies-from-browser firefox:av9irb5a.edgren \
--merge-output mkv \
--write-info-json \
--write-annotations \
--write-thumbnail \
--convert-thumbnails jpg \
--add-metadata \
--convert-thumbnail jpg \
--embed-thumbnail \
--embed-chapters \
--embed-info-json \
--restrict-filenames \
--concurrent-fragments 3 \
--sponsorblock-mark all,-preview,-filler,-interaction \
--dateafter now-7days \
--playlist-end 10 \
-a "${path}/channels.txt" \
-o "${path}/%(channel)s/%(upload_date>%Y-%m-%d)s - %(title)s.%(ext)s"
sudo chown -R jellyfin:jellyfin "${path}"
1 | #!/bin/bash |
2 | # */3 * * * /bin/bash -c "download-youtube-videos.sh" |
3 | path="/path/to/youtube" |
4 | |
5 | sudo chown -R airikr:airikr "${path}" |
6 | |
7 | yt-dlp \ |
8 | --check-formats \ |
9 | --progress \ |
10 | --ignore-errors \ |
11 | --download-archive "${path}/downloaded.txt" \ |
12 | --format "bv*[height<1080][ext=mp4]+ba" \ |
13 | --cookies-from-browser firefox:av9irb5a.edgren \ |
14 | --merge-output mkv \ |
15 | --write-info-json \ |
16 | --write-annotations \ |
17 | --write-thumbnail \ |
18 | --convert-thumbnails jpg \ |
19 | --add-metadata \ |
20 | --convert-thumbnail jpg \ |
21 | --embed-thumbnail \ |
22 | --embed-chapters \ |
23 | --embed-info-json \ |
24 | --restrict-filenames \ |
25 | --concurrent-fragments 3 \ |
26 | --sponsorblock-mark all,-preview,-filler,-interaction \ |
27 | --dateafter now-7days \ |
28 | --playlist-end 10 \ |
29 | -a "${path}/channels.txt" \ |
30 | -o "${path}/%(channel)s/%(upload_date>%Y-%m-%d)s - %(title)s.%(ext)s" |
31 | |
32 | sudo chown -R jellyfin:jellyfin "${path}" |