Downloading and converting YouTube videos using youtube-dl (yt-dlp)

Up until quite recently, I’ve been using YTD Video Downloader in Windows for downloading YouTube videos, but even the paid version has issues. This weekend I rediscovered the steps I took using youtube-dl (yt-dlp) during last Xmas, and made a shell script to automate everything.