ProcessNewVideo
class ProcessNewVideo extends Job implements ShouldQueue
Traits
Properties
int | $tries | The number of times the job may be attempted. |
|
Video | $video | The new video that should be processed. |
|
protected | $ffmpegVideo | The FFMpeg video instance. |
|
protected FFProbe|null | $ffprobe | The FFProbe instance. |
|
protected bool | $deleteWhenMissingModels | Ignore this job if the video does not exist any more. |
Methods
Execute the job.
Get the codec of a video
Get the duration of the video.
Get the dimensions of a video
Extract images from video.
No description
Run the actual command to extract snapshots from the video. Separated into its own method for easier testing.
Generate a thumbnail from a video snapshot. Separated into its own method for easier testing.
Details
at line 65
__construct(Video $video)
Create a new instance.
at line 75
void
handle()
Execute the job.
at line 112
handleFile(Video $file, string $path)
Process a cached video file.
at line 187
protected string
getCodec(string $url)
Get the codec of a video
at line 207
protected float
getVideoDuration(string $path)
Get the duration of the video.
at line 221
protected Dimension
getVideoDimensions(string $url)
Get the dimensions of a video
at line 239
protected
extractImagesfromVideo(string $path, float $duration, $destinationPath)
Extract images from video.
at line 258
generateVideoThumbnails($disk, $fragment, $tmpDir)
No description
at line 312
protected void
generateSnapshots(string $sourcePath, float $frameRate, string $targetDir)
Run the actual command to extract snapshots from the video. Separated into its own method for easier testing.
at line 325
protected Image
generateThumbnail(string $file, int $width, int $height)
Generate a thumbnail from a video snapshot. Separated into its own method for easier testing.