How can I call Don Melton's transcode_video script from a shell script?
Two things:


Fix your path. This is as simple as adding the following as your first line. I installed the scripts through gem, not git, so transcode_video is in /usr/local/bin - you'll need to set it as appropriate.


export PATH="/usr/local/bin:$PATH"


Make sure you cd into the directory you want to save the files into, as a step too. Otherwise, writes them out into $HOME, which appears to be the default working directory for automator bash scripts.


My total working code:

export PATH="/usr/local/bin:$PATH"
for f in "$@"
do
    echo $f &gt; /tmp/filename.txt
    cd ~/Desktop/SAmple/
    transcode-video --mp4 -v "$f" &gt; /tmp/transcode.out
done