New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not receiving progress notifications #794
Comments
I have this problem too, can someone help, please? UPDATE WHAT I HAVE FOUND After digging inside the framework, it seems like the ProgressListener weird work. Here is what I found. AbstractProgressListener.php line 180 if ($this->lastOutput !== null) {
AbstractProgressListener.php line 232 private function getProgressInfo()
{
//This will return null everytime.
if ($this->remaining === null) {
return null;
}
return array(
'percent' => $this->percent,
'remaining' => $this->remaining,
'rate' => $this->rate
);
} HOW TO FIX? In AbstractProgressListener.php find private function parseProgress($progress)
{
if (!$this->initialized) {
$this->initialize();
}
if (null === $this->totalSize || null === $this->duration) {
return;
}
$matches = array();
if (preg_match($this->getPattern(), $progress, $matches) !== 1) {
return null;
}
$currentDuration = $this->convertDuration($matches[2]);
$currentTime = microtime(true);
$currentSize = trim(str_replace('kb', '', strtolower(($matches[1]))));
$percent = max(0, min(1, $currentDuration / $this->duration));
$this->lastOutput = $currentTime;
$delta = $currentTime - $this->lastOutput;
// Check the type of the currentSize variable and convert it to an integer if needed.
if(!is_numeric($currentSize)) {
$currentSize = (int)$currentSize;
}
$deltaSize = $currentSize - $this->currentSize;
$rate = $deltaSize * $delta;
if ($rate > 0) {
$totalDuration = $this->totalSize / $rate;
$this->remaining = floor($totalDuration - ($totalDuration * $percent));
$this->rate = floor($rate);
} else {
$this->remaining = 0;
$this->rate = 0;
}
$percent = $percent / $this->totalPass + ($this->currentPass - 1) / $this->totalPass;
$this->percent = floor($percent * 100);
$this->currentSize = (int) $currentSize;
$this->currentTime = $currentDuration;
return $this->getProgressInfo();
} The P/S: I found that the HLS stream file will fail in getting |
The progress event is called, for me, only when converting from MP4, not MPG for example! |
The PR above would definitely help a lot if we could get that merged. |
Actual Behavior
Not receiving progress notifications
Expected Behavior
Progress updates should be firing while transcoding video
Steps to Reproduce
Here's the code I'm using:
The text was updated successfully, but these errors were encountered: