Created
January 22, 2025 17:52
-
-
Save nmarley/eb7f68217173f398d95725e95ca88425 to your computer and use it in GitHub Desktop.
Download best quality audio from YouTube video
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# yt-dlp command to download the best audio quality from a youtube video | |
# yt-dlp --format bestaudio --extract-audio --audio-format opus --audio-quality 0 https://www.youtube.com/watch?v=jhoG3WcECnw | |
if [ -z "$1" ]; then | |
echo "Usage: $0 <youtube-url>" | |
exit 1 | |
fi | |
# Add the `--` at the end in case the video ID starts with a dash (YouTube does | |
# this sometimes) | |
yt-dlp --format bestaudio --extract-audio --audio-format opus --audio-quality 0 -- "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment