These are my personal WSL Ubuntu yt-dlp notes. Feel free to pick-up whatever you might need.
Before starting, remember that those commands are related to my setup, see wsl
for more info.
# Update packages
sudo apt update
# ffmpeg
sudo apt install -y ffmpeg exiftool
# Python package: mutagen
pip install mutagen
# Python package: pycryptodomex
pip install pycryptodomex
# Python package: websockets
pip install websockets
# Python package: secretstorage
pip install jeepney cryptography SecretStorage
# RTMPDump
sudo apt install -y rtmpdump
# mplayer
sudo apt install -y mplayer
# yt-dlp
sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
sudo chmod a+rx /usr/local/bin/yt-dlp
# Folder output
mkdir ~/yt-dlp
cd ~/yt-dlp
sudo apt update
sudo apt upgrade -y
pip install mutagen pycryptodomex websockets jeepney cryptography SecretStorage
yt-dlp -U
yt-dlp --cookies youtube.com_cookies.txt --print formats_table [LINK]
yt-dlp --cookies youtube.com_cookies.txt --format "bestvideo[height<=1080][ext=mp4]+bestaudio[ext=m4a]/best[height<=1080][ext=mp4]/best[height<=1080]" --merge-output-format mp4 --audio-quality 0 --embed-thumbnail --embed-metadata [LINK]
yt-dlp --cookies youtube.com_cookies.txt --format "bestaudio[ext=m4a]/bestaudio" [LINK]
yt-dlp --cookies youtube.com_cookies.txt --format "bestvideo[height<=1080][ext=mp4]+bestaudio[ext=m4a]/best[height<=1080][ext=mp4]/best[height<=1080],bestaudio[ext=m4a]/bestaudio" --merge-output-format mp4 --audio-quality 0 --embed-thumbnail --embed-metadata [LINK]