#!/bin/bash export G_BROKEN_FILENAMES=true VIDEO=$1 while true; do if [ ! "$VIDEO" ]; then VIDEO=`Xdialog --stdout --title "Please Select Video File to convert" --fselect . 60 250 ` if [ ! "$VIDEO" ]; then echo "USAGE: $0 " exit 10 fi fi if [ -f "$VIDEO" ]; then WAVFILE=`echo $VIDEO|sed -e "s/\....$/\.wav/"` MP3FILE=`echo $VIDEO|sed -e "s/\....$/\.mp3/"` DIRNAME=`dirname "$VIDEO"` if [ "$DIRNAME" ]; then cd "$DIRNAME" fi ffmpeg -i "${VIDEO}" "${WAVFILE}" #mplayer -ao pcm:file="${WAVFILE}" -vc null -vo null -hardframedrop -cache 16384 -srate 44100 "${VIDEO}" lame --preset 160 "${WAVFILE}" "${MP3FILE}" rm "${WAVFILE}" normalize "${MP3FILE}" VIDEO="" else exit 10 fi done