buggedcom / phpvideotoolkit-v2

PHP Video Toolkit version 2 helps take the voodoo out of ffmpeg and provides a convenient object oriented wrapper around the ffmpeg programme.
Other
262 stars 86 forks source link

Timeout in ProgressHandlerNative #53

Closed sonnb closed 9 years ago

sonnb commented 9 years ago

Hello,

I am getting this issue in one of my user:

Maximum execution time of 120 seconds exceeded -ProgressHandlerNative:99. Which is:

for($i=1, $l=count($data_parts)-1; $i<$l; $i+=2)
{
    $data[$data_parts[$i]] = $data_parts[$i+1];
}

What could be the problem here? I do not see a reason for this loop take up to few seconds.

buggedcom commented 9 years ago

Without looking at your log file I couldn't be sure, but it is most likely that the whole script timed out and it is was just this part of the script that it timed out on. Make sense?

sonnb commented 9 years ago

How can I just call the convert and it returns immediately without waiting? Because even timeout but the progress is still being processed. I just want to call the convert with progressHandler without waiting for this process.

buggedcom commented 9 years ago

instead of calling save, call saveNonBlocking instead. See example 2 (or 3) of this section of the readme https://github.com/buggedcom/phpvideotoolkit-v2#encoding-with-progress-handlers

sonnb commented 9 years ago

Thanks. Do not believe I did not think about it even I red above method.

sonnb commented 9 years ago

Thanks to your help. I would like to close this issue for now as I consider it is resolved.