Here is the stable version of the filter, all bugs fixed.
This commit is contained in:
parent
ca8eea7ec6
commit
5ff0b24230
1 changed files with 6 additions and 1 deletions
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
namespace FFMpeg\Filters\Video;
|
namespace FFMpeg\Filters\Video;
|
||||||
|
|
||||||
|
use FFMpeg\FFProbe;
|
||||||
use FFMpeg\Exception\InvalidArgumentException;
|
use FFMpeg\Exception\InvalidArgumentException;
|
||||||
use FFMpeg\Media\Video;
|
use FFMpeg\Media\Video;
|
||||||
use FFMpeg\Format\VideoInterface;
|
use FFMpeg\Format\VideoInterface;
|
||||||
|
|
@ -81,7 +82,11 @@ class ExtractMultipleFramesFilter implements VideoFilterInterface
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Get the duration of the video
|
// Get the duration of the video
|
||||||
$duration = $format()->get('duration');
|
foreach ($video->getStreams()->videos() as $stream) {
|
||||||
|
if ($stream->has('duration')) {
|
||||||
|
$duration = $stream->get('duration');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Get the number of frames per second we have to extract.
|
// Get the number of frames per second we have to extract.
|
||||||
if(preg_match('/(\d+)(?:\s*)([\+\-\*\/])(?:\s*)(\d+)/', $this->frameRate, $matches) !== FALSE){
|
if(preg_match('/(\d+)(?:\s*)([\+\-\*\/])(?:\s*)(\d+)/', $this->frameRate, $matches) !== FALSE){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue