This is my shell alias for yt-dlp that simplifies archival of both individual videos and entire channels.
ytdl "https://some-video-or-channel.url"Add metadata to the video file.
Embeds the video thumbnail into the downloaded file. This incidentally causes yt-dlp to convert the video to an MKV file, which I actually find preferable.
Embed subtitles, which I don't think yt-dlp does by default.
Embed chapters; again, another thing I yt-dlp doesn't do by default.
Works around any issues with ads and age-restricted videos. Especially helpful if you have YouTube Premium.
I find that having an interval of 20 seconds between individual video downloads reliably avoids rate-limiting. Yt-dlp is supposed to respond accordingly to the rate-limiting interval that YouTube returns, but I've noticed that rate-limiting sometimes happens anyway. This added interval is better insurance.
Keeps a list of downloaded videos in a text file. This ensures that you can resume or download new videos from a channel using the same command without redownoading all of the videos.