Resource icon

Free Command line tool for obs-websocket plugin (Windows) 1.6.3

FSC

Member
No problem, I'm glad I could help!!! What is this number anyway? its not RGB HSL HEX. But somehow convey color
obs-websocket's documentation only says it is "int" for any of the color values. A quick test reveals it looks like it's BGR in integer format.
For example:
Blue = FF0000 = 16711680
Green = 00FF00 = 65280
Red = 0000FF = 255
 

PixelBeardQc

New Member
obs-websocket's documentation only says it is "int" for any of the color values. A quick test reveals it looks like it's BGR in integer format.
For example:
Blue = FF0000 = 16711680
Green = 00FF00 = 65280
Red = 0000FF = 255
I googled coding color type for what must have been 2 hours yesterday! thankyou for the intel and the fix again.

For people looking to change color correction color setting using OBSCOMMAND

1. pick a color you like in the color picker
2. run obscommand.exe /command=GetSourceFilterInfo,sourceName="CoOl SoUrCe",filterName="Color correction"
3. get the 9 digit color value ex: "color": 4294901502, (BTW this is very close to white)
4. run obscommand.exe /command=SetSourceFilterSettings,sourceName="CoOl SoUrCe",filterName="Color correction",filterSettings=color=4294901502


My quest is now over.
 

kutibotond

Member
Hey! After a long time I'm back for a question :D. I'm playing with the idea to get a mac (with an ARM chip) in the next two years and migrate my whole stream project to it. Would it be possible to make it compatible with it somehow ? I think there's not another tool like this for mac but I could be wrong.
 

FSC

Member
I googled coding color type for what must have been 2 hours yesterday! thankyou for the intel and the fix again.

For people looking to change color correction color setting using OBSCOMMAND

1. pick a color you like in the color picker
2. run obscommand.exe /command=GetSourceFilterInfo,sourceName="CoOl SoUrCe",filterName="Color correction"
3. get the 9 digit color value ex: "color": 4294901502, (BTW this is very close to white)
4. run obscommand.exe /command=SetSourceFilterSettings,sourceName="CoOl SoUrCe",filterName="Color correction",filterSettings=color=4294901502


My quest is now over.
4294901502 might work somehow and you get white, but I don't understand how you get such a high number.

24-bit RGB (or BGR) white is FFFFFF, in decimal 16777215, any number above that might produce anything other than pure RGB (BGR) white.
It is between 0 (black) and 16777215 (white). The fix I did might not even have been needed for this.
 

FSC

Member
Hey! After a long time I'm back for a question :D. I'm playing with the idea to get a mac (with an ARM chip) in the next two years and migrate my whole stream project to it. Would it be possible to make it compatible with it somehow ? I think there's not another tool like this for mac but I could be wrong.
Sorry, I'm a Windows only guy.
 

PixelBeardQc

New Member
4294901502 might work somehow and you get white, but I don't understand how you get such a high number.

24-bit RGB (or BGR) white is FFFFFF, in decimal 16777215, any number above that might produce anything other than pure RGB (BGR) white.
It is between 0 (black) and 16777215 (white). The fix I did might not even have been needed for this.

Maybe another bug? I set the color in OBS then I run the GetSourceFilterInfo. This is how I got that number
 

PixelBeardQc

New Member
4294901502 might work somehow and you get white, but I don't understand how you get such a high number.

24-bit RGB (or BGR) white is FFFFFF, in decimal 16777215, any number above that might produce anything other than pure RGB (BGR) white.
It is between 0 (black) and 16777215 (white). The fix I did might not even have been needed for this.

Let say I set my color correction manually to #ff0004 it gets me 4278452479 instead of 16711684.


This is why I was saying that I could not find what "type" of number system the color was using
 

PixelBeardQc

New Member
Hmm ok, maybe it gets converted internally to 32bit or something. Well if it works it works ;)

Yhea, no need to poke in code. If its not really broken don't fix it.

Oh yhea did I say this thing is freaking amazing? I have it running from Voiceattack to Mixitup to OBSCOMMAND and the possibilities are limitless. Merci beaucoup
 

PixelBeardQc

New Member
Would it be possible to refresh browser source cash with OBSCOMMAND? I am trying to stay away from hotkey and I can't have my Browser set to reload in my current setup
 

itanshi

New Member
How might I mitigate a "Request Timed Out" error. I am using CMD to test commands and I have not changed the port or password from default. Thank you. Happy new year.
 

itanshi

New Member
OK, update. I slept on it and now my test script works.

So this is where I'm stuck. /command=SetSourceFilterSettings,sourceName=FACECAM2,filterName="writeon",filterSettings=image_path="C:/Users/itanshi/Downloads/$args1text.png"

is there documentation for using $args1text variable? I understand I could set it to $args2 or 3 should i need to or $allargs but nothing works yet
 

FSC

Member
How might I mitigate a "Request Timed Out" error. I am using CMD to test commands and I have not changed the port or password from default. Thank you. Happy new year.
Happy new year!
"Request Timed Out" should only occur if the server is not reachable, the timeout is set to 3 seconds. So far no one has reported any problem with that.
If you want me to look into something I need more details what to look for, e.g. what command does this happen or with every command, are you on the same machine or controlling another pc in your network or over internet etc.

OK, update. I slept on it and now my test script works.

So this is where I'm stuck. /command=SetSourceFilterSettings,sourceName=FACECAM2,filterName="writeon",filterSettings=image_path="C:/Users/itanshi/Downloads/$args1text.png"

is there documentation for using $args1text variable? I understand I could set it to $args2 or 3 should i need to or $allargs but nothing works yet
"$args"???.... is no syntax in a batch script, but please understand that I'm not here to teach how to make proper batch scripts.
 

PixelBeardQc

New Member
Question about
SetSourceSettings

on a browser source

I am trying to change the css, here is what getsourcesettings get me

/command=GetSourceSettings,sourceName="PIXCHAT Intermission" { "message-id": "58rnE773XYUIwhjl", "sourceName": "PIXCHAT Intermission", "sourceSettings": { "css": "body { background-color: rgba(0, 0, 0, 0); margin: 0px auto; overflow: hidden;font-family:windlass;}\n.css-zxgouf{\ncolor:white !important;\n}", "fps": 31, "height": 250, "url": "https://pixel.chat/****************", "width": 600 }, "sourceType": "browser_source", "status": "ok" } Ok

I am then trying to change using


/command=SetSourceSettings,sourceName="PIXCHAT Intermission",sourceSettings=css="body { background-color: rgba(0, 0, 0, 0); margin: 0px auto; overflow: hidden;font-family:windlass;} \n\n.css-zxgouf{\ncolor:blue !important;\n}\n"

But I get

Error with command "SetSourceSettings,sourceName=PIXCHAT Intermission,sourceSettings=css=body { background-color: rgba(0, 0, 0, 0); margin: 0px auto; overflow: hidden;font-family:windlass;} \n\n.css-zxgouf{\ncolor:$arg4text !important;\n}\n": Missing a = in Name=Type Error with command "SetSourceSettings,sourceName=PIXCHAT Intermission,sourceSettings=css=body { background-color: rgba(0, 0, 0, 0); margin: 0px auto; overflow: hidden;font-family:windlass;} \n\n.css-zxgouf{\ncolor:$arg4text !important;\n}\n": Index was outside the bounds of the array. Ok


Any help would be much appreciated
 

FSC

Member
Question about
SetSourceSettings

on a browser source

I am trying to change the css, here is what getsourcesettings get me
...


Any help would be much appreciated

/command is only for simple or single nested json commands, it is not suitable for complex combinations of nested json commands, you should be able to make this work with the /sendjson feature
 

Boulzor

New Member
Hello,
Great Job, very nice plugin.
How i can change scene collections ?
I'm trying /sc-name=NAMECOLLEC ( /server=127.0.0.1:4413 /password=123456 /sc-name=NAMECOLLEC)
The result is Ok, but the scene collections doesn't change.
 

richardguenther

New Member
Hello.
It's a great plugin. I queued up 50 commands at it worked almost instantly - great work. Now I'm trying to show a source in a "Group" but I don't know if or how obs command can acess groups and sources within a group.
Is there a way or should I use another websockets way into obs to accomplish this?
thank you
richard
 
Top