title: Running FFMPEG from Shell Script /bin/sh
body: <p>I am trying to setup a Shell Script to work within an automator watch folder...</p>
  
  <p>Everything works with the exception of the Run Shell Scrip portion...</p>
  
  <p>Essentially when a file shows up in the watch folder, it runs the shell scrip which calls FFMPEG and then will move the file to an archive folder for safe keeping.  However right now automator is telling me everything worked but now file is being created.</p>
  
  <p>I have the Shell set to /bin/sh and Pass input set to as arguments</p>
  
  <p>Here is my script:</p>
  
  <pre><code>for f in "$@"
  do
  name=$(basename "$f")
  dir=$(dirname "$f")
  ffmpeg -i "$f" -b 250k -strict experimental -deinterlace -vcodec h264 -acodec aac "$dir/mp4/${name%.*}.mp4"
  echo "$dir/mp4/${name%.*}.mp4"
  done
  </code></pre>
  
  <p>it does echo the correct filename, but does not actually run ffmpeg</p>
  
  <p>I have tried adding <code>-exec</code> before it like I have seen in some scripts but still nothing...</p>