Skip to content

Latest commit

 

History

History
79 lines (53 loc) · 1.79 KB

wsl-yt-dlp.md

File metadata and controls

79 lines (53 loc) · 1.79 KB

Scripts: WSL Ubuntu Upgrade

Introduction

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.

Script

# 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

Commands

Update

sudo apt update
sudo apt upgrade -y
pip install mutagen pycryptodomex websockets jeepney cryptography SecretStorage
yt-dlp -U

List formats

yt-dlp --cookies youtube.com_cookies.txt --print formats_table [LINK]

Get Video (w/ Audio)

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]

Get Audio only

yt-dlp --cookies youtube.com_cookies.txt --format "bestaudio[ext=m4a]/bestaudio" [LINK]

Get Video (w/ Audio) + Audio

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]