HowTo download music from youtube, bandcamp, soundcloud and other popular sites with youtube-dl

There is a unique utility that allows us to perform this thing. It also allows you to download from social networks such as Facebook. Sounds cool! A full list of supported sites can be found at this link

There are hundreds of sites available for use!

The utility is called youtube-dl, it is a console tool. It works on many systems, including Windows, Linux and FreeBSD.

HowTo install youtube-dl on Windows

You just need to download the executable .exe file and put it in any directory you want. It is NOT an installation file! We will continue to work with it in the console! Here is the link

Just click on the Windows.exe at the top. It doesn’t require a python on Windows, it’s just one 8MB file.

Installation on Linux

The easiest way is to use these commands.

sudo wget -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

But it is possible to use curl for downloading or even a browser.

How to use youtube-dl on Windows

First, open your command line (CMD) or PowerShell. What do you use more often.

CMD. How it looks like

Second, go to the directory where the file was downloaded. Use the cd command to do it.

cd C:\Users\John\Desktop 

Check to make sure it works. Just type


After that, different hints should be displayed. If that’s the case, then everything is fine.

How To update youtube-dl

We can just use this command

youtube-dl -U

Try to update as often as possible. Sometimes media sites change their codes and the download script can report an error. A simple solution is to upgrade youtube-dl.

How To download music from soundcloud

It seems for a simple user, without privileges, on the soundcloud service, all songs are stored in mp3 format with an audio bitrate of 192 kilobits.

Therefore, we can use a simple command, you only need to fix it for your own needs. Here is a template.

youtube-dl -o "C:\Audio_Directory\%(title)s.%(ext)s" -f bestaudio

where -o means directory path, and %(title)s.%(ext)s means that your audio filename will be in Author – Song.mp3 format. Or you can set the file name yourself by C:\Audio_Directory\Audio_track_name.mp3

How To download music from bandcamp in high quality (even flac)

First you need to know in what formats your music is stored on this site, type this command, replace the URL of the song with your

youtube-dl -F

Then, you should see something like this

[info] Available formats for 3105741018:
format code    extension  resolution note
mp3-128        mp3        audio only mp3  @128k
aac-hi         m4a        audio only AAC , 5.82MiB
vorbis         ogg        audio only Ogg Vorbis , 6.96MiB
mp3-v0         mp3        audio only MP3 V0 , 9.82MiB
mp3-320        mp3        audio only MP3 320 , 11.25MiB
flac           flac       audio only FLAC , 59.41MiB
alac           m4a        audio only ALAC , 59.89MiB
aiff-lossless  aiff       audio only AIFF , 74.10MiB
wav            wav        audio only WAV , 74.10MiB (best)

These are available formats and all information about them. Choose any desired. Remember its format code(It is listed in the left column).

For example, let’s take mp3 format with a bitrate of 320 kilobits, this is quite high quality. This corresponds to the format code mp3-320.

We need to remember it and use it in the next command

youtube-dl -o "/home/user/Music/%(title)s.%(ext)s" -f mp3-320 

Don’t forget to change the URL and download directory

The song will be downloaded.

How To download music from youtube in mp3 format

This command requires an installed ffmpeg. Because ffmmeg uses to change the format with a minimum of loss in quality.

youtube-dl -o "C:\Music\%(title)s.%(ext)s" -f bestaudio --audio-quality 0 --prefer-ffmpeg --extract-audio --audio-format mp3

Don’t forget to change the URL and download directory