class ProcessNewVideo extendsJob implementsShouldQueue

Traits

SerializesModels
Queueable
Dispatchable

Properties

protectedVideo $video The new video that should be processed.
protectedVideo $ffmpegVideo The FFMpeg video instance.

Methods

__construct(Video$video)

Create a new instance.

void
handle()

Execute the job.

handleFile(Video$file,string$path)

Process a cached video file.

float
getVideoDuration(string$path)

Get the duration of the video.

string
generateVideoThumbnail(string$path,float$time,int$width,int$height,string$format)

Generate a thumbnail from the video at the specified time.

array
getThumbnailTimes(float$duration)

Get the times at which thumbnails should be sampled.

Details

at line42
__construct(Video$video)

Create a new instance.

Parameters

Video $video The video that should be processed.

at line52
void handle()

Execute the job.

Return Value

void

at line70
handleFile(Video$file,string$path)

Process a cached video file.

Parameters

Video $file
string $path

at line95
protectedfloat getVideoDuration(string$path)

Get the duration of the video.

Parameters

string $path Video file path.

Return Value

float Duration in seconds.

at line113
protectedstring generateVideoThumbnail(string$path,float$time,int$width,int$height,string$format)

Generate a thumbnail from the video at the specified time.

Parameters

string $path Path to the video file.
float $time Time for the thumbnail in seconds.
int $width Width of the thumbnail.
int $height Height of the thumbnail.
string $format File format of the thumbnail (e.g. 'jpg').

Return Value

string Vips image buffer string.

at line137
protectedarray getThumbnailTimes(float$duration)

Get the times at which thumbnails should be sampled.

Parameters

float $duration Video duration.

Return Value

array