first post and my first script - well first script that's worked .
I came to create this script as I had a few music videos I wanted to play on my "mp3" player, So it basically just takes the audio from the video file.
zenity - to specify what to name file.
ffmpeg and appropriate libs - for what you want to convert from and to.
*note you must specify extension when asked to type the new filename. e.g. "music file.mp3"*
*also create the folder Music_from_video in home directory or amend script as you see fit*
# zpath is destination path
zpath=$(zenity --entry --title="name of new file" --text="enter new song title")
# next line modifies the zpath to take out spaces
mod_zpath=`echo $zpath | sed 's/ /-/g'`
#runs args through ffmpeg
ffmpeg -i $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS -vn -acodec copy ~/Music_from_video/$mod_zpath | zenity --progress \
--text="Converting to sound" \
if [ "$?" = -1 ] ; then
zenity --error \
not the most sophisticated but works for me