-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
obs-filters: Factor out NVIDIA Audio effects #9457
Conversation
Have you tested both this filter and the legacy one loaded together? I am concerned that NVAFX might not be too happy with multiple instances from a single application. |
70de258
to
84e4a18
Compare
@RytoEX @notr1ch |
46ea36a
to
50e2a2e
Compare
For the sake of discussion I've added a commit completely removing NVIDIA Audio Effects from noise suppression. PRO:
CON:
|
I'ld like to suggest folding commit message like below.
Please note that there is a CR instead of LF at the end of the line |
The problem was the line below in the commit has 89 characters.
For the CR LF, I saw only CR instead of CR LF at the end of |
These two lines are not separated by LF but separated only by CR. So it becomes one line and is counted as 89 characters.
(When I first checked the commit message by script, the text before CR was cleared on my terminal and showed the text only after the CR.) |
ok i spotted what you say. It was not displayed with fork (my git client) but with git on CLI I see it; it's corrected now. |
The changes look fine but I agree that the missing migration of the the old filter to the new one could be a problem as it might break existing setups and we don't have good way to notify users about this yet. Is there maybe a way for the new filter variant to always be loaded before the old noise suppression filter and have it load and apply the old settings? This way we could "convert" the old filter into the new one automatically, remove the old settings, and have the old filter disabled entirely. |
b90db69
to
17dde44
Compare
PR Updated (Feb. 25, 2024) @notr1ch Thanks to this migration, I've removed completely nvafx from 'Noise Suppression'; the NVIDIA afx dll is therefore loaded once. Furthermore, I've migrated all NVIDIA filters (both audio and video) to their own projects so that if there's an issue, obs-filter.dll will not be affected. |
307df60
to
72e5eb5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions now that I've been able to circle back around to this.
PR updated to reflect comments by @RytoEX |
39b9bff
to
ac44e1c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nits.
I would appreciate is if someone could run some tests on capable hardware.
Apologies. Merging #11043 caused a merge conflict here. |
This commit does the following: 1. Factor out NVIDIA Audio Effects from Noise Suppression filter. 2. Move NVIDIA Audio Effects to a new filter in a new nv-filters project. 3. Migrate Noise Suppression filter settings to the new filter when NVIDIA Audio effects were used. 4. Migrate NVIDIA AI Greenscreen to the new nv-filters project for easier maintainance of all NVIDIA Maxine effects. Context: Currently, the three NVIDIA Audio Effects (noise suppression, room echo removal, noise suppression + room echo removal combined) are part of the noise suppression filter. Historically, it's because a lot of code was shared between speex, rnnoise & NVIDIA noise suppression. But the NVIDIA code has become bulkier & cumbersome due to: - addition of other effects; - addition of a deferred loading thread. The factorisation makes the code very difficult to maintain for (un)readability reasons. This will make it easier to add other audio effects, should we wish to. Developers life will be easier too when debugging. The code has been reorganized and comments added. I also added a mutex in the process_fx function to avoid a crash when swapping effects. Signed-off-by: pkv <[email protected]>
rebased and fixed the conflict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine at a glance.
Description
Updated, 02/25/24
This PR does the following:
project.
NVIDIA Audio effects were used.
easier maintainance of all NVIDIA MAxine effects.
Context:
Currently, the three NVIDIA Audio Effects (noise suppression, room
echo removal, noise suppression + room echo removal combined) are part
of the noise suppression filter.
Historically, it's because a lot of code was shared between speex,
rnnoise & NVIDIA noise suppression.
But the NVIDIA code has become bulkier & cumbersome due to:
The factorisation makes the code very difficult to maintain for
(un)readability reasons.
This will make it easier to add other audio effects, should we wish to.
Developers life will be easier too when debugging.
The code has been reorganized and comments added.
Note:
The migration to NVIDIA Audio Effects filter is done at the first .filter_audio call because the parent needs
to be known.
If the parent source is not enabled, the call is not made but the following message is displayed.
Bugfix: I also added a mutex in the process_fx function to avoid a crash when
swapping effects.
Motivation and Context
Code cleanup is good.
Readable code is good.
This will make it easier to add other audio effects, should we wish to.
Developers life will be easier too when debugging.
The code has been reorganized and comments added.
How Has This Been Tested?
The new filter works fine. Tested with noisy demo files provided by NVIDIA sdk.
The auto-migration from Noise Suppression to NVIDIA Audio filter works fine:
https://github.com/obsproject/obs-studio/assets/9283407/11f12f2b-434f-4384-af17-428e5e4caa55
The Greenscreen filter still works.
Types of changes
Checklist: