How to Extract Audio YouTube Video to Audio Mp3 via terminal in Ubuntu

Do you want to extract audio youtube video? well, in this guide I will show you little tips how to convert YouTube video to MP3 audio files using the command line in Ubuntu. small command-line program we will use to convert YouTube video to MP3 audio files is youtube-dl and ffmpeg.

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. youtube-dl allows the user, among other things, to choose a specific video quality to download (if available) or let the program automatically determine the best quality video to grab. It supports downloading entire playlists and all videos from a given user. Currently supported sites are video.google.com, Youtube, Photobucket, Dailymotion, Metacafe, Facebook, Yahoo!, and depositfiles.com.

ffmpeg is the package contains the ffplay multimedia player, the ffserver streaming server and the ffmpeg audio and video encoder. They support most existing file formats (AVI, MPEG, OGG, Matroska, ASF…) and encoding formats (MPEG, DivX, MPEG4, AC3, DV)

Install youtube-dl and ffmpeg

Open terminal adn then running command below :

sudo apt-get install youtube-dl ffmpeg lame libavcodec-extra-53 

To convert a YouTube video to mp3, runing this command on terminal:

youtube-dl youtube-url --extract-audio --audio-format mp3  

Example:

youtube-dl http://www.youtube.com/watch?v=QGJuMBdaqIw --extract-audio --audio-format mp3

That’s it! icon smile How to Extract Audio YouTube Video to Audio Mp3 via terminal in Ubuntu

You may also like...