How To Convert Youtube Videos To MP3 Audio Files

Download And Convert Youtube To MP3
Download And Convert Youtube To MP3.
Was this page helpful?

There is a Linux command line application called youtube-dl, which stands for Youtube downloader. This can be used to download youtube videos

It may be the case that you want to download just the audio from the video file to be played on your portable music devices such as an MP3 player or smartphone.

This article will show you how to download just the audio from a Youtube video.

Copyright should be adhered to when downloading and extracting the audio from videos but that doesn't make the practice illegal.

For instance, there are lots of how-to guides that are created in video format and certain video bloggers create content that is just as accessible in pure audio format. An example would be something like the Linux Action Show podcast although they do actually provide an MP3 download link from their site.

The best tool for converting Youtube videos to MP3 is youtube-dl.

How To Install The Youtube Downloader

You can download and install youtube-dl using the following commands:

Debian, Ubuntu, Linux Mint, Zorin and Other Derivatives

sudo apt-get install youtube-dl

 Note that sudo may or may not be required. Read this guide to find out more about the sudo command.

Red Hat, Fedora, CentOS and Other Derivatives

sudo yum install youtube-dl


sudo zypper install youtube-dl

Arch, Manjaro and Other Derivatives

sudo pacman -S youtube-dl

How To Download And Extract Audio From A Youtube Video

Find the video you want to download by visiting Youtube and searching for it.

Underneath the video, there will be a share link.

Click on the share link and select the link that appears with the mouse.

Open a terminal window and type the following command replacing the text paste_link_here with the link to the share link:

youtube-dl --extract-audio --audio-format mp3 -l paste_link_here

To paste into a Linux terminal right click and select paste from the menu or press shift and insert at the same time.

The text in the terminal should look something like this:

youtube-dl --extract-audio --audio-format mp3 -l

What this does is download the video from Youtube as a video and then extract just the audio part to MP3.

You are left with just the MP3 file and the video is discarded.

If you want to keep the video, as well as the MP3 file, add a -k to the command as follows:

youtube-dl --extract-audio --audio-format mp3 -k -l

You will now be left with an MP3 and an MP4 file. 

There are other ways to download and convert videos from Youtube to MP3. 

For instance, there are a number of Chrome plugins which can be used. The upside to using an add-on is that it is generally a one-click process with no command line knowledge required.

One such add-on is called Youtube To MP3. This will place a little icon in the address bar when you can convert a video to MP3.

Simply find the video you wish to convert and then press the icon. This takes you to which performs the conversion. When the conversion has completed you can download the MP3 file.

There are similar add-ons available for Firefox.

Personally, I think the youtube-dl tool is the cleanest solution. Not all of the add-ons in the Chrome store and within Firefox are safe and many of the add-ons are supported by adverts.

If you like the youtube-dl command, here are another 15 Linux terminal commands that will rock your world. Learn how to run commands in the background, run commands at a certain time and how to download files from the web from the command line.

When you have enough MP3 files you might want to read this guide to get the best out of Rhythmbox.