Skip to content

Instantly share code, notes, and snippets.

@arumals
Last active May 16, 2024 21:14
Show Gist options
  • Save arumals/4074dc26a028f9f16bbffdfc1787fabb to your computer and use it in GitHub Desktop.
Save arumals/4074dc26a028f9f16bbffdfc1787fabb to your computer and use it in GitHub Desktop.
Download a youtube video as mp3 directly from command line
# install yt-dlp from https://github.com/yt-dlp/yt-dlp
# add the following allias to your preferred shell configuration file
alias savemp3="yt-dlp -x --audio-format mp3 --audio-quality 0 --add-metadata --output \"%(uploader)s - %(title)s.%(ext)s\" https://www.youtube.com/watch\?v\="
# savemp3 videid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment