Featured image of post Download YouTube Audio

Download YouTube Audio

The easy and fast way to download audio from YouTube (and many more sites) that also splits chapters into tracks.

The Problem with Streaming

I love streaming music. Happy to pay the monthly subscription for access to the world’s music. It’s easy and convenient.

The downside of streaming is I don’t have any control over the available songs. They can go away, be replaced by remasters, or just not be on the service.

There are a ton of live performances of my favorite artists on YouTube that I want to keep and listen to again and again. It’s a lot like the bootleg CD’s I used to buy in record shops.

For special music, I like to keep a copy of my own, so I know it will never disappear and I can enjoy it again later.

How to Download audio from YouTube on a Mac

I’ve found a super simple way to download audio from YouTube and it even splits chapters into separate tracks. It’s called YT-DLP. There are ports to all major operating systems, but this guide focuses on MacOS.

It’s a command line tool, but it’s not hard to figure out. I’ll list the steps out below. If you can type text messages, you can do this.

Note: If you enjoy the work of a particular artist, support them! Buy merchandise, show tickets, or music directly from them.

Tools Needed

Once these are installed, you don’t need to install again.

Homebrew

The first step is installing Homebrew. It’s a tool that streamlines installing command line tools on the Mac.

Open the Terminal app. You should have a window that looks like this:

The Terminal window

Then type the following and hit return on your keyboard. Then wait for the stuff to finish. You’ll know it’s done when you see your computer name printed out again. Like it was on line 2 when you opened the Terminal.

1
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

That’s pretty much how all Terminal command tools work. You type a command and hit return and wait for the tool to do stuff.

FFmpg

Now that you have Homebrew installed, you can install about any command line tool you will ever need.

Next step is to add FFmpeg. It’s a tool for converting audio and video files. That’s something YT-DLP needs to work.

To install, type this line into the Terminal and hit return. Wait for it to finish and then move to the next step.

1
brew install ffmpeg

YT-DLP

Now it’s time to install the main tool that get’s the audio. Type this command into the Terminal and hit return on the keyboard.

1
brew install yt-dlp

When it’s done, you are ready to start downloading audio.

Use YT-DLP to Download the Audio

Now YT-DLP is ready to go!

In the Terminal, type the following, be sure to replace the URL with your video’s URL, and hit return on the keyboard. If you want to get all the videos in a playlist, use the playlist’s URL (not an individual video’s URL).

1
yt-dlp --split-chapters -x --audio-format aac --audio-quality 0 --write-thumbnail "https://www.youtube.com/watch?v=i6U8Nki1G8Q"

It should spend some time downloading and then it takes a few minutes to convert the files.

The files it downloads and generates will appear in your Mac’s Users folder. Usually, the one with your name on it. (It has your applications and documents folders there.)

You’ll see something like this while it runs:

Finder window with m4a output and a terminal window with the YT-DLP’s output

When it’s done, you’ll have some m4a files of the audio. If there were chapters in the video, each one will be a separate file and the last file will be larger and contain all the tracks in one, long file. You don’t have to save that one.

Add The M4As to Your Music App and Tag Them

Now add those files to your music app, add artwork (I usually just grab the YouTube thumbnail) and tag it correctly.

To import into Apple Music, drag the audio files YT-DLP just created onto the Music app’s icon.

Once imported, you can find the files that have been imported in the Recently Added area. Then select the first file and hit cmd + i on the keyboard. The info window on the file will come up. Edit the file’s metadata here. Add Artist, song title, album art and more. You can also edit multiple files at once.

The Apple Music Info window

All done!

Bonus tip for Apple Music:

If after adding your songs to your music library things aren’t syncing to your phone, run File/Library/Update Cloud Library and wait for it to sync. (Bottom left corner shows progress.) That should update things everywhere.

The Apple Music App menu

Way More YT-DLP Options

YT-DLP has a ton more features and can grab audio and video from many, many other sites. Once you get comfortable downloading audio like this, try some other stuff. Keep your favorite things from disappearing!

Built with Hugo
Theme Stack designed by Jimmy and modified by Josh. All content is written by a human. No AI was used to generate anything. Product links may be affiliate links.