I have two paths without success and different results: using the exec method ffmpeg really works and creates an output file, but then the site crashes with an error of 500. if I use the proc_open method, it starts and creates the atest.log log file in the storage folder output, but ffmpeg errors at the end: store \ audio_recording_1441120844021u.mp3: Permission denied and does not write the file.
ffmpeg has full IUSR permissions, and these permissions are also in the repository folder.
any ideas
exec method: -
$cmd = "ffmpeg.exe -i C:\\Windows\\Temp\\recordings\\".$filename." -i watermark.mp3 -filter_complex amerge -c:a libmp3lame -q:a 4 store\\".$filename;
echo exec($cmd, $o, $v);
Proc_open method: -
$cmd = "ffmpeg.exe -i C:\\Windows\\Temp\\recordings\\".$filename." -i watermark.mp3 -filter_complex amerge -c:a libmp3lame -q:a 4 store\\".$filename;
$pipes = array();
$descriptors = array(2 => array('file', 'store\\atest.log', 'a'));
$p = proc_open($cmd, $descriptors, $pipes);
$done = 0;
while (!$done)
{
sleep(1);
$status = proc_get_status($p);
if (!$status['running']) $done = 1;
echo "STEEL RUN\n";
}
source
share