How To Pull Audio From A YouTube Video

Have you ever wanted or needed to pull (extract) audio from a YouTube video? The other day I had a requirement to do so; I thought I would share the simple process.

I’m a big fan of the Command Line Interface (CLI); so I will first show you how via the CLI package known as youtube-dl.

youtube-dl is available on most platforms; I’m using the Homebrew formulae for Mac.

Download Audio Track with youtube-dl

For this example I will pull (extract) the audio out from the “Beautiful Bass Speaker Test” video found at https://www.youtube.com/watch?v=t7cSSQzNnE8.

CLI Command

youtube-dl --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=t7cSSQzNnE8

Example Output

iMac:~ sully$ youtube-dl --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=t7cSSQzNnE8
[youtube] t7cSSQzNnE8: Downloading webpage
[download] Destination: Beautiful Bass Speaker Test-t7cSSQzNnE8.webm
[download] 100% of 2.22MiB in 00:00
[ffmpeg] Destination: Beautiful Bass Speaker Test-t7cSSQzNnE8.mp3
Deleting original file Beautiful Bass Speaker Test-t7cSSQzNnE8.webm (pass -k to keep)

With the –audio-format option you can specify the following formats: “aac”, “vorbis”, “mp3”, “m4a”, “opus”, or “wav”.

For a complete list of youtube-dl commands/options simply use the help option.

youtube-dl --help

CLI Alternatives

If you don’t have youtube-dl and/or don’t want to use the command line then you can pull pull audio from a YouTube video via the detail.com website!

An even faster/easier method of using detail.com is to simply change the YouTube video URL by substituting https://www. with pwn.

Example: https://pwnyoutube.com/watch?v=t7cSSQzNnE8