Resource icon

obs-filter-hotkeys 1.0.2

upgradeQ

Member
Hi,
I just learned about this lovely script to add to OBS. I wish to ask a question as I noted something strange: I do not know if I am doing something wrong.

As for install, I copy those two .lua files in C:\Program Files\obs-studio\data\obs-plugins\frontend-tools\scripts
Then, I add them via Tools/Scripts to OBS.


I noticed that when I create a new Sources and add this new script, after removing the source in OBS Settings - Hotkeys I am still able to find trace of the scene with the filters. Is this normal? Should OBS as soon as the sources is deleted remote it from hotkey listing?
So far, it takes two OBS restarts in order to remove it from Settings – Hotkeys listing. Should it not be in real time?
Yes, code to clean afterwards is not written, though Pull Requests are welcome. Also I recommend to avoid default script's location and put 3rd party scripts elsewhere, because if you want to reinstall OBS Studio later it clears that folder.
Moreover, I wish to understand why I am unable to assign the same key for 0 and 1 meaning for loading and unloading the filter.
I am able to so in withing OBS.
Scripting API currently does not provide means to do 1 to 1 copy of app functionality, use hotkeys with prefix 2 for that.

Hi. New user here. I browsed through the web but haven't found the solution to my problem.

I have four filters here. However, when I want to assign hotkeys, I can only find Female and Tiny. The search didn't find the Robot and Giant. I tried restarting OBS but no dice.

View attachment 78898 View attachment 78899
Try using 0.3.1 version and increase timeout (ms) value here in your version if necessarily.
Also please provide a log
Please post a log with your issue! Here's how... | OBS Forums (obsproject.com)
It might be desync when you load some heavy VST plugin.
This script is AMAZING! Thank you for making it! I can't believe that OBS has not had an official release with this function built in. This is a great feature! I only have two critiques...

1 - Why oh WHYYYY does it clear the hotkeys upon restart? I'm sure there's a reason, but I would LOVE to know if there is something (even quirky or complicated) that I can do on my end to preserve the keys until an actual fix is released. For my application of this super helpful script, it is going to be really annoying and tedious to re-add the hotkeys each time the program is launched. I have a total of 8 hotkeys to type in (disable [0] and enable [1] options for 4 different visual filters on a single source - programmed with a multi-action on a stream deck).

2 - The random order that the 0,1,2,3 options for the source(s) show up in the hotkey menu is a little annoying, but I think I'm only annoyed by it because of the first issue I mentioned.

[The second critique matters very little in comparison to the first. I just wanted to offer thorough feedback.]
Adding onto this to say that I noticed the hotkeys do occasionally 'stick'/persist through restarting OBS. However, I can't produce that result consistently enough to prove that when they do reset it is anything other than random. Maybe you have more info/insight? Looking forwarding to a response!
1 - Please post a log with your issue! Here's how... | OBS Forums (obsproject.com) , also it's been almost a year with no updates on my side, maybe something changed in OBS Studio, you might try to downgrade your current version if applicable.
2 - This is all what Scripting API provides for hotkey registration, it might be possible to use another method via FFI, but that might introduce regressions... so I would rather stick to current implementation.
 

Iplay4u

New Member
Try using 0.3.1 version and increase timeout (ms) value here in your version if necessarily.
Also please provide a log
Please post a log with your issue! Here's how... | OBS Forums (obsproject.com)
It might be desync when you load some heavy VST plugin.
Hey! Having this same issue but the 0.3.1 release hasn't fixed it. Not sure how to change the delay as I have no apps that can open .lua files. As for help, here is my log: https://obsproject.com/logs/pigAF4BV8Do84C23
 

upgradeQ

Member
Hey! Having this same issue but the 0.3.1 release hasn't fixed it. Not sure how to change the delay as I have no apps that can open .lua files. As for help, here is my log: https://obsproject.com/logs/pigAF4BV8Do84C23
Analyzer | OBS (obsproject.com) - it says that you did not run under admin, this may interfere with hotkeys not working in fullscreen apps on Microsoft Windows, also you did not do important step of streaming/recording test session. Logs also missing "_filter_hotkeys_audio/video" ids, not sure why. You can open and edit .lua files with an text editor try Visual Studio Code or Neovim.
 

upgradeQ

Member
Any updates ? This script doesn't work in obs v29, but works perfectly in obs v29 beta 3
You should provide logs. It works on my machine version 29.0.0 Windows 11, earlier in this thread there was information about 0.3.1 release, this also might help you.
 

dubitabam

New Member
Anyone got this working with xdotool?

nevermind. works using keycodes instead of names
 
Last edited:
Top