Convert Youtube videos to MP3

youtube-dl -t --extract-audio --audio-format mp3 YOUTUBE_URL_HERE
youtube-dl has this functionality built in. If you're running an older version of youtube-dl, you can update it using `youtube-dl -U` (although if you have an older version, it probably doesn't download youtube videos anyway.) youtube-dl --help will show you other options that may come in useful.

By: menachem
2011-11-15 20:11:20

2 Alternatives + Submit Alt

What Others Think

Tried 3 different URLS and got this each time: "WARNING: unable to obtain file audio codec with ffprobe" [~ ]$ youtube-dl -v 2011.10.19
zlemini · 531 weeks and 1 day ago
zlemini you must install ffmpeg menachem i prefer the "-l" option youtube-dl -l --extract-audio --audio-format mp3 URL
mouths · 530 weeks and 6 days ago
Not far off menachem thanks, was trying this on a mac, the version of ffmpeg I had installed from macports did not include ffprobe. +1 for the command.
zlemini · 530 weeks and 5 days ago
Here is how I dl mine. Just add the alias to .bashrc. alias youtube='youtube-dl --extract-audio --audio-format mp3 --audio-quality 0 --prefer-ffmpeg' youtube "your-URL-here'
nowhereman88 · 399 weeks and 6 days ago
Cool command, which will definitely be very useful when working on your site and YouTube profile, I think this functionality will be useful for business, because the visual component of product promotion is very important for its promotion online. And this is a fact. By the way, you can read more about the importance of video in internet marketing here on YouTube marketing
Flokky23fg · 37 weeks ago
Is it really possible for converting the YouTube videos to MP3 format?If it is possible I cheap real diamond rings don’t know the methods for doing the same? But don’t worry guys here comes a better opportunity for you for studying the conversion of videos.
leonamargret · 31 weeks and 1 day ago
This is a very well written article. I’ll be sure to bookmark it and come back to read more of your useful info. Thanks for the post. I’ll definitely return.
aadityaagarwal · 25 weeks and 6 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: