Using Youtube-dl for downloading mp3 from Youtube

Youtube-dl is a very powerful command line tools that with making use of it you can download flash videos from almost every website. Working with it, is quite simple and you just need to provide an URL to download like below,


$ youtube-dl URL

Now in my case I wanted to download a playlist which contains around 400 music from Youtube in form of mp3, with the ability to pause, ignoring errors and also renaming the song based on the title. After doing little bit of research and reading manual page I combined various parameters which out come was something like below,


$ youtube-dl -cit --extract-audio --audio-format mp3 URL

-c  –> Resume partially downloaded files.

-i –> Ignore errors during download and continue processing.

-t –> Use the title of the video in the file name used to download the video.

– -extract-audio –> Create an audio-only file extracted from the video downloaded. Requires that ffmpeg and ffprobe be installed.

– -audio-format=FORMAT –> Set the audio format to be used for the extraction. Possible values are best, aac, mp3, with best being the default.

That’s it, so simple 🙂

Send your idea and information to kasra@madadipouya.com

Leave a Reply