How can I download music from YouTube and not the video film? [duplicate]

Solution 1:

A shell script called youtube-dl can do this in 1 step. It depends on ffmpeg, so you should install that first.

sudo apt-get install ffmpeg
wget https://github.com/rg3/youtube-dl/raw/2012.02.27/youtube-dl 
chmod +x youtube-dl
./youtube-dl -t --extract-audio --audio-format mp3 YOUTUBE_URL_HERE

Extra information on choosing quality of download from YouTube, from the man page:

 -f FMT, --format=FMT
       Specify the video format (quality) in which to download the video.

       For youtube.com, in particular, the meaning of the format codes is given as:

       WebM video at 480p: 43
       WebM video at 720p: 45
       H264 video in MP4 container at 480p: 18
       H264 video in MP4 container at 720p: 22
       H264 video in MP4 container at 1080p: 37
       H264 video in FLV container at 360p: 34
       H264 video in FLV container at 480p: 35
       H263 video at 240p: 5
       3GP video: 17

       Note that not all videos are available in all formats and that other sites supported by youtube-dl may have different conventions for their video formats.

       By default, youtube-dl will download the best available format; if you want to download the worst format to save bandwidth and time, use "-f" worst.

So add -f 18 to get h264 mp4 at 480p

Solution 2:

You can also use jDownloader. just copy the youtube-url, jDownloader will recognize it and will give you the possibility to download all possible formats. Choose only mp3 and it will give you the music only.

https://launchpad.net/~jd-team/+archive/jdownloader

Solution 3:

youtube-dl can be installed easily:

sudo apt-get install youtube-dl ffmpeg

Then simply:

youtube-dl -t --extract-audio --audio-format mp3 YOUTUBE_URL_HERE

(As shown here by duffydack.)

Solution 4:

I have a VM where I installed alsaloop.
I can then use 'normal' recording tools to record audio out as an audio in from the CLI or otherwise.

You can also use this methodology to record audio and video in said VM on any legally purchased audio/video on any site. It's completely site agnostic and doesn't care what the bearer format is.

Solution 5:

use can use download helper a firefox addon. by this u can directly download videos in mp4,3gp or high quality formats and easy to use.