Created
November 23, 2019 12:54
-
-
Save johndpope/671f04d1550811649b082e8b9f229d03 to your computer and use it in GitHub Desktop.
download youtube to mp3
This file contains 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 | |
#PREREQ's: Install XCode Command Line Tools, Homebrew, and MacPorts | |
brew install wget lame #wget retrieves files via HTTP, lame is an MP3 encoder | |
sudo port install ffmpeg | |
sudo wget http://youtube-dl.org/downloads/2013.02.25/youtube-dl -O /usr/local/bin/youtube-dl | |
sudo chmod a+x /usr/local/bin/youtube-dl #make youtube-dl file executable | |
#make custom bash shortcut. Source: http://alias.sh/youtube-video-mp3-file | |
echo "mp3(){ youtube-dl $1 --extract-audio --title --audio-format mp3 }" >> ~/.zprofile | |
source ~/.zprofile | |
echo "Setup complete! To download, run 'mp3 {link}', where {link} is the YouTube Link" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment