Skip to content

Instantly share code, notes, and snippets.

@thanthese
Created June 21, 2017 01:53
Show Gist options
  • Save thanthese/14eb3d436e97409bfdb6ed4268ca3f16 to your computer and use it in GitHub Desktop.
Save thanthese/14eb3d436e97409bfdb6ed4268ca3f16 to your computer and use it in GitHub Desktop.
Downloads the audio of a youtube video and converts to an .mp3 given a youtube URL.
#!/usr/bin/env bash
# Downloads the audio of a youtube video and converts to an .mp3 given a
# youtube URL.
if [ $# -eq 0 ]; then
echo "No arguments provided. Give full youtube URL."
exit 1
fi
youtube-dl --extract-audio --audio-format mp3 $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment