May 9, 2013

How to convert YouTube Video to MP3 easily on GNU/Linux


May 072013
 
youtube2mp3

While looking at the top 10 download of Ubuntu app center for the month of April 2013 I’ve discovered a new software available for Ubuntu : YouTube to MP3.
It’s not a secret that on youtube there are a lof of music videos and also some full albums, and so with this software you can download them as mp3 file and listen them in a second moment or on a mp3 player.
YouTube to MP3 allows you to download and convert multiple videos into audio files, to do this you have simply to enter the URL of the video on youtube by clicking the Paste button or dragging in the window.



Installation

If you use Ubuntu you can install this software directly from the Ubuntu app center, If you are using Ubuntu 12.04 and have problem with YouTube to MP3 Converter type the following command in the Terminal:
sudo apt-get install ffmpeg libmp3lame0 libavcodec-extra-53
Or as alternative you can download the package from the official website , but as first thing install the pre-requisites with the following command:
sudo apt-get install ffmpeg libavcodec-extra-53
And after that install the package with the command
sudo dpkg -i YouTubeToMP3.amd64.deb
While installing it on my Mint Nadia (based on Ubuntu 12.10) I got a small problem:

mint-desktop tmp # sudo apt-get install ffmpeg libavcodec-extra-53
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 ffmpeg : Depends: libav-tools but it is not going to be installed
          Depends: libavdevice53 (>= 6:0.8.3-1~) but it is not going to be installed or
                   libavdevice-extra-53 (>= 6:0.8.6) but it is not going to be installed
          Depends: libavfilter2 (>= 6:0.8.3-1~) but it is not going to be installed or
                   libavfilter-extra-2 (>= 6:0.8.6) but it is not going to be installed
 libavcodec-extra-53 : Depends: libavutil-extra-51 (>= 6:0.8.6ubuntu0.12.10.1) but it is not going to be installed
                       Depends: libopenjpeg2 but it is not going to be installed
                       Conflicts: libavcodec53 but 6:0.8.6-0ubuntu0.12.10.1 is to be installed
 libavcodec53 : Conflicts: libavcodec-extra-53 but 6:0.8.6ubuntu0.12.10.1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
But following the suggestion I solved the problem
mint-desktop tmp # sudo apt-get -f install
....
At the end of the process I had everything solved and the software installed correctly.

Basic Usage

Once installed you can start this program from the terminal with the command YouTubeToMP3 or clicking on the Youtube to mp3 entry in the Menu, under Internet.
The first thing to do it’s to take a look at the settings, to access them click on the “gear” icon located in the bottom of YouTubeToMP3 application windows, this will open the settings window that has multiple tabs, the most interesting are:
The Download tab:


youtube2mp3-settings

In this Tab you can configure the number of parallel Downloads and the max bandwidth that the app can use, you can also setup a “speed limit mode”, you can set a limit lower of the former that you can activate from the application clicking on the snail icon, located at the bottom of the window.
Another interesting Tab is the Music output tab:


youtube2mp3-settings2


From this tab you can select the output format you like between mp3,ogg and m4a , the destination for the downloaded files, the default is the directory ~/Music/Downloaded by MediaHuman and the bitrate or quality of the produced file.

All done, once that you have set up these options you are ready to download your favourite video on youtube as mp3 file, close the setting window and go in the main window, the easiest way to add files is to copy the url of the youtube video on your clipboard and click on “Paste Url” this will add a small image of the video with its name in the download list, once you have put in all the urls you’d like to download just click on arrow down icon and the app will start to download the selected videos and convert them in the format you have previously selected.


youtube2mp3


These are 3 mp3 with bitrate 128 that I’ve downloaded as example to test the software, and anyway I suggest this group if you like ” American Celtic punk” genre.
#/Music/Downloaded by MediaHuman $ ls -alrt
total 13660
drwxr-xr-x 1 linuxaria linuxaria 48 May 7 23:17 ..
drwxr-xr-x 1 linuxaria linuxaria 316 May 7 23:17 .
-rw-r–r– 1 linuxaria linuxaria 3634092 May 7 23:17 Dropkick Murphy’s – The Dirty Glass.mp3
-rw-r–r– 1 linuxaria linuxaria 4217106 May 7 23:17 Dropkick Murphys – Going Out In Style (Official Video).mp3
-rw-r–r– 1 linuxaria linuxaria 3288707 May 7 23:18 Dropkick Murphys The Boys Are Back (Official Music Video).mp3

Conclusions

Quite easy to install and with some interesting configuration options this software allow everyone to easily download and convert any video that is present on youtube.
The bad side of this software ?
At the moment the only problem that I’ve found in this App is that It’s closed source, other than that it seem to work perfectly.

Source: http://linuxaria.com/pills/how-to-convert-youtube-video-to-mp3-easily-on-gnulinux?lang=en