I'm trying to run ffmpeg in my WAMP server with the exec command. Though I have set in the .htaccess file "php_value safe_mode off" and apache allow the override, the exec is still not working properly. if I try to execute
<? php exec("mkdir aaa"); ?>
it works, but when I do something like
exec("ffmpeg.exe -y -i D:\Documents\Video.wmv -f mp4 D:\Documents\Video.mp4 -y");
it doesn't do nothing. This works fine is prompted in the command line, but for some reason it doesn't when I try to execute it from the server. Do you have any ideas?
You need to escape backslashes in string literals:
exec("ffmpeg.exe -y -i D:\\Documents\\Video.wmv -f mp4 D:\\Documents\\Video.mp4 -y");