Last active
June 28, 2025 17:08
-
-
Save TalalMash/b8d27da2eb3c4eee8e95b67d721bbc57 to your computer and use it in GitHub Desktop.
yt-dlp archiver with resolution limit, thumbnail and metadata embeds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#Youtube playlist/video archiver, downloads changes on subsequent run, keeps track in archive.txt file. | |
#Install yt-dlp from pip: pip install yt-dlp --break-system-packages | |
#Reopen terminal, run `sh ytdl.sh https://playlistvideourlhere <optional command>` | |
#Use cookies and remove sleep-interval max-sleep-interval for much faster playlist parsing and speeds. | |
# --cookies ${COOKIES} \ | |
#https://chromewebstore.google.com/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc | |
QUALITY="bestvideo[height<=720]+bestaudio" | |
ARCHIVE_LIST="archive.txt" | |
LOG=log.txt | |
#COOKIES=cookies.txt | |
yt-dlp \ | |
--download-archive ${ARCHIVE_LIST} \ | |
--embed-metadata \ | |
--embed-subs \ | |
--buffer-size 2048K \ | |
--sleep-interval 17 \ | |
--max-sleep-interval 135 \ | |
--no-call-home \ | |
--merge-output-format mkv \ | |
--format ${QUALITY} \ | |
-ciw --restrict-filenames \ | |
--convert-thumbnails jpg \ | |
--embed-thumbnail \ | |
-o "thumbnail:%(title)s.%(ext)s" \ | |
-o "%(title)s.%(ext)s" \ | |
-v $1 $2 > ${LOG} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment