BackTrak / StreamDeckNvidiaBroadcastPlugin

A Stream Deck plugin that can control nVidia Broadcast video filters.
MIT License
3 stars 1 forks source link

Microphone support, not just camera #5

Closed beeradmoore closed 3 months ago

beeradmoore commented 4 months ago

Just came across this as I like to disable mic background removal from time to time. Before I jump in and make a mess of things and do a PR, is there a complicated reason why it only supports camera effects and not mic or speaker effects or is that it just wasn't needed so wasn't added.

My first thought was looking at NvidiaBroadcastResourceID.cs I think I can get the resource id's of all other settings and then I can also back track how something like PluginBackgroundReplacement.cs works to add support for "Noise removal", "Room echo removal" for both mic and speakers (although the strings are the same in mic and speaker settings, so I really hope those two don't have the same resource IDs  👀 and cause a lot more of an issue, hence the above initial question)

Thanks! Also neat that I can do some C# stuff for Stream Deck plugins. Looking forward to seeing what else I can come up with.

BackTrak commented 4 months ago

Hi @beeradmoore , give this new version a shot, let me know how it goes. I did rework the plug in significantly. It should work for all controls in Broadcast now.

https://github.com/BackTrak/StreamDeckNvidiaBroadcastPlugin/releases/tag/v2.0.0.0

If it works well for you, I will submit it to the marketplace.

beeradmoore commented 4 months ago

I tried to build from source and it failed to build, I'll try do a PR later to see what I need to do to make that work more smooth.

Release notes says I can't install it so that could be why this next bit fails and I actually do need to build from source? I did try manually installing by closing Stream Deck software, copied the com.zaphop.nvidiabroadcast.sdPlugin folder into my plugins folder and then started Stream Deck software again.

The NVIDIA Broadcast Toggle shows up but if I try to use it nothing shows up in its Select Toggle option. Is there something I need to dig out of install.bat to register the plugin in any particular way?

EDIT: My PC is setup for .NET dev, but only .NET 6+. I may not have .NET Framework SDK. I did dotnet restore and also openeed in VS hoping it'd pull the nugets correctly.

I assume the plugins need to stay on .NET Framework and thats why they are there?

error : This project references NuGet pac
kage(s) that are missing on this computer. Use NuGet Package Restore to download them.  For mo
re information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is package
s\Microsoft.Windows.SDK.Win32Metadata.55.0.45-preview\build\net20\Microsoft.Windows.SDK.Win32M
etadata.props.
BackTrak commented 4 months ago

Copying the files to the plugin folder from the release zip should be all you need to do. As long as you have some effects enabled in broadcast, they should show up in the drop down in the plugin settings.

On Tue, Mar 5, 2024, 5:03 PM Brad @.***> wrote:

I tried to build from source and it failed to build, I'll try do a PR later to see what I need to do to make that work more smooth.

Release notes says I can't install it so that could be why this next bit fails and I actually do need to build from source? I did try manually installing by closing Stream Deck software, copied the com.zaphop.nvidiabroadcast.sdPlugin folder into my plugins folder and then started Stream Deck software again.

The NVIDIA Broadcast Toggle shows up but if I try to use it nothing shows up in its Select Toggle option. Is there something I need to dig out of install.bat to register the plugin in any particular way?

— Reply to this email directly, view it on GitHub https://github.com/BackTrak/StreamDeckNvidiaBroadcastPlugin/issues/5#issuecomment-1979786560, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPBBABFOK2VMZVXNW2QSWTYWZFNLAVCNFSM6AAAAABD5FKBJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZZG44DMNJWGA . You are receiving this because you commented.Message ID: @.***>

beeradmoore commented 4 months ago

Gotya. Playing around with it some more now I can get it to work. Problem appears to be that if you add NVIDIA Broadcast Toggle and then add your effects, and then even restart broadcast and stream deck it will not show up in the dropdown. You have to add a new broadcast toggle for it to get the current state of effects.

It also the labels of the things are "Mic Effect 1" and "Camera Effect 1". Is that intended or is it not loading the actual effect labels for some reason?

BackTrak commented 4 months ago

Hi Brad,

I have a new idea about how to determine which toggle goes to which effect, I'll see if I can make that drop down prettier.

I messed around with it for a bit, but I wasn't able to reproduce that behavior. The steps I followed were:

  1. Remove all instances of NVIDIA Broadcast Toggle from StreamDeck
  2. Remove all effects from NVIDIA Broadcast
  3. Add one instance of NVIDIA Broadcast Toggle back to StreamDeck
  4. Nothing is shown in the Select Toggle dropdown (this is expected)
  5. Add one effect to NVIDIA Broadcast
  6. Nothing is shown in the Select Toggle dropdown (this is expected, the property inspector doesn't refresh unless you click on another plugin instance and then back on the NVIDIA Broadcast Toggle instance. When the property inspector is shown again, it will refresh.)
  7. Click on any other Stream Deck plugin instance
  8. Click back on the NVIDIA Broadcast Toggle instance
  9. Effects are shown in the dropdown menu, and one can be selected.

Does this work the same for you?

I could add a refresh button or timer here to detect if the user has made a change and push updates to the PI without needed to click off of it.

On Tue, Mar 5, 2024 at 5:58 PM Brad @.***> wrote:

Gotya. Playing around with it some more now I can get it to work. Problem appears to be that if you add NVIDIA Broadcast Toggle and then add your effects, and then even restart broadcast and stream deck it will not show up in the dropdown. You have to add a new broadcast toggle for it to get the current state of effects.

It also the labels of the things are "Mic Effect 1" and "Camera Effect 1". Is that intended or is it not loading the actual effect labels for some reason?

— Reply to this email directly, view it on GitHub https://github.com/BackTrak/StreamDeckNvidiaBroadcastPlugin/issues/5#issuecomment-1979835397, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPBBADMP7U7SOBW4NLIBRLYWZL2HAVCNFSM6AAAAABD5FKBJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZZHAZTKMZZG4 . You are receiving this because you commented.Message ID: @.***>

beeradmoore commented 4 months ago

Yep, you are 100% correct, and I can see now that things are weird.

I attached a screen recording and I can see how it is meant to work. At point 7 you say to click on any other Stream Deck plugin which causes a refresh. I do that in the first 33 seconds and confirm that works as you said

But in my case I thought I'd close Stream Deck software itself. I do this after the 33 second mark and then launch Stream Deck again. If I select NVIDIA Broadcast Toggle the filter does not populate. Selecting another item and back again does.

Call me crazy but I thought a full relaunch would have done more than clicking a different item and back again :P

Is it possible to re-populate the list on launch so then it handles the first click as well?

https://github.com/BackTrak/StreamDeckNvidiaBroadcastPlugin/assets/904737/b434fdc3-d29b-4f63-b597-babe78081ac0

BackTrak commented 4 months ago

That's interesting! I'll check that one out. In the meantime, I removed the dependency on needing the effect added before adding the plugin to your deck. Try this version out, I think you'll like it better!

https://github.com/BackTrak/StreamDeckNvidiaBroadcastPlugin/releases/tag/v2.0.0.1

beeradmoore commented 3 months ago

Looks a lot better with full names and icons. It is a bit more confusing though to show all options if they aren't added into broadcast itself. So if you don't have the filder added NVIDIA Broadcast Toggle will show it as a toggle even though clicking it will now do nothing.

Is it possible for it to show a warning or something in the area under select toggle to say that this effect/filter is not added to broadcast and won't work?

BackTrak commented 3 months ago

I could make it so that if you add a toggle and you don't have the filter setup, it would make the button red, or otherwise indicate it's not going to work. What do you think?

On Sun, Mar 10, 2024 at 11:58 PM Brad @.***> wrote:

Looks a lot better with full names and icons. It is a bit more confusing though to show all options if they aren't added into broadcast itself. So if you don't have the filder added NVIDIA Broadcast Toggle will show it as a toggle even though clicking it will now do nothing.

Is it possible for it to show a warning or something in the area under select toggle to say that this effect/filter is not added to broadcast and won't work?

— Reply to this email directly, view it on GitHub https://github.com/BackTrak/StreamDeckNvidiaBroadcastPlugin/issues/5#issuecomment-1987635930, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPBBAFW55C7CR7HWRKEZPDYXU2YXAVCNFSM6AAAAABD5FKBJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBXGYZTKOJTGA . You are receiving this because you commented.Message ID: @.***>

BackTrak commented 3 months ago

Give this one a shot: https://github.com/BackTrak/StreamDeckNvidiaBroadcastPlugin/releases/download/v2.0.0.2/com.zaphop.nvidiabroadcast.sdPlugin.zip

Thanks, Nick.

On Mon, Mar 11, 2024 at 12:53 AM Nick @.***> wrote:

I could make it so that if you add a toggle and you don't have the filter setup, it would make the button red, or otherwise indicate it's not going to work. What do you think?

On Sun, Mar 10, 2024 at 11:58 PM Brad @.***> wrote:

Looks a lot better with full names and icons. It is a bit more confusing though to show all options if they aren't added into broadcast itself. So if you don't have the filder added NVIDIA Broadcast Toggle will show it as a toggle even though clicking it will now do nothing.

Is it possible for it to show a warning or something in the area under select toggle to say that this effect/filter is not added to broadcast and won't work?

— Reply to this email directly, view it on GitHub https://github.com/BackTrak/StreamDeckNvidiaBroadcastPlugin/issues/5#issuecomment-1987635930, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPBBAFW55C7CR7HWRKEZPDYXU2YXAVCNFSM6AAAAABD5FKBJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBXGYZTKOJTGA . You are receiving this because you commented.Message ID: @.***>

beeradmoore commented 3 months ago

Perfect! Thanks for all those updates.

BackTrak commented 3 months ago

Awesome! I will submit this version to the Elgato marketplace. Thank you for the feedback and testing!

On Tue, Mar 12, 2024 at 3:06 PM Brad @.***> wrote:

Perfect! Thanks for all those updates.

— Reply to this email directly, view it on GitHub https://github.com/BackTrak/StreamDeckNvidiaBroadcastPlugin/issues/5#issuecomment-1992484315, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPBBAEG2JBOPKMNVIPQV2LYX5N3ZAVCNFSM6AAAAABD5FKBJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJSGQ4DIMZRGU . You are receiving this because you commented.Message ID: @.***>