Music downloader. How to Download MP3 Tracks from a YouTube Video Using YouTube-DL

by Marin Todorov | Published: September 27, 2018 | Last Updated: September 27, 2018 Mpr3 download.

We all love listening to music. Whether it’s in the gym, at work, outside, music is part of our life. Everyone has their own music collection and undoubtedly everyone likes to expand it. While there are streaming services such as Spotify, many people still like downloading their own music and organizing their albums and playlists.

Today we are going to show you how to easily download mp3 tracks from YouTube videos. To complete this, we will be using YouTube-DL – a command line video download tool for Linux. Based on python, youtube-dl can be used on almost all (if not all) Linux distributions. If you haven’t heard about this tool already, I urge you to check our detailed review of youtube-dl in the link below:

In this tutorial you will learn how to download mp3 tracks from Youtube using youtube-dl tool. Of course, first you will need to have it installed on your system. If you haven’t checked the above article yet, here is how to install it:

Install YouTube-DL – A Youtube Video Downloader for Linux

YouTube-DL is available for both CentOS/RHEL/Fedora and Ubuntu/Debian/ derivatives and it can be easily installed by using the following commands:

$ sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl $ sudo chmod a+rx /usr/local/bin/youtube-dl

Download MP3 Track from Youtube Video in Linux

Youtube-dl has quite an extensive

page and if you want to review it, simply type:

If you are looking for a specific option, I recommend using the “grep” utility and search for specific word as shown.

# youtube-dl --help | grep extract-audio

Pink floyd mp3 free download

Now to download a video as mp3 track, we need the following two options:

To download a video as mp3 file, you can use one of the following commands:

# youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=jwD4AEVBL6Q

If you want to have a cover art for the mp3 file, you can add the

In that case the command will look like this:

# youtube-dl -x --embed-thumbnail --audio-format mp3 https://www.youtube.com/watch?v=jwD4AEVBL6Q

Download Multiple MP3 Tracks from YouTube Playlist

As you probably noticed, youtube playlists are getting more and more popular lately. So the chances are that you will want to download more than one track from a playlist. Luckily youtube-dl provides an option to download a whole playlist or just a range of songs within it.

For that purpose, you will need to use the following options:

– Playlist video to start at (default is 1)

Free music download sites mp3

– Playlist video to end at (default is last)

is the starting and ending point of the playlist. The command below will download the first 5 songs from the given playlist:

# youtube-dl -x --audio-format mp3 --playlist-start 1 --playlist-end 5 https://www.youtube.com/playlist?list=PL9LUD5Kp855InMnKTaRy3LH3kTIYJyBzs

If you prefer to download the whole playlist, don’t use the playlist-start and playlist-end parameters. Instead, simply pass the playlist URL.

Download MP3 Tracks from Different YouTube Playlist

We also know that you may not like all the songs in other people’s playlists. So what if you want to download many songs from different playlists? Well a workaround on that matter is to get a list of URLs in a single file.

Write the URLs in a file called

and make sure to keep one URL at a line. Then you can use the following

loop to download the songs:

# for i in $(<videos.txt); do youtube-dl -x --audio-format mp3 $i; done

Free mp3 music

The above is a simple solution to download multiple songs from different Youtube URLs.

Conclusion

Youtube-dl is a simple, yet powerful tool that can help you to download music on your devices. You are now ready to expand your music libraries to a whole new level.

If you have any questions or comments, please do not hesitate to submit them in the comment section below.

I am a bachelor in computer science and a Linux Foundation Certified System Administrator. Currently working as a Senior Technical support in the hosting industry. In my free time I like testing new software and inline skating.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

Next story How to Test Network Throughput Using iperf3 Tool in Linux

You may also like...

16 Responses

mp3-free-downloads.com

Posted by at 04:50PM

Tags: music downloader, mp3 song download, free mp3 download websites, search mp3 free download, free mpe music downloader, download converter, mpe3 download free, pink floyd mp3 free download, free mp3 music, free music download sites mp3

Overall rating page: 4.69/5 left 27155 people.

Comments

There are no comments for this post "How to Download MP3 Tracks from a YouTube Video Using YouTube-DL". Be the first to comment...

Add Comment