0

I have a PHP application which is encoding videos as per below,

$format = new FFMpeg\Format\Video\X264('libmp3lame');

These are the parameter which are passed,

$ffmpeg = FFMpeg\FFMpeg::create(array(
           'ffmpeg.binaries' => '/usr/bin/ffmpeg',
           'ffprobe.binaries' => '/usr/bin/ffprobe',
           'timeout' => 0,
           'ffmpeg.threads' => 12,
      ), @$logger);

The videos get stuck after 10-12 conversions.

I initially thought that it is timeout issue so made timeout param to '0'. This did not resolve the issue.

Interesting observation I found is the video start getting converted after 12 hours gap. Upon my research I found this ffmpeg hangs when run in background. However I am not sure how/where to pass the 'stdin' parameter in PHP script.

I have used this library https://github.com/PHP-FFMpeg/PHP-FFMpeg of ffmpeg in php

Can someone suggest the solution?

0 Answers0