I have a macro that is triggered by a folder action. Really simple - when a file is added, it runs a shell script that starts an FFMpeg operation. This is what I want it to output:
ffmpeg -i '/Users/myusername/Movies/Compress Video - 1 Source/Boating in Lechlade.mp4' -filter:v fps=30 -preset fast -crf 28 '/Users/myusername/Movies/Compress Video - 2 Output/Boating in Lechlade.mp4'
I have two variables for the file names, the second one being an adaptation of the first one (to place it in a different location. This is the script:
ffmpeg -i '$KMVAR_FileName' -filter:v fps=30 -preset fast -crf 28 '$KMVAR_FileNameNew'
And the variables are populated with values.
When I run this macro, it seems like it has not changed those KMVARs into the correct text:
The error in the engine log is:
$KMVAR_FileName: No such file or directory. Macro “FFMpeg iMovie File” cancelled (while executing Execute Shell Script).
Can you see what I've missed here? I have other macros that use KMVAR in almost identical way, but they are not failing. I can't see what's wrong here, really.
Note: If I create that shell script in a Display Text window using those variables (But using %Variable%FileName% rather than $KMVAR_FileName), and then paste into Terminal, it works.
What have I missed here?