VideoEffectsConfig

class VideoEffectsConfig(val pipeline: VideoEffectsConfig.Pipeline = Pipeline.LEGACY, val framing: VideoEffectsConfig.Framing = Framing(), val lighting: VideoEffectsConfig.Lighting = Lighting(), val style: VideoEffectsConfig.Style = Style(), val filter: VideoEffectsConfig.Filter = Filter(), val extra: Map<String, Any> = emptyMap())

Turns camera effects on: auto-framing, low-light correction, a stylised look and a colour grade.

Every effect is off unless it is asked for, and they only render on Pipeline.GRAPH — on Pipeline.LEGACY the settings are carried and echoed back but nothing renders them.

Settings this SDK version does not know are ignored rather than rejected, and settings it does not send take their default, so an app and an SDK of different ages still work together.

The effects run in a fixed order that does not depend on the order they are set in: framing, then lighting, then style, then filter. The order matters to the picture: the colour filter grades the finished image, so it is last.

VideoSDK.setVideoEffects(
VideoEffectsConfig(
pipeline = VideoEffectsConfig.Pipeline.GRAPH,
lighting = VideoEffectsConfig.Lighting(enabled = true),
filter = VideoEffectsConfig.Filter(lut = VideoEffectsConfig.Lut.WARM),
)
)

Constructors

Link copied to clipboard
constructor(pipeline: VideoEffectsConfig.Pipeline = Pipeline.LEGACY, framing: VideoEffectsConfig.Framing = Framing(), lighting: VideoEffectsConfig.Lighting = Lighting(), style: VideoEffectsConfig.Style = Style(), filter: VideoEffectsConfig.Filter = Filter(), extra: Map<String, Any> = emptyMap())

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class Filter(val lut: VideoEffectsConfig.Lut = Lut.OFF, val strength: Float = 1.0f)

A colour grade, applied last so it grades the finished picture.

Link copied to clipboard
class Framing(val enabled: Boolean = false, val maxZoom: Float = 2.0f)

Auto-framing: the picture is cropped and zoomed to keep the subject centred, and it eases back to the full frame when there is no subject.

Link copied to clipboard
class Lighting(val enabled: Boolean = false, val strength: Float = 1.0f)

Low-light correction: dim parts of the picture are lifted and bright parts are left alone, so a backlit subject brightens without the window behind them blowing out.

Link copied to clipboard

Which colour grade Filter runs.

Link copied to clipboard

Which capture pipeline processes camera frames.

Link copied to clipboard
class Style(val preset: VideoEffectsConfig.StylePreset = StylePreset.OFF, val strength: Float = 1.0f, val levels: Int = 5)

A stylised look applied to the whole picture.

Link copied to clipboard

Which stylised look Style runs.

Properties

Link copied to clipboard

additional effect settings, merged into the document as sent. Present so an app can drive a setting this SDK version has no typed property for yet. An entry here overwrites the typed property with the same key.

Link copied to clipboard

a colour grade. Off by default.

Link copied to clipboard

auto-framing. Off by default.

Link copied to clipboard

low-light correction. Off by default.

Link copied to clipboard

which capture pipeline to run. Defaults to Pipeline.LEGACY.

Link copied to clipboard

a stylised look. Off by default.

Functions

Link copied to clipboard
open override fun toString(): String