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.

Is there a way to search and then download from youtube, with the stipulation that I only need to download the audio only, not the video.

share|improve this question

3 Answers 3

up vote 4 down vote accepted

An alternative to youtube-dl has been described here: New Command Line YouTube Player And Downloader With Local Playlists Support: mps-youtube. The article is quite detailed but just to quote what seems relevant to your question:

mps-youtube is a new tool which, besides being able to download YouTube videos (either the whole video or just the audio), can also search and play YouTube videos and create local playlists, all from the command line.
By default, this is basically a YouTube audio player (and downloader), but you can enable (external) video playback from its options.

This program needs the presence of python-pip and mplayer (both of which installable by apt-get). Then, run sudo pip install mps-youtube and you're done.

You can read more about mps-youtube here.


  • this program downloads just the audio if you so wish and hence you save on bandwidth: instead of downloading a video and then extracting the audio at your end, you download just the audio.
  • if you don't wish to install all the recommends suggested by sudo apt-get install python-pip use sudo apt-get install --no-install recommends python-pip. That works just as well (for the specific purpose of installing mps-youtube).
share|improve this answer

First, install youtube-dl:

sudo apt-get install youtube-dl

Then download and convert the YouTube video

youtube-dl http://www.youtube.com/watch?v=dQw4w9WgXcQ -x

The -x converts it to audio.

Further audio options:

-x, --extract-audio              convert video files to audio-only files (requires ffmpeg or avconv and ffprobe or avprobe)
--audio-format FORMAT            "best", "aac", "vorbis", "mp3", "m4a", "opus", or "wav"; best by default
--audio-quality QUALITY          ffmpeg/avconv audio quality specification, insert a value between 0 (better) and 9 (worse) for VBR or a specific bitrate like 128K (default 5)
share|improve this answer
+1 for answer but youtube-dl has no ability to search in youtube –  Ask Feb 15 at 7:15

No. Youtube will never serve you just the audio stream.

They will give you everything, and then you can demux the audio out of it, there are tools for both.

share|improve this answer
Thanks to all for negative votes. I would like to point out that i did answer question as asked, but looking at the accepted answer i see that the questioner actually meant something completely different. Not "how do i only download audio?" but "how do i download the entire stream, and then demux audio out of it, but i don't want to look for an answer anywhere, despite that particular question being answered thousands of times". –  Volodya Feb 19 at 13:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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