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

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Marin Todorov

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.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

15 Responses

  1. Vilas says:

    Today I used the following command:

    # youtube-dl --embed- thumbnail --write-- thumbnail -x audio -format mp3 ((URL)- | youtube-dl --write-sub (URL)

    youtube-dl downloaded two files one audio & one video file is this wrong?

  2. jackson says:

    The WonderFox free hd I am using is a very good YouTube downloader and converter that makes it easy to download the music we want from YouTube and convert it to MP3 format. You can have a try!

  3. j says:

    Quick question, can this program include an id3tag in the mp3 file?

  4. 01101001b says:

    Great article and great tool! I use it almost every day. A pair of things that would be nice to add to your article would be how to provide a proxy to youtube-dl and youtube-dl taking links to download from a text file. Thx!

  5. Steve Armstrong says:

    I believe you are not allowed to save the soundtracks from songs as you won’t have a legal license and thus are infringing the content owners copyright.

    You should at least mention that in the article.

    You wouldn’t like it if someone ripped all your website content and posted it online so they could read it without the adverts as you would say you are losing income.

  6. Alfredo P. says:

    You might want to include the information on how to select or permanently set up a specific folder/path to download the file vs the home folder as the default location.

    Maybe link to the youtube-dl FAQ
    alter the information in the link in favor of the music folder as this specific article is about making them into mp3s.

    • Marin Todorov says:

      Thank you for your suggestion Alfredo. Actually since there was quite an interest towards this article, I am thinking about either updating this one or writing a new one with a script that will allow you to easily manage your downloads, without passing this many parameters each time you download a track.

  7. Chris G says:

    Hey Jeff. I understand your concern. It looks like the full source is available for download. Look here:

    If it helps, I have been using the youtube-dl script since Tecmint put out the original article in September with no weird side effects. (Running Linux Mint which is an Ubuntu variant.)


  8. Jos Collin says:

    There are lot of Firefox extensions available. You can install one of them and download video and mp3, while you are watching them in Firefox. So No need to use YouTube.dl

  9. Marin Todorov says:

    Hello Jeff,

    You don’t need to put the binary file in /usr/local/bin/. You can download it as regular user on your machine and place it in a directory by your choice from where you will access the file later. For example you can do:

    wget -O /home/tecmint/

    And then run the file from /home/tecmint/

    If you are interested in reviewing the documentation about youtube-dl, you can check the following link:

  10. You’re ask us to use our root privileges to install a binary in a system executable directory without the source code? How do we know that this isn’t malware of some kind, or a social engineering attack?

    I would really love to be able to do what you are doing, but without the source code, I’m not going to put it in a system directory.

    Maybe on a virtual machine or on a chroot’d machine.

    • Aaron Kili K says:

      @Jeff Silverman

      Great security concern there, may be you can check the source code out, i have used this program and i do not think from my assessment that it has any security concerns yet.

      But who knows, issues such as the one you have raised have to be put into great consideration.

      @Marin Todorov
      Thanks for the great article

    • Marin Todorov says:

      Apologies I didn’t have the time to provide the link to the source code of the application. I see that Josh already did that for me :)

      Still, I haven’t heard for any problems with youtube-dl, but you may always download it to a different location if you don’t like the one provided in the article.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.