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.
Select any video file, choose the "Convert to MP3" option and after a few seconds (depending on the size of the file) an mp3 file will be created with the same name as the original file.
Hope you found this useful.