chiprivers Posted July 27, 2007 Share Posted July 27, 2007 I am working on a small project that involves uploading, encoding and displaying video files in flash format. I have got 'Video Encoder for Adobe Flash' and the command line version which I want to use to automate the encoding process. I have found this demo site http://flashvideo.sothinkmedia.com/flash-video-encoder-command-line/asp-demo/upload.htm that shows how it works and on the resulting page it gives you the command to execute but I dont know where to integrate this into my php script? Can anybody help? Quote Link to comment Share on other sites More sharing options...
chiprivers Posted July 27, 2007 Author Share Posted July 27, 2007 If it helps, the executing command that it gives on the demo site is: "%SystemDrive%\Program Files\SourceTec\fvec\fvec.exe" "c:\inetpub\wwwroot\flash-video-encoder-command-line\asp-demo\files\{9874E9CB-B9DB-4BBC-B61B-6EF56E686431}.wmv" "c:\inetpub\wwwroot\flash-video-encoder-command-line\asp-demo\files\{9874E9CB-B9DB-4BBC-B61B-6EF56E686431}.wmv.flv" -vw 320 -vh 240 -vz L -ac 2 -tn "c:\inetpub\wwwroot\flash-video-encoder-command-line\asp-demo\files\{9874E9CB-B9DB-4BBC-B61B-6EF56E686431}.wmv.jpg" -tw 160 -th 120 But where does this fit into my PHP? Quote Link to comment Share on other sites More sharing options...
calabiyau Posted July 27, 2007 Share Posted July 27, 2007 Just a quick guess without really knowing too much about it...perhaps you are supposed to exec(), this entire command from your automated php script. I've never tried exec with windows server, but that is probably how you would do it in Unix. Of course you would have to dynamically modify the paths and file names that begin the series of commands Quote Link to comment Share on other sites More sharing options...
chiprivers Posted July 27, 2007 Author Share Posted July 27, 2007 So is anybody familiar with the exec command? how would I modify the example statement given to make it dynamic? Does the %SystemDrive% bit need replacing with anything or does it just know? Quote Link to comment Share on other sites More sharing options...
calabiyau Posted July 27, 2007 Share Posted July 27, 2007 Well I guess you would have to build your exec statement from the information gathered from the form used to upload/submit the files. Just look through the example statement, for what appears to be the path to the target file and outputted file and some of the information looks like width and height parameters,etc. So once the form is submitted with the uploaded file build your exec statement up in a variable using the full path to the file...then just use exec($built_exec_statement)...just make the full command look like theirs but with your own information...again, this is just an educated guess. there must be some documentation. 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.