How to adjust a script that works in the Terminal but fails in Automator?
This is because Automator doesn't use your interactive shell's path. You need to specify the location of ffmpeg.


In Terminal, run:

which ffmpeg

Replace the ‘ffmpeg’ in your Automator shell script with the output of this command.