Wednesday, October 13, 2010
Create the file in $HOME/.gnome2/nautilus-scripts
I named it "Convert to MP3" and set the execute flags on the script (chmod a+x $HOME/.gnome2/nautilus-scripts/Convert\ to\ MP3)
out_file=`echo "$in_file" | sed 's/\.\w*$/\.mp3/'`
ffmpeg -i "$in_file" -f mp3 -ab 128000 "$out_file"
This script requires ffmpeg to be installed for it to work. Once you install this script you should see a new menu item on the context menu of the files named Scripts if it was not already there, and then you should see your "Convert to MP3" option.