chiprivers Posted July 27, 2007 Share Posted July 27, 2007 Further to my previous post, I have made some headway with my video script. If I run the 'Video Encoder for Adoble Flash' through the command line, I have a prompt like this: C:\Program Files\SourceTec\fvec> And I can do a basic video encode with default settings like this: C:\Program Files\SourceTec\fvec> fvec C:\xampp\htdocs\video\inputFile\input01.wmw C:\xampp\htdocs\video\outputFile\output01.wmv.flv where "C:\xampp\htdocs\video\inputFile\input01.wmw" is the input video file and "C:\xampp\htdocs\video\outputFile\output01.wmv.flv" is the resulting output file. The above works but I can not get this same operation to work using the exec() command in PHP. I am using the following: <?php $systemDrive = "C:\Program Files\SourceTec\fvec\fvec.exe"; // location of programme to run $inputFile = "C:\xampp\htdocs\video\inputVideo\input01.wmv"; // location of input file $outputFile = "C:\xampp\htdocs\video\outputVideo\output01.wmv.flv"; // location of output file $command = $systemDrive." fvc ".$inputFile." ".$outputFile; $result = exec($command); ?> However this is not working, Can anybody help with this? I have googled and googled and I cannot find any help on the net with integrating these two interfaces! Quote Link to comment Share on other sites More sharing options...
DeadManWalking Posted July 27, 2007 Share Posted July 27, 2007 Any error messages? What is your OS? Windows 2000, XP, 2003 server? Quote Link to comment Share on other sites More sharing options...
chiprivers Posted July 27, 2007 Author Share Posted July 27, 2007 No error messages! Windows XP Quote Link to comment Share on other sites More sharing options...
chiprivers Posted July 27, 2007 Author Share Posted July 27, 2007 I think the problem may possibly be something to do with first calling the program to run the command. From what I undestand, when you use the exec() function it will run the command from the c:\> prompt, do I need to do something first so that I am have changed to C:\Program Files\SourceTec\fvec> before executing the command? Quote Link to comment Share on other sites More sharing options...
chiprivers Posted July 27, 2007 Author Share Posted July 27, 2007 Really struggling with this, I have googled everything I can think of and just cant find anything to guide me in the right direction. Is there anybody that has used the exec() function that may be able to help me walk through this one? Quote Link to comment Share on other sites More sharing options...
corbin Posted July 27, 2007 Share Posted July 27, 2007 Cmd doesn't handle spaces and some other things all that well.... Try something like exec('"c:\program files\your\program\thingy.exe" "c:\some\input\file.wmv" "c:\some\output\file.flv"'); Quote Link to comment Share on other sites More sharing options...
chiprivers Posted July 28, 2007 Author Share Posted July 28, 2007 Cmd doesn't handle spaces and some other things all that well.... Try something like exec('"c:\program files\your\program\thingy.exe" "c:\some\input\file.wmv" "c:\some\output\file.flv"'); This may be the problem cos if I run this straight on the command prompt it only reads the line as far as c:\program and fails, I guess because of the space. HOw would I get around this? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.