Maybe this will shed some light.. Quote from http://php.net/manual/en/function.system.php
Note:
If a program is started with this function, in order for it to continue running in the background, the output of the program must be redirected to a file or another output stream. Failing to do so will cause PHP to hang until the execution of the program ends.
So your first command is currently running in the foreground, that's why the second command didn't execute.
In my opinion you can at least try running it in the background as
$cmd ="ffmpeg --- &"
system($cmd);