Server 'freeze' on ffmpeg action?

Server ‘freeze’ on ffmpeg action? in cakephp 3 in php-ffmpeg

Do you execute the ffmpeg-action directly on the request or do you have some sort of queue system where you can execute tasks in the background?

i am using this code

$config = [
‘ffmpeg.binaries’ => ‘/usr/bin/ffmpeg’,
‘ffprobe.binaries’ => ‘/usr/bin/ffprobe’,
‘timeout’ => 3600,
‘ffmpeg.threads’ => 12,

$log = new Logger(‘FFmpeg_Streaming’);
$log->pushHandler(new StreamHandler(‘log/ffmpeg-streaming.log’));

$ffmpeg = \Streaming\FFMpeg::create($config, $log);
$video = $ffmpeg->open($targetFilePath);
->encryption($save_to, $url)
->autoGenerateRepresentations([1080, 720, 480, 360, 240])
->save(WWW_ROOT . ‘img/upload/videos/’.$folderName.’/mpd/’.$output_basename.’_orignal.m3u8’);

That doesn’t answer @KevinPfeifer’s question.