convert using ffmpeg without exec

后端 未结 8 2201
北海茫月
北海茫月 2021-01-03 14:16

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?

8条回答
  •  生来不讨喜
    2021-01-03 14:51

    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.

提交回复
热议问题