Ubuntu Download youtube videos as mp3

Hello, In my last post I highlighted how you can download youtube videos using a great tool called youtube-dl In this post we will be covering a few things. Downloading youtube videos and later converting them to mp3 Downloading videos directly as mp3 We will be making use of ffmpeg and youtube-dl for our case. Lets go Preperation Just so that you know that you will need to install youtube-dl first on your Ubuntu box. If you haven't read my previous article please read that from here http://jaspreetchahal.org/ubuntu-12-04-download-youtube-videos-using-youtube-dl/ You will also need to install ffmpeg. You can install it using the command below [geshi lang="bash" nums="1" target="_self" ] [crayon-60028a9f2714c381056369/]   Downloading video from youtube and converting them to mp3 using ffmpeg Lets download a video from youtube now. Considering that you are in /home/user/videos directory and you have write permissions to this folder, run this command [geshi lang="bash" nums="1" target="_self" ] [crayon-60028a9f27153240964467/] Your video will now be stored under /home/user/videos as C-2MmguSO4w.mp4 You can also specify a file name when using youtube-dl as shown below [geshi lang="bash" nums="1" target="_self" ] [crayon-60028a9f27155068772050/] Depending on your download speed it can take a while to download this video. Just in case if you got error saying "Unable to download" then you would like to read my previous post. Now we have C-2MmguSO4w.mp4 to work with. Lets convert it to mp3 The command [geshi lang="bash" nums="1" target="_self" ] [crayon-60028a9f27156549904506/] The above command will convert our mp4 file to a mp3 -ab 192000 in above command means that our mp3 should be encoded at 192Kbps for great quality -vn means that do not include video -i means input file name To know more about ffmpeg command read more … [Read more...]