I'm trying to include a user-defined variable (derived from a cookie) in a shell_exec command to name a file. Unfortunately, when I run the PHP script, the file name is spat out as just ".flv" without the variable string preceding it. I've tested the cookie and it does indeed work, but it looks like it's not being passed correctly to shall exec. Any help or advice would be greatly appreciated.
$shellvar = $_COOKIE["VideoTitle"];
$shellvar = escapeshellarg($shellvar);
shell_exec('/usr/local/bin/ffmpeg -i audio.wav -i videofile.flv $shellvar.flv 2>&1');