Skip to content

Don't receive frames from NDI if not showing#1404

Merged
Trouffman merged 4 commits into
DistroAV:masterfrom
BitRate27:notshowing
Feb 17, 2026
Merged

Don't receive frames from NDI if not showing#1404
Trouffman merged 4 commits into
DistroAV:masterfrom
BitRate27:notshowing

Conversation

@BitRate27

Copy link
Copy Markdown
Contributor

This is to fix issue 1403 [Bug]: Frame rate of OBS drops when using Keep Active and multiple scenes with 4K 60fps sources.

When Keep Active is chosen, the source receiving thread keeps running whether or not the source is actually showing anywhere in OBS. This effects the performance of OBS by wasting time receiving frames from NDI and passing them to OBS (which ends up ignoring).

The fix is simply to continue to the top of the NDI source thread loop before receiving frames if the source is not being shown.

Verified the fix works by creating 4 4K 60fps NDI sources loading a scene collection of 4 scenes with a NDI source in each. I was able to switch between scenes in Normal mode with no delay in seeing the feed. Also tested in Studio mode with 2 scenes shown and witnessed a drop in frame rate from 30 to 7. When displaying a Multiview OBS becomes unusable, fps < 0.4.

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

Reduces OBS performance impact from NDI sources configured as Keep Active by skipping NDI frame reception when the source is not currently being shown anywhere in OBS, addressing issue #1403.

Changes:

  • Add an obs_source_showing() gate in the NDI receive thread loop to avoid receiving frames when the source is hidden.
  • Add a small sleep when hidden to avoid busy-waiting.

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

Comment thread src/ndi-source.cpp
@Trouffman

Copy link
Copy Markdown
Collaborator

@BitRate27 thanks for the fix.

"Also tested in Studio mode with 2 scenes shown and witnessed a drop in frame rate from 30 to 7. When displaying a Multiview OBS becomes unusable, fps < 0.4."

Does that happen WITH the fix or that is the behavior without the fix ?

@BitRate27

BitRate27 commented Feb 17, 2026

Copy link
Copy Markdown
Contributor Author

@BitRate27 thanks for the fix.

"Also tested in Studio mode with 2 scenes shown and witnessed a drop in frame rate from 30 to 7. When displaying a Multiview OBS becomes unusable, fps < 0.4."

Does that happen WITH the fix or that is the behavior without the fix ?

This is with the fix! It only really helps if in Normal mode. Studio Mode may be OK on a better machine, but Multiview will still suffer as all the sources are considered "showing", which is what it does now without the fix. I'll also add I am receiving a Full NDI feed generated locally, so HX3 may not have the same experience.

I am considering another idea I had a while back and that is adding a Bandwidth option called "Low when showing but not on program". When chosen, it will use the low bandwidth setting on the receiver if it is showing, but not active. Would need to prototype it as there may be some latency as a new receiver needs to be created when switching from non active to active.

@Trouffman

Copy link
Copy Markdown
Collaborator

Great! Thanks. That improvement can be logged in and managed in another dev cycle

@Trouffman
Trouffman self-requested a review February 17, 2026 15:21
@Trouffman
Trouffman merged commit 283b2e4 into DistroAV:master Feb 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants