I am having a problem with exec() not working properly and I can't figure out why.

If I enter the output directly in the terminal it works fine. However, when I try and execute the command via PHP exec() it does not work.

Can anyone tell me why this is not working?

PHP Code:
$config['ffmpeg'] = '/usr/bin/ffmpeg';
$watermark '/home/mydomain/public_html/watermark.png';
$src '/home/mydomain/public_html/input.flv';
$dst '/home/mydomain/public_html/output.flv';
$cmd    $config['ffmpeg']. ' -i ' .$src' -vf "movie=' .$watermark' [wm]; [in][wm] overlay=main_w-overlay_w-10:10 [out]"' .$dst;