Download Options for YouTube archiving
My goal is to download YT videos and import to Plex/Jellyfin so that the correct title, thumbnail, and description load with it in the library. This way the video appears native to the platform and it is easier to discern what the video is about.
Install
First make sure curl and ffmpeg are installed.
Then install yt-dlp onto your system.
sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
sudo chmod a+rx /usr/local/bin/yt-dlp
yt-dlp flags
Here is my full download command with flags:
yt-dlp --download-archive downloaded.txt -f 22 -i -o "%(uploader)s/%(title)s.%(ext)s" --write-thumbnail --convert-thumbnails png --embed-thumbnail --write-subs --write-auto-subs --embed-subs --sub-langs en --embed-chapters --embed-metadata --sponsorblock-mark all,-filler --dateafter 20230615 --match-filters 'tags !*= shorts' --batch-file=channel_list.txt
Might also try this to exclude livestreams:
--match-filter "is_live != true & was_live != true"
Notes and description of the above options:
--download-archivesaves to a file what videos have already been downloaded and to not do it again.-f 22sets the quality to 720p-iignore errors-o "%(uploader)s/%(title)s.%(ext)s"outputs the file to a directory of the channel and then saves the file with the title plus extension.--write-thumbnaildownloads the thumbnail--convert-thumbnailtopng--embed-thumbnailin the final file--write-subscreates a subtitle file if subtitles publisher created subtitles are found--write-auto-subscreates a subtitle file from the YT auto-generated subs--embed-subsin the final file--sub-langs ento only save the English subtitles--embed-chapterswrites the chapter markers in the video--embed-metadatawrites the video description into the final file to display in Jellyfin/Plex--sponsorblock-mark all,-fillermarks in the final file where all the SponsorBlock marks are, minus “filler” marking.--dateafter 20230615only downloads videos after June 15, 2023 (or whatever date needed)--batch-file=channel_list.txtreads atxtfile of all the URL’s to download. These will be full URL’s of channels to download.--match-filters 'tags !*= shorts'to skip YT Shorts