I have Windows XP, Apache, PHP 5.3 and ffmpeg working fine. I need to convert flv to avi or vice versa without using the exec()
command. Is this possible?
Thank you.
edit : i hope someone could edit the ffmpeg source and implement an exec function into the php extension so we could just add the parameters to a function (ex $fmpeg->exec('exec parameters here'); ) so the exec is executed directly from the extension ...
and compile those file :p
If you don't want to use exec() on the webserver for security reasons and the videos don't have to be converted in "realtime", you could use a unix-like cronjob for windows, create a php-script and use the php-interpreter.
http://www.makeuseof.com/tag/bring-linux-cron-like-power-to-windows/ or http://www.visualcron.com/
a) A user uploads a video and this video is saved to a temporary path. The video gets an id and a timestamp, which are saved to a database.
b) Every 15 minutes, a webserver independant php script, jar-file or c#-executable is called to create the ffmpeg comand and the necessary parameters. Then the file is converted, moved to a 'converted'-folder, the original file is deleted or moved to an 'archive'-folder and the database is updated.
Try to use
pclose(popen($cmd, 'r'));
instead exec()