does anyone know how to background ffmpeg if executed from a PHP script? i've bee trying to figure this out for a while, it just does absolutely nothing if nohupped/&a开发者_如何学Pythonmp;/>dev/null/etc... can't seem to get it to run while not in focus
When I process video uploads with PHP+ffmpeg, I split up the tasks. The script taking the video upload simply queues the job in Beanstalkd and continues. A second script that runs indefinitely in the background listens to Beanstalkd for new videos to process.
This also avoids the issue of processing too many videos at once, which you could encounter if you forked ffmpeg to the background. Even if you figure out a way of forking ffmpeg to the background, you're much better off using a queuing system for this reason alone.
精彩评论