Per scaricare musica da youtube, ho realizzato un semplice script bash che tramite ffmpeg e youtube-dl scarica e codifica il video passato come argomenti in un file mp3.
TITLE=`youtube-dl $1 -e` youtube-dl $1 -o "$TITLE.flv" ffmpeg -i $2.flv -f mp3 "$TITLE.mp3" rm "$TITLE.flv"