&viewchroma

Receiver-side chroma key. Removes a chosen color from incoming video streams without needing anything from the sender.

Viewer-Side Option! (&view, &scene, &room)

Aliases

  • &vchroma

Options

Example: &viewchroma=00ff00&viewchromathreshold=40&viewchromasmoothing=30

Parameter
Aliases
Description

&viewchroma

&vchroma

Hex color to key out. Accepts 3- or 6-digit hex, with or without #. Defaults to 0f0 (green) when no value is given.

&viewchromathreshold

&vchromathreshold, &viewchromathresh, &vchromathresh

How close a pixel must be to the key color before it is treated as background. Range 0–255, default 40. Higher = more aggressive keying.

&viewchromasmoothing

&vchromasmoothing, &viewchromasmooth, &vchromasmooth

Softness of the edge between kept and keyed pixels. Range 1–255, default 30. Higher = softer, more gradual edge.

&viewchromahide

&viewchromahidesource, &vchromahide, &vchromahidesource

Whether to hide the raw source video behind the keyed canvas. Default 1 (hidden). Set to 0, false, or off to keep the source visible for debugging.

Details

&viewchroma applies a chroma key on the receiving side. It runs entirely in the viewer's browser — the sender does not need to enable any effects, install anything, or know that keying is happening. This is the counterpart to &chromakey, which runs on the sender.

Incoming video is drawn to a canvas each frame. Pixels close to the target color are turned transparent, pixels further away are kept opaque, and pixels in between fade smoothly based on the smoothing value. The keyed canvas replaces the raw <video> in the auto-mixer layout, so recording, scenes, and OBS capture all pick up the keyed result.

The default behavior hides the raw source video behind the canvas, because any pixel the key made transparent would otherwise show the original color underneath. &viewchromahide=0 lets you see both layers side-by-side, which is useful while tuning threshold and smoothing.

Examples

Key out pure red on a single incoming stream, with default threshold and smoothing:

Key green with a tighter threshold and softer edges:

Debug mode — show both the keyed canvas and the original video so you can compare:

Use in a scene to composite a guest onto a virtual background supplied by CSS or another layer:

Notes

  • Works with any number of viewed streams at once; each stream is keyed independently.

  • Color accuracy of the source affects results. Strong, well-lit backgrounds key cleanly; JPEG-style compression artifacts around hair and edges can leak through.

  • Because keying happens in the viewer, the raw (unkeyed) stream is still transmitted over the network. Bandwidth use is unchanged.

  • To key on the sender side instead — for example to save upload bandwidth or to key once for every viewer — use &chromakey.

&chromakeychevron-right&chromakeybgchevron-right&greenscreenchevron-right&viewchevron-right&scenechevron-right

Last updated

Was this helpful?