ProcessNewVideo
class ProcessNewVideo extends Job implements ShouldQueue
Traits
SerializesModels
InteractsWithQueue
Queueable
Dispatchable
Properties
int | $tries | The number of times the job may be attempted. |
|
Video | $video | The new video that should be processed. |
|
protected Video | $ffmpegVideo | The FFMpeg video instance. |
|
protected bool | $deleteWhenMissingModels | Ignore this job if the video does not exist any more. |
Methods
void
handle()
Execute the job.
string
getCodec(string $url)
Get the codec of a video
float
getVideoDuration(string $path)
Get the duration of the video.
Dimension
getVideoDimensions(string $url)
Get the dimensions of a 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 line 60
__construct(Video $video)
Create a new instance.
at line 70
void
handle()
Execute the job.
at line 107
handleFile(Video $file, string $path)
Process a cached video file.
at line 174
protected string
getCodec(string $url)
Get the codec of a video
at line 194
protected float
getVideoDuration(string $path)
Get the duration of the video.
at line 208
protected Dimension
getVideoDimensions(string $url)
Get the dimensions of a video
at line 228
protected string
generateVideoThumbnail(string $path, float $time, int $width, int $height, string $format)
Generate a thumbnail from the video at the specified time.
at line 252
protected array
getThumbnailTimes(float $duration)
Get the times at which thumbnails should be sampled.