Download Streaming Media

Terminal

This question was originally answered in the Q&A Thread in the forums.

ECV asked:

How do you rip audio from YouTube? I’ve been meaning to rip a Bellows acoustic session from YT for a while now but I want to make sure the audio quality is good, I figured you know the best way of doing this haha.

So there’s the easy way, and then the way I do it.

The easy way is to use a program like Downie. You can throw a whole lot of URLs at it and it’ll download almost all of them. You can even set it to do some post processing on files to extract the audio or convert to an mp3. It’s a good program, I think it’s $20. If you download a lot of audio/video from the internet, it’s a really good bargain.

I use the command line though because it gives me more control and I can make sure I get the high-quality file encoded exactly how I want in the quality I want. 95% of the time I use youtube-dl. It’s free. (And works with a lot of sites.)

If you’re on a Mac, it’s really easy to install. Open Terminal, and install Homebrew — a great package manager for macOS, just copy and paste this:

/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

Then to install youtube-dl (or any other package), it’s really easy, just type:

brew install youtube-dl

After that, you can download videos basically by just typing:

youtube-dl http://urltovideo

And it’ll download the highest quality video source directly to your computer. There’s a whole lot of other options you can use as well. I usually do:

youtube-dl -x –audio-format mp3 –audio-quality 320

To extract the audio from the video and convert it to a 320kbps mp3 (like those included above for Bleachers and Paramore). You can even just toss in the URL to a YouTube playlist and it’ll go through all of the stuff.

I know there are other programs out there as well that do something similar, but I’ve never found any that works as well as Downie, and I’ve never found anything that gives me the control I want as just doing it on the command line using youtube-dl. If I ever come up against anything I can’t get with youtube-dl (sometimes Soundcloud is weird), then I know Downie will get it. Their “user guided extraction” can basically let you play any file on a website and it’ll figure out the source file and download it.