Skip to content

Instantly share code, notes, and snippets.

@j8r
Last active February 13, 2022 22:35
Show Gist options
  • Save j8r/e61454bf14987431a8cb8a07b9615449 to your computer and use it in GitHub Desktop.
Save j8r/e61454bf14987431a8cb8a07b9615449 to your computer and use it in GitHub Desktop.
youtube-dl mp3 music download
# python3 -m pip install --user --upgrade youtube-dl
# ~/.local/bin should be in the PATH in ~/.bashrc / ~/.zshrc (PATH=$PATH:~/.local/bin)
# now at ~/.local/bin/youtube-dl
youtube-dl -o "%(title)s.%(ext)s" -f bestaudio --embed-thumbnail --extract-audio --audio-quality 0 --audio-format mp3 $URL
# yt-dlp
# python3 -m pip install --user --upgrade yt-dlp
yt-dlp -o "%(title)s.%(ext)s" --embed-thumbnail --extract-audio --audio-quality 0 --audio-format opus $URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment