phpforever Posted December 18, 2007 Share Posted December 18, 2007 I was able to use mencoder under cmd and created flash movies ready for streaming(red5 server).But here is the problem:I want to make a script that connects a button in html with the cmd window.More spesific-to make a drop down menu with an option for choosing various video formats(avi,mpg...) which after button press to go directly in the cmd window as text.For example:if this is the command for converting: mencoder tre.mpg( extension only) tre.flv(name only) -oac mp3lame -ovc..... to be inserted in cmd as a choise from menu. I will be grateful if only the above cmd row is connected to a button also.Thank you in advance. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted December 18, 2007 Share Posted December 18, 2007 Try this: <?php exec("mencoder tre.mpg( extension only) tre.flv(name only) -oac mp3lame -ovc"); ?> Quote Link to comment Share on other sites More sharing options...
phpforever Posted December 18, 2007 Author Share Posted December 18, 2007 Nothing happened.Here is the full row: <?php exec("mencoder UAAUAA~2.MPG -o 1.flv -of lavf -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3"); ?> I tried to add a path to mencoder-the same result. Quote Link to comment Share on other sites More sharing options...
chigley Posted December 18, 2007 Share Posted December 18, 2007 <?php echo exec("mencoder UAAUAA~2.MPG -o 1.flv -of lavf -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3"); ?> Try actually outputting the command line response Quote Link to comment Share on other sites More sharing options...
phpforever Posted December 19, 2007 Author Share Posted December 19, 2007 Nothing again ??? .Under cmd I have to make mencoder's directory current(with cd ....) and then I can use it.Maybe I must do this in php source but I don't know how. Quote Link to comment Share on other sites More sharing options...
trq Posted December 19, 2007 Share Posted December 19, 2007 You'll either need to put mencoder in your path, or use the full path to the directory containing the application. Quote Link to comment Share on other sites More sharing options...
phpforever Posted December 19, 2007 Author Share Posted December 19, 2007 I got it.Thank you all for your help. 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.