Created
May 25, 2020 18:17
-
-
Save hmain/820c12d114bc1ce21f1c880ead6981b0 to your computer and use it in GitHub Desktop.
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
# .config/youtube-dl/config | |
# all the metadata (including description, annotations, view/like count, etc) in a nice and parseable format | |
--write-info-json | |
# This keeps track of all the videos you have downloaded so they can be skipped over the next time it's ran or the next time it finds that video. | |
--download-archive "youtube-dl_archive.log" | |
# Ignore any errors that occur while downloading. Occasionally they will happen and this just ensures things keep moving along as intended. Don't worry, the next time it is ran any videos that didn't fully download will most likely be picked right back up where it left off! | |
-i | |
# These just embed metadata into the video once it's done downloading. You never know when this will come in handy, and having it all right in the video's container is nice. Just a little note, at the time of writing this post, ffmpeg can't embed images into a mkv, but the image is still downloaded and stored in the same location and with the same name as the video. | |
--add-metadata --all-subs --embed-subs --embed-thumbnail | |
# This will filter videos out that you don't want to download. Here is just a basic example of filtering out playlists with the title "Liked Videos" and "Favorites". I find this especially useful for filtering out playlists that contain a bunch of videos from other playlists. | |
--match-filter "playlist_title != 'Liked videos' & playlist_title != 'Favorites'" | |
# prefer videos in 1080 with more than 30 fps, then 1080 30 fps, and that repeats for 720. I also prefer to get audio in opus if it's available | |
-f "(bestvideo[vcodec^=av01][height>=1080][fps>30]/bestvideo[vcodec=vp9.2][height>=1080][fps>30]/bestvideo[vcodec=vp9][height>=1080][fps>30]/bestvideo[vcodec^=av01][height>=1080]/bestvideo[vcodec=vp9.2][height>=1080]/bestvideo[vcodec=vp9][height>=1080]/bestvideo[height>=1080]/bestvideo[vcodec^=av01][height>=720][fps>30]/bestvideo[vcodec=vp9.2][height>=720][fps>30]/bestvideo[vcodec=vp9][height>=720][fps>30]/bestvideo[vcodec^=av01][height>=720]/bestvideo[vcodec=vp9.2][height>=720]/bestvideo[vcodec=vp9][height>=720]/bestvideo[height>=720]/bestvideo)+(bestaudio[acodec=opus]/bestaudio)/best" | |
# folder structure of "[CHANNEL NAME]/[PLAYLIST NAME]/[PLAYLIST INDEX] - [VIDEO TITLE] - [YOUTUBE VIDEO ID].[EXTENSION]". | |
--merge-output-format mkv -o "%(playlist_uploader)s/%(playlist)s/%(playlist_index)s - %(title)s - %(id)s.%(ext)s" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment