1
0
Fork 0
forked from mirror/pixelfed

Update VideoThumbnail job

This commit is contained in:
Daniel Supernault 2018-11-18 22:19:10 -07:00
parent 46fdcf0718
commit c4b1f18755
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -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()