#!/usr/bin/env sh for video in * do name=`echo "$video" | tr '_' ' '` artist=`echo "$name" | cut -d'-' -f1` title=`echo "$name" | cut -d'-' -f2 | cut -d'.' -f1` name="`echo "$name" | cut -d'.' -f1`".mp3 if [ -f ./mp3s/"$name" ] then continue fi mplayer -dumpaudio -quiet "$video" id3tool -t "$title" -r "$artist" stream.dump mv stream.dump ./mp3s/"$name" echo $name done
— I don't have Flash, so I download every video on Youtube. Most (all?) Youtube videos have mp3 audio, so with mplayer and dumpaudio I can get the music alone. I don't write shell scripts often, so this looks funny, but it dumps 120 MB worth of audio, and sets the ID3v2 tags correctly in 5 seconds. Ah, modern technology. Got to love it.