且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在背景中转换视频php ffmpeg?

更新时间:2021-08-27 04:25:46

***的方法是将作业添加到队列中,让服务器处理ffmpeg以异步方式转换。

The best way is to add a job to a queue and let the server handle the ffmpeg conversion in asynchronous way.

用户必须手动重新检查服务器是否已经完成该作业。

The users has to manually recheck if the server has already finished the job.

你必须这样做:


  1. 创建一个队列数据库表。

  2. 如果新的ffmpeg转换应该在队列表中添加一个作业。

  3. 在服务器上添加一个自动寻找新作业并执行ffmpeg转换的cronjob。 此处有更多细节

  4. 当cronjob完成转换,然后标记作业完成,删除它或任何。

  1. Create a queue database table.
  2. If a new ffmpeg conversion should be done add a job to the queue table.
  3. On the server add a cronjob which automatically looks for new jobs and executes your ffmpeg conversion. More details here.
  4. When the cronjob has finished the conversion then mark the job as done, delete it, or whatever.