When I convert a video using command line(ffmpeg -i dust.mp4 -s 320x240 video.flv 2>&1) it does the conversion fine. But when I use the php code it does not. The code is as follows:
echo "Starting ffmpeg...
";
$ffmpeg = "~/ffmpeg_sources/ffmpeg";
echo exec("$ffmpeg -i dust.mp4 -s 320x240 video.flv 2>&1");
echo "Done.
";
And the output is :
Starting ffmpeg... sh: 1: ~/ffmpeg_sources/ffmpeg: not foundDone.
Any help will be appreciated.
Thanks in advance