for i in *.mp4; do name=`echo "$i" | cut -d'.' -f1` echo "$name" ffmpeg -i "$i" -acodec libvorbis -aq 5 -ac 2 -qmax 25 -threads 2 "${name}.webm" done