15. February 2018
Download videos from YouTube and convert to mp3 from terminal
Did you ever wanted to download video from YouTube to listen of it on your mobile while you do not have internet access? And of course you are in Linux as it is simplest to work with Andorid phones. To download video from Youtube the good program is youtube-dl and to convert it you will use avconv (former ffmpeg). It is very simple to download YouTube video from terminal as well as conversion. In 2018 it is reduced to 1 simple command.
# youtube-dl can now directly use avconv to convert to mp3 youtube-dl --extract-audio --audio-format mp3 --prefer-avconv --embed-thumbnail https://url_to_video