Мне кажется, проблема в том, что миниатюра не сохраняется. Он действительно создан, но не сохранен. Если вы отметите /var/www/html/theevent/vendor/pawlox/video-thumbnail/src/VideoThumbnail.php
, то увидите этот метод.
public function createThumbnail($videoUrl, $storageUrl, $fileName, $second, $width = 640, $height = 480) {
$this->videoURL = $videoUrl;
$this->storageURL = $storageUrl;
$this->thumbName = $fileName;
$this->fullFile = "{$this->storageURL}/{$this->thumbName}";
$this->screenShotTime = $second;
$this->width = $width;
$this->height = $height;
try {
$this->create();
$this->thumbnail();
$this->resizeCropImage($this->width, $this->height, $this->fullFile, $this->fullFile);
} catch (Exception $e) {
Log::error($e->getMessage());
}
return $this;
}
so u need to fix the file path by creating d folder for the file to be saved
here my working code
$thumbnail_path=storage_path().'/app/public/thumbs';
$file = $request->file('video');
$thumbvideoPath = storage_path('/app/public/videos/').$videoName;
$video_path = $destination_path.'/'.$file_name;
$thumbnail_image = $videoName.".jpg";
$thumbnail_status = VideoThumbnail::createThumbnail($thumbvideoPath,$thumbnail_path,$thumbnail_image, 10);
//dd($thumbnail_status);
if($thumbnail_status)
{
echo "Thumbnail generated ";
}
else
{
echo "thumbnail generation has failed";
}