Thursday, July 23, 2015

Download YouTube video as MP3

There are some ways to convert youtube video to mp3. I used to use online converter, but it fails when the video is lengthy (say more than 30 minutes). From my experience, the most convenient way for me is using youtube-dl (I love terminal. It is command based, so it might not very convenient for those who love GUI-based app). Here are the most convenient steps that I use:

The most convenient way to install is using pip. Followings are full steps for installation:
1. Install python
2. Download pip installer here.
3. Go to folder where you put then write this in your terminal
$ python
4. Now you have pip installed. Time to download youtube-dl. Type this in your teminal
$ pip install youtube-dl
1.  Now you can download youtube video and convert it to mp3. Just type this in your terminal (change the video URL to the one you want to download)
$ youtube-dl --extract-audio --audio-format mp3
2. If you are running behind proxy, you need to add into your command
$ youtube-dl --proxy http://username:password@proxy_address:proxy_port --extract-audio --audio-format mp3


No comments: