YT-DLP Configs

Full-ish `yt-dlp` configs because I always have to look up its docs to reproduce.

Linux

# prevent extending this config further
--ignore-config

# abort downloading of further videos if an error occurs
--abort-on-error

# do not extract the videos of a playlist, only list them
--flat-playlist

# download only the video, if the URL refers to a video and a playlist
--no-playlist

# default format selection
--format "bv*+ba/b"

# select formats no larger than 720p
--format-sort "ext,res:720"

# prefer video formats with free containers over non-free ones of same quality.
--prefer-free-formats

# Restrict filenames to only ASCII characters,
# and avoid "&" and spaces in filenames
--restrict-filenames

# write subtitle file
--write-subs

# embed subtitles in the video (only for mp4, webm and mkv videos)
--embed-subs

# add chapter markers to the video file
--embed-chapters

# store videos in some separate path from default `Videos` folder
# this way if you decide to share you won't have to share the default folder
--paths ~/shared/videos

# store files by site -> profile -> year -> month -> day
# the end file also has the video ID in its name,
# so it could be searched by ID from file browser
--output %(extractor)s-[%(extractor_key)s]/%(uploader, channel)s-[%(channel_id, uploader_id)s]/%(release_date>%Y,upload_date>%Y|unknown)s/%(release_date>%m,upload_date>%m|unknown)s/(release_date>%d,upload_date>%d|unknown)s/%(title)s-(%(availability)s)[%(id)s][%(height)sp].%(ext)s

Windows

# prevent extending this config further
--ignore-config

# abort downloading of further videos if an error occurs
--abort-on-error

# do not extract the videos of a playlist, only list them
--flat-playlist

# download only the video, if the URL refers to a video and a playlist
--no-playlist

# default format selection
--format "bv*+ba/b"

# select formats no larger than 720p
--format-sort "ext,res:720"

# Prefer video formats with free containers over non-free ones of same quality.
--prefer-free-formats

# Restrict filenames to only ASCII characters,
# and avoid "&" and spaces in filenames
--restrict-filenames

# write subtitle file
--write-subs

# embed subtitles in the video (only for mp4, webm and mkv videos)
--embed-subs

# add chapter markers to the video file
--embed-chapters

# store videos in some separate path from default `Videos` folder
# this way if you decide to share you won't have to share the default folder
--paths "%USERPROFILE%\\shared\\videos"

# store files by site -> profile -> year -> month -> day
# the end file also has the video ID in its name,
# so it could be searched by ID from file browser
--output "%(extractor)s-[%(extractor_key)s]\\%(uploader, channel)s-[%(channel_id, uploader_id)s]\\%(release_date>%Y,upload_date>%Y|unknown)s\\%(release_date>%m,upload_date>%m|unknown)s\\%(release_date>%d,upload_date>%d|unknown)s\\%(title)s-(%(availability)s)[%(id)s][%(height)sp].%(ext)s"