abstract class VideoEffect

Defines how to manipulate the appearance of a video.

Learn more: Video effects

Methods

blur(int $strength = null)

Applies a blurring filter to the asset.

blurFaces(int $strength = null)

Applies a blurring filter to the faces detected on the asset.

blurRegion(int|string $strength = null, int|string $x = null, int|string $y = null, int|string $width = null, int|string $height = null)

Applies a blurring filter to the region on the asset.

vignette(int $strength = null)

Applies a vignette effect.

deshake(int $shakeStrength = null)

Removes small motion shifts from the video. with a maximum extent of movement in the horizontal and vertical direction of 32 pixels

fadeIn(int $duration = null)

Fade in at the beginning of the video.

fadeOut(int $duration = null)

Fade out at the end of the video.

noise(int $percentage = null)

Adds visual noise to the video, visible as a random flicker of "dots" or "snow".

accelerate(int $rate = null)

Changes the speed of the video playback.

boomerang()

Causes a video clip to play forwards and then backwards.

loop(int $additionalIterations = null)

Delivers a video that contains additional loops of the video.

reverse()

Plays the video or audio file in reverse.

volume(int|Volume $level)

Increases or decreases the volume by a percentage of the current volume.

transition()

Indicates that the video overlay is to be used as a transition between the base and second video.

Details

static Blur blur(int $strength = null)

Applies a blurring filter to the asset.

Parameters

Name Type Description
$strength int The strength of the blur. (Range: 1 to 2000, Server default: 100)

Return Value

Blur

static Blur blurFaces(int $strength = null)

Applies a blurring filter to the faces detected on the asset.

Parameters

Name Type Description
$strength int The strength of the blur. (Range: 1 to 2000, Server default: 100)

Return Value

Blur

static Blur blurRegion(int|string $strength = null, int|string $x = null, int|string $y = null, int|string $width = null, int|string $height = null)

Applies a blurring filter to the region on the asset.

Parameters

Name Type Description
$strength int|string The strength of the blur. (Range: 1 to 2000, Server default: 100)
$x int|string X.
$y int|string Y.
$width int|string Width.
$height int|string Height.

Return Value

Blur

static StrengthEffectAction vignette(int $strength = null)

Applies a vignette effect.

Parameters

Name Type Description
$strength int The strength of the vignette. (Range: 0 to 100, Server default: 20)

Return Value

StrengthEffectAction

static Deshake deshake(int $shakeStrength = null)

Removes small motion shifts from the video. with a maximum extent of movement in the horizontal and vertical direction of 32 pixels

Parameters

Name Type Description
$shakeStrength int The maximum number of pixels in the horizontal and vertical direction that will be addressed. (Possible values: 16, 32, 48, 64. Server default: 16)

Return Value

Deshake

static DurationEffectAction fadeIn(int $duration = null)

Fade in at the beginning of the video.

For details and examples, see 'Fade in and out' in the Video Transformations guide.

Parameters

Name Type Description
$duration int The time in ms for the fade to occur. (Server default: 1000)

Return Value

DurationEffectAction

See also

https://cloudinary.com/documentation/video_manipulation_and_delivery#fade_in_and_out

static DurationEffectAction fadeOut(int $duration = null)

Fade out at the end of the video.

For details and examples, see 'Fade in and out' in the Video Transformations guide.

Parameters

Name Type Description
$duration int The time in ms for the fade to occur.

Return Value

DurationEffectAction

See also

https://cloudinary.com/documentation/video_manipulation_and_delivery#fade_in_and_out

static EffectAction noise(int $percentage = null)

Adds visual noise to the video, visible as a random flicker of "dots" or "snow".

Parameters

Name Type Description
$percentage int The percent of noise to apply. (Range: 0 to 100 Server default: 0)

Return Value

EffectAction

static Accelerate accelerate(int $rate = null)

Changes the speed of the video playback.

Parameters

Name Type Description
$rate int The percentage change of speed. Positive numbers speed up the playback, negative numbers slow down the playback (Range: -50 to 100, Server default: 0).

Return Value

Accelerate

static EffectAction boomerang()

Causes a video clip to play forwards and then backwards.

Use in conjunction with trimming qualifiers ('duration', 'start_offset', or 'end_offset') and the 'loop' effect to deliver a classic (short, repeating) boomerang clip. For details and examples, see 'Create a boomerang video clip' in the Video Transformations guide.

static Loop loop(int $additionalIterations = null)

Delivers a video that contains additional loops of the video.

The total number of iterations is the number of additional loops plus one.

For animated images (GIF), see Animated::edit()->loop().

Parameters

Name Type Description
$additionalIterations int The additional number of times to play the video.

Return Value

Loop

static EffectAction reverse()

Plays the video or audio file in reverse.

Return Value

EffectAction

static EffectAction volume(int|Volume $level)

Increases or decreases the volume by a percentage of the current volume.

Also see \Cloudinary\Transformation\Volume for different ways to change the volume.

Parameters

Name Type Description
$level int|Volume The percentage change of volume (Range: -100 to 400).

Return Value

EffectAction

See also

Volume

static EffectAction transition()

Indicates that the video overlay is to be used as a transition between the base and second video.

Return Value

EffectAction