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 61
__construct(Video $video)
Create a new instance.
at line 71
void
handle()
Execute the job.
at line 108
handleFile(Video $file, string $path)
Process a cached video file.
at line 175
protected string
getCodec(string $url)
Get the codec of a video
at line 195
protected float
getVideoDuration(string $path)
Get the duration of the video.
at line 209
protected Dimension
getVideoDimensions(string $url)
Get the dimensions of a video
at line 229
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 253
protected array
getThumbnailTimes(float $duration)
Get the times at which thumbnails should be sampled.