mirror of https://github.com/pixelfed/pixelfed.git
Update VideoThumbnail job
This commit is contained in:
parent
46fdcf0718
commit
c4b1f18755
|
@ -45,8 +45,8 @@ class VideoThumbnail implements ShouldQueue
|
||||||
$save = implode('/', $path);
|
$save = implode('/', $path);
|
||||||
$video = FFMpeg::open($base);
|
$video = FFMpeg::open($base);
|
||||||
if($video->getDurationInSeconds() < 1) {
|
if($video->getDurationInSeconds() < 1) {
|
||||||
$video->getFrameFromSeconds(1);
|
$video->getFrameFromSeconds(0);
|
||||||
} elseif($video->getDurationInSeconds() < 5)
|
} elseif($video->getDurationInSeconds() < 5) {
|
||||||
$video->getFrameFromSeconds(4);
|
$video->getFrameFromSeconds(4);
|
||||||
}
|
}
|
||||||
$video->export()
|
$video->export()
|
||||||
|
|
Loading…
Reference in New Issue