Hey,
Ok, couple of observations when playing with this:
1) The working directory when the script is run is the run directory for the EMS, since it is the EMS that is calling the exec. This is regardless of where the actual script resides. (for example, i had my script in /User/bryan/ but it actually ran in my ems/bin dir. I’m not sure this impacts your script, but it was confusing to me at first.
2) By default, the EMS will set keepAlive=1 (true) for the launchprocess command. This means that it will repeatedly call the script until you do a "removeConfig" on it (or shutdown and delete the pushPullSetup.xml file). Previous launchProcess commands may be interfering with new calls to launchProcess on the same target script.
Beyond these two observations, i was generally able to get my scripts running per my above suggestions. However, i did not build your entire script up (as i don’t have ffmpeg currently installed). I did a loop and some local file manipulation, just to get some simple tests.
Let me know if that helps at all!
Bryan