exec in PHP |
[eluser]Flemming[/eluser]
It might be worth looking at proc_open - it may not be disabled and allows similar functionality to exec! http://uk.php.net/manual/en/function.proc-open.php
[eluser]newbie boy[/eluser]
i tried this code... Code: if (function_exists(exec('ffmpeg -t 30 -acodec copy -i $inputfile $outputfile'))){ and the output is always function not exists... appreciate every little help...
[eluser]cahva[/eluser]
Code: if (function_exists('exec')) You put the whole exec line to the function_exists function and thats why it didnt work. For the earlier posts, if safe_mode is disabled, it doesnt matter what safe_mode_exec_dir is. It works only in safe mode. In general, its better to use the whole path to the executable. Commands without path will only be executed if they are in /usr/bin/ (depending on OS used).
[eluser]newbie boy[/eluser]
cahva, yeah you're right... it's just for testing... but still this code won't work... Code: $inputfile = $uploadData[$i]['file_name']; still no ouput data...
[eluser]cahva[/eluser]
Well exec only return the last line so it can be that the last line is empty. Ofcourse you would still have something in the $outputfile. Try to use the full path to ffmpeg eg. /usr/bin/ffmpeg You could also try this: Code: ob_start();
[eluser]newbie boy[/eluser]
cahva, i re-install ffmpeg again... in DOS with this code c:/ffmpeg/ffmpeg.exe –i d:/myfile.mpg d:/myfile.flv /y i came across with this error unable to find a suitable output format for ‘ui’ hope you could help me... by the wat i'm using windows vista...
[eluser]cahva[/eluser]
Im really not an expert with ffmpeg and I dont have it installed on my windowsbox so I dont know how to help you with that.
[eluser]mysoogal[/eluser]
[quote author="newbie boy" date="1247229822"]cahva, yeah you're right... it's just for testing... but still this code won't work... Code: $inputfile = $uploadData[$i]['file_name']; still no ouput data...[/quote] Code: <?php this will get image from some-video-input.avi Code: <?php mencoder encoding on windows using php, im still learning ! good luck it should work You will need to have php_ffmpeg.dll installed on your windows server ! check this out http://poorboyonline.com/?page_id=20 |
Welcome Guest, Not a member yet? Register Sign In |