Last active 1741649047

Revision 5d07427310b2cfc1471d91c36a6a5b34a8b12298

download-youtube-videos.sh Raw
1#!/bin/bash
2# */3 * * * /bin/bash -c "download-youtube-videos.sh"
3path="/path/to/youtube"
4
5sudo chown -R airikr:airikr "${path}"
6
7yt-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
32sudo chown -R jellyfin:jellyfin "${path}"