Resource icon

AFK/Mute Scene/Source Switcher

adocilesloth submitted a new resource:

AFK/Mute Scene Switcher - Switch scene based on audio mute status

This plugin lets you switch scene based on audio mute status.

If you mute your desktop, mic, or both at the same time the plugin will switch to another scene. It can also force mute the other audio source (mic if desktop or desktop if mic) if you choose to mute on just desktop or just mic. It will then switch back when you unmute.

The scene you switch to can be a suffixed scene (eg BF3 -> BF3 Mute) or to a specific scene (eg BF3 -> AFK).

Downloads:
From GitHub
Zip file contains MuteSceneSwitch.dll for 32bit and 64bit and README.txt files

Installation:
Put MuteSceneSwitch.dll into ../Program Files/OBS/plugins folder
of if using 32bit on 64bit windows
Put MuteSceneSwitch.dll into ../Program Files(x86)/OBS/plugins folder

Config:

Enable/Disable
Switch scene when desktop is muted, mic is muted or both are muted
If just desktop or mic is selected, can fore the other audio to be muted as well
Switch scene to a scene with suffix (suffix must include any spaces eg for BF3 -> BF3 Mute, the suffix will be " Mute"), switch to a new scene or toggle on/off a source.

Known Issues
Small compatability issue with Per Scene Volume (PSV) plugin if you use this plugin, with psv active, to switch to a muted scene when both the desktop and mic are muted. If you mute your mic last, the scene will switch but there is a chance the mic will unmute if the muted scene has an unmuted desktop when you switch to it.

If you are interested, or want to see how bad my coding is, source code is available on Github.

Read more about this resource...
 
Last edited:

XeiZ

Member
Nice to see some new plugins. I will give it a try and report back! :)

Edit: Working nicely, good job on that one!
 

Helixia

Member
I tried this plugin.
But when i press my mute key (Numpad Del).
It keeps switching back and forth from my previous and AFK scene which a crash of OBS.
 

Helixia

Member
I used the plugin on the 64-bit version of OBS.

Here are my settings of the plugin:


My mute key and AFK scene:


Log file: http://pastebin.com/M98rwPFM

I think i have weird computer cause i have weird error with your plugins.
Sorry about that :S.

I hope this information helps you any further.
 
I still can't reproduce this. No idea why it's doing this for you, it makes no sense to me. It's evidently scene swapping like crazy, I just don't know why. Is your mic unmuting and remuting when this happens or just the scene changing?

Considering two of my plugins are failing for you, are you getting any error messages when launching OBS? Someone had a problem before with one of my plugins due to a missing .dll to do with VS2010. I would suspect that the issues are separate but you never know.
 

Helixia

Member
I do not get any error when launching OBS.
I just starts and i can streaming normally.

When it's switchs forth and back very quick the mic mutes and unmutes.

About the VS2010.dll where can i find it?
Then i can test again if the plugins are still failing for me.
 
The .dll in question was msvcp100.dll but the problem that needed it had an error message and the plugin wouldn't load so I doubt that's the issue.

If the mic is muting then unmuting, it may be that the plugin is either muting and unmuting your mic or following the mic as it mutes and unmutes.

Try:
moving MuteSceneSwitch.dll out of the plugins folder,
check the hotkey for the mic and see if it switches on and off rapidly,
put MuteSceneSwitch.dll back into the plugins folder

I managed to get a different issue I had fixed by removing and replacing MuteSceneSwitch.dll into the plugins folder. Don't know why it fixed it but it did. Worth a try I guess.
 

Helixia

Member
I tried what you said for the 64-bit version of your plugin, but it didn't work.
Without the plugin OBS doesn't mute/unmute my mic rapidly.
With the plugin on it does on the 32-bit and 64-bit version.

I hope i gave you enough information about this.
 

PF4NDY

New Member
Helixia said:
I tried this plugin.
But when i press my mute key (Numpad Del).
It keeps switching back and forth from my previous and AFK scene which a crash of OBS.
FIX:
Since I am sort of a good guy I have registered here to inform you that this error is caused by the "scene dependent volume"-plugin. It checks the mute/unmute states and if you mute on your original scene and "AFK/Mute Scene" switches to your Mute-Scene it will produce a loop, because the states are checked twice.

Just disable the "scene dependent volume"-plugin.

Nr. 1 Update this Plugin needs:

The settings of this plugin do not save when I close OBS. This NEEDS to be fixed.
 

Helixia

Member
PF4NDY said:
Helixia said:
I tried this plugin.
But when i press my mute key (Numpad Del).
It keeps switching back and forth from my previous and AFK scene which a crash of OBS.
FIX:
Since I am sort of a good guy I have registered here to inform you that this error is caused by the "scene dependent volume"-plugin. It checks the mute/unmute states and if you mute on your original scene and "AFK/Mute Scene" switches to your Mute-Scene it will produce a loop, because the states are checked twice.

Just disable the "scene dependent volume"-plugin.

Nr. 1 Update this Plugin needs:

The settings of this plugin do not save when I close OBS. This NEEDS to be fixed.
You are awsome PF4NDY i disabled the scene dependent volume plugin and after that this plugin is working like a charm!
@Adocilesloth you can mark this issue as fixed. I think my other issue has maybe to do with any program/plugin conflicting, but i don't know where i should start looking for conflicted plugins/programs.

I think i can help you PF4NDY.
You can try to remove the plugin from the plugin folder then start OBS.
(if you want to be 200% sure download the plugin again)
Place the plugin again in the plugin folder and try to change some settings and see if the settings are properly saved.
In my case the settings are saved every time i close OBS.

And if it doesn't solve the problem it can possible you don't have enough disk space or OBS doesn't have enough permissions to save to re-write certain.
I hope this will help you out.
 

PF4NDY

New Member
np, if you know how I can fix the plugin to save the settings and use "Switch Scene When: Microphone Muted" as default, tell me. It always switches back to default settings (Switch Scene When: Desktop Muted) after restarting.
 
Helixia, glad to hear you got the problem fixed! I'll update the OP to note compatibility issues with the Scene Dependant Volume plugin. Thanks for letting me know PF4NDY!

PF4NDY, the settings should save when you hit OK in the plugin config page. Not sure why it isn't for you.

Try running OBS as admin when you set up the plugin. OBS may not have the permissions to write the files.

If that doesn't work try going to:
AppData/Roaming/OBS/pluginData (search for %appdata%/OBS/pluginData in the start menu)
in that folder, delete mutesceneswitch.ini
This should reset the saved settings to default and force the plugin to remake that file. Then reset up the plugin and hit OK in the config box.

It still doesn't work, I'd appreciate it if you could post the .ini file above.
 

PF4NDY

New Member
It doesn't even create mutesceneswitch.ini. I tried it in administrator mode, too.

(Would have been weird, because every other plugin can write files without starting it as administrator.)

Can you post the content of the mutesceneconfig.ini? Luckily, *.ini files aren't compressed/compiled codes that you can't create manually. If it's just me having that particular issue we do not need to search for the problem.
 
Huh, that's a bit odd.

The following is for the .ini .It is for switching on mic for you as well.
Code:
1
1
0
0
 Mute
Hope that gets it working for you. I'll have a look regardless and see if I am messing something up.
 

PF4NDY

New Member
Ok it seems to not work even if I add the file manualy.

Conclusion: The plugin can't fine the path to %appdata%/OBS/pluginData

"mutesceneswitch.ini" <- is this correct? All lowercase letters?
 
Yeah, that is the right name, all lower case.
The file should be in %appdata%/OBS/pluginData not %appdata%/Roaming/OBS/pluginData (but I expect that was just a typo)

I'm not sure what is happening. I'll have a look over the plugin and see if anything odd is popping up.
 

PF4NDY

New Member
Yeah I know where it belongs, the reason I typed %appdata%/Roaming.. was because I didn't copy&paste. :)

Conclusions:

- plugin doesn't find path.
- plugin is skipping the part where it should read or write the config.

the full path is

C:\Users\Xxxxxxx Xäxxxxx\AppData\Roaming\OBS\pluginData

Maybe it's because of my user name folder having an lower case "ä" in it and a space? (the X resemble the letters, I left out the ä to explain my hypothesis) I know it's a dumb hypothesis, but as a modder I've seen lots of bugs and take everything into consideration.
 
f you would be so kind can you use this 32bit .dll. It won't fix the issue but hopefully it will point out if the path is not working properly. It should throw the file path into the logs so can you then either check it's the right path (look down the log for WARNING instead of a time stamp) or post the log.

Never mind, I made an error with that .dll Ok, this .dll should work. You need to run a quick stream/preview for a few seconds and the file path will be put into the log.
 

PF4NDY

New Member
Code:
Warning -- MuteSceneSwitch Plugin Data Path:
Warning -- C:\Users\Xxxxxxx Xäxxxxx\AppData\Roaming\OBS\pluginData


[stream load up content here]



Warning -- MuteSceneSwitch Plugin Data Path:
Warning -- C:\Users\Xxxxxxx Xäxxxxx\AppData\Roaming\OBS\pluginData
Is it normal that it shows the error two times. 1x before stream load up and 1x after?

OBS has enough privileges, other plugins can write *.ini files, too.
 
Top