Skip to content

Add new source filters#6022

Closed
sandboxcoder wants to merge 3 commits into
stagingfrom
rno/filterTypes
Closed

Add new source filters#6022
sandboxcoder wants to merge 3 commits into
stagingfrom
rno/filterTypes

Conversation

@sandboxcoder

@sandboxcoder sandboxcoder commented Jul 15, 2026

Copy link
Copy Markdown
Contributor
  • Add missing filters: Luma Key, 3-Band Eq, and Upward Compressor.
  • Add version 2 of all known filters that were updated.
  • User's scene collection remains unaffected. They will keep using version 1 unless they delete their filter and create a new one matching OBS behavior.

Dependencies

This change depends on this OSN update which filters out disabled/obsolete filters.

Regression test cases for QA

This PR updates the following filters to their version 2 counterparts: Image Mask/Blend, Color Correction, Color Key, Sharpen, Chroma Key, Noise Suppression.

This PR adds Upward Compressor (Audio filter), Luma Key Filter (Video), and 3-Band Equalizer (Audio filter)

What changed from version 1 to version 2?

Color Correction - v2 adds proper color space negotiation so the filter works correctly in SDR/WCG pipelines without mangling HDR content, whereas v1 blindly assumed GS_RGBA for everything.

Image Mask/Blend- v2 is a precision and color-pipeline upgrade — higher-resolution opacity and proper sRGB/color space awareness

Color Key Filter- v2 is a substantial rework: opacity is redesigned from an alpha-packed color hack into a proper float parameter, brightness scaling is removed, the contrast/brightness ranges are expanded, and the whole render path gains proper color space awareness.

Sharpness - only adds SRGB capability flag
Chroma Key - the chroma key v2 changes are a mirror of the color key v2 changes — opacity redesigned from an alpha-packed color hack to a proper float, brightness scaling removed, expanded ranges, and full color space pipeline awareness added.

Noise Suppression (Audio) - The change is essentially: v2 promotes RNN noise suppression as the preferred default when available, rather than only falling back to it when Speex isn't present. RNN = Recurrent Neural Network. It refers to a neural network-based noise suppression approach (specifically the https://jmvalin.ca/demo/rnnoise/ library), as opposed to the classic DSP-based Speex noise suppression.

New filters that this PR exposes

Luma Key Filer:
The luma key filter makes pixels transparent based on their brightness (luminance) rather than a specific color. It exposes four parameters:

  • Luma Min / Luma Max (0.0–1.0): defines the brightness range to key out. Pixels whose luminance falls within this range become transparent.
  • Luma Min Smooth / Luma Max Smooth: softens the edges of the key at the min/max thresholds, so the transparency transition isn't a hard cut.

For example, with default settings (luma_min=0.0, luma_max=1.0, no smoothing), nothing is keyed. If you set luma_min=0.5, pixels darker than 50% brightness become transparent — useful for removing black backgrounds or applying overlays that blend based on brightness
rather than color.

It's commonly used with white/black backgrounds or as a way to composite elements where a color-based chroma key wouldn't work.

Upwards Compressor: The upward compressor is an audio dynamics filter that boosts quiet sounds up toward a threshold, as opposed to a traditional (downward) compressor which turns loud sounds down.

How it works:

  1. Detection — measures the signal level using an RMS envelope follower (10ms window)
  2. Gain stage — for signals below the threshold, applies positive gain proportional to slope * (threshold - signal_level). Signals above the threshold get 0 gain (left untouched). The slope is 1.0 - ratio, where ratio is 0.0–1.0
  3. Knee — a soft knee (0–20 dB wide) smooths the transition around the threshold so the boost doesn't kick in abruptly
  4. Ballistics — attack and release times control how fast the gain responds
  5. Output gain — a final makeup gain stage

Parameters:

  • Ratio (0.0–1.0): how aggressively to boost quiet sounds — higher ratio = more boost
  • Threshold (-60–0 dB): the level below which boosting begins
  • Attack / Release (1–100ms / 1–1000ms): how fast the gain reacts
  • Knee width (0–20 dB): softness of the threshold transition
  • Output gain (-32–+32 dB): makeup gain applied after compression

Practical use: leveling out a quiet speaker or microphone so soft parts of speech become more audible without turning up the overall volume — the opposite problem from what a downward compressor solves. It shares the same underlying code as the expander filter, just
with is_upwcomp = true which flips the gain direction.

3 Band Equalizer: It's a simple 3-band equalizer audio filter. It splits the audio signal into three frequency bands and lets you boost or cut each by ±20 dB:

  • Low — below 800 Hz (bass)
  • Mid — 800 Hz to 5000 Hz (vocals, presence)
  • High — above 5000 Hz (air, sibilance)

How it works under the hood:

The crossover frequencies are hardcoded at 800 Hz and 5000 Hz. For each audio sample it runs two 4-pole lowpass filters in series (one tuned to 800 Hz, one to 5000 Hz) using a simple first-order IIR structure. The three bands are then derived by subtraction:

  • low = output of the 800 Hz lowpass
  • high = delayed input minus the 5000 Hz lowpass output
  • mid = delayed input minus high minus low

Each band is scaled by its gain multiplier and the three are summed back together. The EQ_EPSILON added each step prevents denormal floating-point values from causing performance issues.

It's intentionally simple — no adjustable crossover frequencies, no shelf or peak filters, just three fixed bands with gain controls.

* add missing filters (Luma Key, 3-Band Eq, and Upward Compressor
* add version 2 of all known filters that were updated
* use custom branch

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Streamlabs Desktop’s source filter allowlist to expose newly added OBS/OSN filters (Luma Key, Upward Compressor, 3-Band Equalizer) and to add v2 IDs for several existing filters, alongside bumping the bundled obs-studio-node dependency and updating English filter labels.

Changes:

  • Bump obs-studio-node dependency version to pick up updated/filtered OBS filter IDs.
  • Extend the filter type union + allowlist to include new filters and v2 variants of existing filters.
  • Add new English i18n strings for the newly exposed filters.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
scripts/repositories.json Updates the obs-studio-node dependency version used for native dependency installs.
app/services/source-filters.ts Adds new filter IDs (and v2 variants) to the type union and the allowlisted filter types exposed in the UI.
app/i18n/en-US/filters.json Adds en-US translation keys for the new filter names shown in the UI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/services/source-filters.ts
@bundlemon

bundlemon Bot commented Jul 15, 2026

Copy link
Copy Markdown

BundleMon

Files added (4)
Status Path Size Limits
renderer.(hash).js
+7.86MB -
vendors~renderer.(hash).js
+4.67MB -
updater.js
+115.29KB -
guest-api.js
+40.23KB -

Total files change +12.67MB

Final result: ✅

View report in BundleMon website ➡️


Current branch size history

* The legacy version of luma_key_filter is not supported
@sandboxcoder
sandboxcoder marked this pull request as ready for review July 16, 2026 00:01
@michelinewu michelinewu added staging Pull requests that can't be bundled needs new osn version This code is waiting for the next osn version before it can be merged labels Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs new osn version This code is waiting for the next osn version before it can be merged staging Pull requests that can't be bundled

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants