lostnucleus Posted October 8, 2009 Share Posted October 8, 2009 Hello php people I tried this simple cmd of ffmpeg with php echo shell_exec('c:/users/rootadmin/ffmpeg/ffmpeg.exe -i c:/kitty.avi'); it didnt work (no ouput echoed), but when i copy and paste the same cmd in windows cmd promt it worked perfectly. Please Identify the problem , i have already wasted hrs on this . thanks in Advance. Link to comment https://forums.phpfreaks.com/topic/176923-simple-ffmpeg-cmd-working-in-windows-cmd-promt-but-not-with-shell_exec/ Share on other sites More sharing options...
trq Posted October 8, 2009 Share Posted October 8, 2009 but when i copy and paste the same cmd in windows cmd promt it worked perfectly I'm afraid it wouldn't have. Windows uses forward slashes to define directories. echo shell_exec('c:\users\rootadmin\ffmpeg\ffmpeg.exe -i c:\kitty.avi'); Link to comment https://forums.phpfreaks.com/topic/176923-simple-ffmpeg-cmd-working-in-windows-cmd-promt-but-not-with-shell_exec/#findComment-932864 Share on other sites More sharing options...
lostnucleus Posted October 8, 2009 Author Share Posted October 8, 2009 but when i copy and paste the same cmd in windows cmd promt it worked perfectly I'm afraid it wouldn't have. Windows uses forward slashes to define directories. echo shell_exec('c:\users\rootadmin\ffmpeg\ffmpeg.exe -i c:\kitty.avi'); i tried your way but situation still the same , maybe windows uses both type of slashes for same purpose Link to comment https://forums.phpfreaks.com/topic/176923-simple-ffmpeg-cmd-working-in-windows-cmd-promt-but-not-with-shell_exec/#findComment-932874 Share on other sites More sharing options...
trq Posted October 8, 2009 Share Posted October 8, 2009 maybe windows uses both type of slashes for same purpose Nope. Most likely the user your server executes as doesn't have permissions to run the program in question. Link to comment https://forums.phpfreaks.com/topic/176923-simple-ffmpeg-cmd-working-in-windows-cmd-promt-but-not-with-shell_exec/#findComment-932941 Share on other sites More sharing options...
lostnucleus Posted October 8, 2009 Author Share Posted October 8, 2009 no thats not the case since just by replacing "-i" with "-formats" it works . Link to comment https://forums.phpfreaks.com/topic/176923-simple-ffmpeg-cmd-working-in-windows-cmd-promt-but-not-with-shell_exec/#findComment-933006 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.