So i am running an ffmpeg command on my linux server using the php exec command :
exec("(nohup nice -n 19 " . $ffmpegPath . " -y -i " . $srcFile . " -f mp4 -pass 1 -passlogfile " . $video_pass_log . " -vcodec libx264 -cpu-used 0 -threads 1 -profile:v baseline -vf \"movie=/var/www/vhosts/examplesite.com/httpdocs/images/ae-ffmpeg.png [logo]; [in] scale=".$srcWidth.":floor(ow*(".$srcWidth."/ow)/dar/hsub)*hsub+2[scale]; [scale][logo] overlay=main_w-overlay_w-1:main_h-overlay_h-1 [out]\" ".$options." -r 25 -g 25 -keyint_min 25 -b:v ".$bitrate."k -an " . $destFile . ".mp4 && " . $ffmpegPath . " -y -i " . $srcFile . " -f mp4 -pass 2 -passlogfile " . $video_pass_log . " -vcodec libx264 -cpu-used 0 -threads 1 -profile:v baseline -ac 2 -ab 128k -vf \"movie=/var/www/vhosts/examplesite.com/httpdocs/images/ae-ffmpeg.png [logo]; [in] scale=".$srcWidth.":floor(ow*(".$width."/ow)/dar/hsub)*hsub+2[scale]; [scale][logo] overlay=main_w-overlay_w-1:main_h-overlay_h-1 [out]\" ".$options." -r 25 -g 25 -keyint_min 25 -b:v ".$bitrate."k " . $destFile . ".mp4 && " . $mp4boxpath . " -tmp /tmp -isma -inter 500 " . $destFile . ".mp4 && rm -f " . $video_pass_log . "* && " . $ffmpegPath . " -y -i " . $srcFile . " -vcodec libvpx -cpu-used 0 -threads 1 -acodec libvorbis -vf \"movie=/var/www/vhosts/examplesite.com/httpdocs/images/ae-ffmpeg.png [logo]; [in] scale=".$srcWidth.":floor(ow*(".$srcWidth."/ow)/dar/hsub)*hsub+2[scale]; [scale][logo] overlay=main_w-overlay_w-1:main_h-overlay_h-1 [out]\" ".$options." -ac 2 -ab 128k -r 25 -g 25 -keyint_min 25 -b:v ".$bitrate."k -f webm " . $destFile . ".webm) > /dev/null 2>/dev/null &");
I am pretty sure that the ffmpeg exec command is fine because the strange thing is that if I change the destination path of the converted video to a 'normal' folder on my website then both files save which is good, but then when I change the destination path to where I have a mounted folder, only the webm file will save.
So my 'normal' folder is at http://examplesite.com/tmp/ and my mounted folder is http://examplesite.com/files/
It's quite strange that the webm video has no problems saving to the mounted folder yet the mp4 video does... and like I said, both files save to the 'tmp' folder
Permissions on both the normal and mounted folders are set to 777 for testing purposes and the mounted drive folders are chowned to be the same as all of the other folders on my site.
Any ideas on how I can fix this?