Pages

Thursday, January 04, 2018

How to save and convert files from youtube

Downloading a video file from youtube was a very difficult operation some years ago. Now situations changed, several third party online portals offers such services like file conversion and downloading from youtube. Most portals requires the youtube video link to download the file. It's ok for one or two files. But when it comes to convert a playlist of videos, it becomes so difficult. Most of the third party services like keepvid and en.savfromnet.com sites give this feature for free. You have to pay for it. Why do you pay for it while, there is a better solution is at your reach? So Whats the solution?

It is youtube-dl

youtube-dl is a small piece of CLI (Command Line Interface) software mostly working in GNU/Linux platforms. But as of now, they have ported it to Windows too. So Windows users also can enjoy it. What I am explaining here is its Linux usage. Its very simple and easy to use. Even if you think you are not good in Command Line Interface, let it be the first step to understand what a Command Line experience is.

If you are Windows user, there is an executable file is available in the following site. Download it from here.
https://yt-dl.org/latest/youtube-dl.exe
If you are using, Ubuntu or Debian based Linux system use the following command to install the software from the Terminal.

apt-get install youtube-dl 


After the installation process done, please copy a youtube share link to do your first experiment. For an experiment, here is a link - https://youtu.be/L6-uJLteKek
We're now just going to download "Mr. Big - To Be With You (MV)"

youtube-dl https://youtu.be/L6-uJLteKek

After giving the command in the Terminal, just sit back and watch the verbose happening in the screen. Once the completion status reach 100%, check it in the current folder in the file manager.

Ok. You have downloaded the first Video file from youtube. Good. But when it will come to download multiple files and convert them into mp3 files, what will you do? The command is very simple. Now you are just going to copy a youtube play list link. Here is the example case. The Beatles collection - https://www.youtube.com/playlist?list=PL9-cZf_sidpkzR4W_LxvZjh4F7YFo4WoG
And here is the command to download all the files as mp3.

youtube-dl -i --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" https://www.youtube.com/playlist?list=PL9-cZf_sidpkzR4W_LxvZjh4F7YFo4WoG

Now just sit back and relax. It will convert all the files to mp3. So easy, so simple.

Search.web