I am trying to hack together a Shell script that will allow Hazel to look for a MOV file, and use VLC via command line to convert it to MP3.
I have successfully been able to get VLC to work via command line with this:
- Code: Select all
vlc test.mov --intf=rc --sout="#transcode{acodec=mp3,ab=64}:standard{mux=ps,dst=/Users/Me/MyFileLocation/test.mp3,access=file}"
So then, I tried to convert this code into a shell script Hazel could use via Shell like, so:
- Code: Select all
Shell: /bin/sh
filename=$(basename $1)
outputdir=$(dirname $1)
/Applications/VLC.app/Contents/MacOS/VLC filename.mov --intf=rc --sout="#transcode{acodec=mp3,ab=64}:standard{mux=ps,dst=outputdir/filename.mp3,access=file}"
I have no idea what went wrong... but when ran it... all hell broke loss

I'll be the first to admit - I am way over my head on this.
So any help would be greatly appreciated.
Thanks!!!