From 98a8cf88741709307d0db7589e0e7461f04cb61a Mon Sep 17 00:00:00 2001 From: Oleg Tsarenko Date: Fri, 10 May 2013 23:53:37 +0300 Subject: [PATCH] Add of set the timeout for video process and audio --- src/FFMpeg/FFMpeg.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/FFMpeg/FFMpeg.php b/src/FFMpeg/FFMpeg.php index 8b65bf9..0d7a604 100644 --- a/src/FFMpeg/FFMpeg.php +++ b/src/FFMpeg/FFMpeg.php @@ -265,6 +265,8 @@ class FFMpeg extends Binary $process = $builder->getProcess(); + $process->setTimeout($this->timeout); + $this->logger->addInfo(sprintf('FFmpeg executes command %s', $process->getCommandLine())); try { @@ -397,6 +399,8 @@ class FFMpeg extends Binary foreach ($passes as $process) { + $process->setTimeout($this->timeout); + $this->logger->addInfo(sprintf('FFmpeg executes command %s', $process->getCommandline())); try { @@ -457,7 +461,7 @@ class FFMpeg extends Binary while (0 !== $value % $multiple) { $value++; } - + return $value; }