Um script de shell chamado youtube-dl pode fazer isso em 1 passo.
Em primeiro lugar depende do ffmpeg
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
Informações extras sobre como escolher a qualidade de download no youtube, na página do manual.
-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.
Então adicione -f 18 para obter h264 mp4 em 480p