We change the way we deal with the number of digits in the filename

This commit is contained in:
Romain Biard 2017-01-11 11:49:34 -03:00
commit 580765386a

View file

@ -104,9 +104,14 @@ class ExtractMultipleFramesFilter implements VideoFilterInterface
} }
// Set the number of digits to use in the exported filenames // Set the number of digits to use in the exported filenames
$nbDigitsInFileNames = ceil( $duration * $nbFramesPerSecond ); $nbImages = ceil( $duration * $nbFramesPerSecond );
if($nbDigitsInFileNames < 10)
$nbDigitsInFileNames = '0' . (string)$nbDigitsInFileNames; if($nbImages < 100)
$nbDigitsInFileNames = "02";
elseif($nbImages < 1000)
$nbDigitsInFileNames = "03";
else
$nbDigitsInFileNames = "06";
// Set the parameters // Set the parameters
$commands[] = '-vf'; $commands[] = '-vf';