Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Possible Duplicate:
Downloading a youtube video
How to download an MP3 track from a YouTube video

Is there any app like the one from DVDvideosoft but for linux to download and convert videos to mp3? Without the need to download them first. If it is not what app should I use without the terminal? I have 12.10.

share|improve this question
    
There are plenty of web applications out there that automate this process. Here's one that I found to work pretty well. –  Glutanimate Nov 20 '12 at 20:39
    
Downloading videos is pretty well documented in this question, so then all you have to do is extract the audio from the video and (if necessary) convert it to mp3. That could be in one or two steps. You might get the quickest and most reliable answers if we were to close this as a duplicate of that question, and then you could post a new question about extracting audio from video files (if you don't know how to do that). I'm close-voting this now but if you let us know your preference it should be considered. –  Eliah Kagan Dec 25 '12 at 14:25
add comment

marked as duplicate by Eliah Kagan, Jorge Castro, hhlp, Stephen Myall, Tom Brossman Dec 25 '12 at 20:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

8 Answers

up vote 5 down vote accepted

You could always try clipgrab you can download youtube videos and also select which format you would like it to be in. It has a nice interface also...

ppa:clipgrab-team/ppa Launchpad logo (Click here for instructions on using PPAs.)

sudo add-apt-repository ppa:clipgrab-team/ppa && sudo apt-get update && sudo apt-get install clipgrab

by adding this ppa you will get the clipgrab package...you can search for youtube videos via this application and also copy and paste the link to the video into it and it will download the video, also you can select the format you want it in. enter image description here

share|improve this answer
add comment

youtube-dl has a command line option to extract the audio into an mp3 and discard the video downloaded:

youtube-dl --extract-audio --audio-format mp3 -l [YOUTUBE VIDEO LINK]

This works in my version of youtube-dl, which is 2012.09.27. Download youtube-dl from its website.

share|improve this answer
add comment

Ubuntu. Convert youtube video to mp3 on-line with a command line script.

http://www.iasptk.com/ubuntu-convert-youtube-video-to-mp3-on-line-with-a-command-line-script-

Before you can use the script make sure you have "youtube-dl" and "ffmpeg" installed. We will use youtube-dl to download youtube videos, and ffmpeg to convert them into the mp3 format. Create a new file...

gedit youtube2mp3

...and paste the following script:


#!/bin/bash

x=/tmp/.youtube-dl-$(date +%y.%m.%d_%H.%M.%S)-$RANDOM.flv

youtube-dl --output=$x --format=18 "$1"

avconv -i $x -acodec libmp3lame -ac 2 -ab 128k -vn -y "$2"

rm $x

# if you get "ERROR: unable to download video" 
# update youtube-dl with
# sudo youtube-dl -U

(avconv is used in DEBIAN and UBUNTU instead of ffmpeg)

Save and close gedit. Now install the script somewhere easily accessible.

sudo install youtube2mp3 /usr/local/bin

Now you can convert youtube videos into mp3 files by using the following command (including the double quotes):

youtube2mp3 "youtube-link" "mp3-file.mp3"

For this script to work, avconv OR ffmpeg must be able to use the libmp3lame code (libavcodec-extra-53 and libavcodec-extra-52), not provided with the ffmpeg on Ubuntu (see installation).

Also, the script is very verbose. Use the following command if you don't want to see all the messages on your screen:

youtube2mp3 "youtube-link" "mp3-file.mp3" > /dev/null

You can also use the following command to make the script run in the background. This way you will be able to run multiple instances of the script at the same time.

youtube2mp3 "youtube-link" "mp3-file.mp3" > /dev/null &

How it works

The way this script works is really simple. First it downloads the youtube video into a temporary file, converts the video to mp3 and then deletes the temporary file. Let's go through this script step-by-step.

  1. The first line of the script assigns a random .flv filename to the variable $x.

  2. The second line downloads the youtube video into the temporary file named $x. It automatically downloads the HQ version of the video if it's available.

  3. The third line extracts the audio from the video and converts it into an mp3 file with the filename you specified.

  4. The last line removes the temporary file created in step 2.

youtube-dl install from Ubuntu Software Center

youtube-dl is a small command-line program to download videos from YouTube.com and other sites that don't provide direct links to the videos served.

share|improve this answer
    
I get the error "ERROR: unable to download video" on Ubuntu 12.10 –  rubo77 Feb 2 '13 at 23:46
    
fix: enter sudo youtube-dl -U. that will update youtube-dl to the latest version, then it works –  rubo77 Feb 2 '13 at 23:54
add comment

You can use jDownloader. You can paste a youtube link and it offers you to download the video and the audio as mp3 separately. You can install jDownloader using the ppa.

sudo add-apt-repository ppa:jd-team/jdownloader
sudo apt-get update
sudo apt-get install jdownloader
share|improve this answer
add comment

There is a Add-on Named as Easy youtube downloader , I will use it often to get the Video files as MP3 and you can add that to Firefox and Chrome browsers .

enter image description here

share|improve this answer
add comment

Typo alert!!

sudo add-apt-repository ppa:clipgrab-team/ppa sudo apt-get update && sudo apt-get install clipgrab

It should be:

sudo add-apt-repository ppa:clipgrab-team/ppa && sudo apt-get update && sudo apt-get install clipgrab
share|improve this answer
add comment

Try "xVideoServiceThief":

http://xviservicethief.sourceforge.net

It can download FLV files and do automated conversion into any desired format.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.