Yt Dlp

Updated: December 15, 2024

Replacement for youtube-dl which seems to be depricated. The commands are also different.

Defaults

-c                        # continue downloaded parts/fragments
-mtime                    # use last modified date
--no-cookies              # do not read/dump cookies
--no-keep-fragments       # delete after download complete
--no-lazy-playlist        # parse whole playlist before processing videos
--no-write-subs           # no subtitle file

TLDR

# downlaod video with defaults bv and ba (Best video and audio)
yt-dlp "https://www.youtube.com/watch?v=SoMeDiGiTs"
-h                        # help
-U                        # update yt-dlp to latest version

-f <format>               # format
-F                        # list formats
-k                        # keep video
-o <filename>             # output filename
-q                        # quiet mode
-s                        # simulate download (dry run)
-w                        # do not overwrite any files
-I <start:stop:step>      # comma separated list "-I 1:3,7,-5::2"
--no-playlist             # only download video (use yes to get all videos in playlist)
--progress                # show bar even in quiet mode

# currently supported: avi, flv, gif, mkv, mov, mp4, webm, aac, aiff, alac,
# flac, m4a, mka, mp3, ogg, opus, vorbis, wav

-x                        # extract audio
--audio-format <format>   # audio format
--recode-video mkv        # reencode video to mkv
--remux-video mkv        # re-container video to mkv

-u <username>             # login username
-p <password>             # login password
-2 <twofactor>            # login 2FA code

--list-subs               # list subtitles
--sub-format <format>     # subtitle format
--sub-lang <language>     # subtitle language