Resource icon

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

KardinalZyn

New Member
Ignore all of this except the part where I thank you and think you are awesome for making OBSCommand, because I just learned about custom extents in OBS which solved my issue! ^_^

Thanks!

Hey FSC,

First of all, THANK YOU for an AMAZING utility! This thing ROCKS! ^_^ That said, I am having an issue and I am hoping you can help!

Background
I have a GDI+ Text source named UserWhoTriggered inside a scene named Overlay. The GDI+ Text source named UserWhoTriggered reads from a text file, and the string in the text file is rewritten every time a viewer triggers a certain bot command. The result of this, is that the GDI+ Text source named UserWhoTriggered is never centered on my screen because the length of the string is always changing.

What I Want to Achieve
Immediately before I use OBSCommand to show this source, I want to use OBSCommand to center this GDI+ Text source named UserWhoTriggered on the screen, horizontally. I want to do this so no matter the length of the username that is stored as a string in the text file that the GDI+ Text source reads from, the text will always be centered horizontally on the screen.

The Issue
I am trying to use the /sendjson option with SetSceneItemProperties to set this GDI+ Text source to a certain x/y position, and it doesn't appear to be working. Here is what I am sending:

OBSCommand.exe /sendjson="SetSceneItemProperties={'scene-name':'Overlay','item':'UserWhoTriggered','position.x':'960','position.y':'740'}"

Question re: position.alignment
Also, can you explain this a bit more too re: position.alignment?

"The point on the source that the item is manipulated from. The sum of 1=Left or 2=Right, and 4=Top or 8=Bottom, or omit to center on that axis."

What int value would I use to manipulate from the point that is at both the vertical and horizontal center of the source?

HUUUUUGE THANKS!
Sorry to be so wordy, I wanted to give you more info rather than less! ^_^ Thank you again SO MUCH for this FANTASTIC tool! It really has added life to my stream! ^_^

Thanks in advance for your response! I appreciate you and your hard work on this project FSC!

-KardinalZyn
 

FSC

Member
Ignore all of this except the part where I thank you and think you are awesome for making OBSCommand, because I just learned about custom extents in OBS which solved my issue! ^_^

Thanks!

Awesome! You are welcome and thanks for sharing your findings =)
 

porpho

New Member
Fatastic tool, thank you very much for making it. When I saw that it allows to take a screenshot, I could not belive it. That feature is not available in the OBS UI and you provide it. Thank you!
 

FSC

Member
Fatastic tool, thank you very much for making it. When I saw that it allows to take a screenshot, I could not belive it. That feature is not available in the OBS UI and you provide it. Thank you!

Thank you for the feedback! Most of the credit belongs to obs-websocket, which provides that feature!
 

AdrienMenielle

New Member
Hi and thank you for making this extremely useful tool!

I have an issue though: when I try to modifiy the properties of a GDI+ text via /command=SetTextGDIPlusProperties or /sendjson, I get an error message : "not a text gdi plus source". Apparently it's a known bug on previous versions of obswebsocket : https://github.com/Palakis/obs-websocket/pull/448

Is OBScommand using the latest version of obswebsocket?

Thank you!
 

Shreg

New Member
Hey there,
first of all, thanks for your work. But I habe a question how to mute/unmute Desktop Audio 2. I tried different ways but could't figure it out.
Thank you
 

FSC

Member
Hey there,
first of all, thanks for your work. But I habe a question how to mute/unmute Desktop Audio 2. I tried different ways but could't figure it out.
Thank you

Hi, you're welcome!

That should work with:
OBSCommand.exe /mute="Desktop Audio 2"
OBSCommand.exe /unmute="Desktop Audio 2"
 

Shreg

New Member
So I renamed it now to have no spaces or dashed in its name and it is now working. thank you very much again!
 

Sikosis

New Member
Great tool ... just wondering if there is a parameter for querying the current status of OBS ... ie. is it streaming or not?
 

FSC

Member
Great tool ... just wondering if there is a parameter for querying the current status of OBS ... ie. is it streaming or not?
Thanks!
With the "command" feature, you can use most if not all of obs-websocket's "requests" to query all sorts of info (you can't use "events" with OBSCommand as this requires a client to be permanently connected). See https://github.com/Palakis/obs-websocket/blob/4.x-current/docs/generated/protocol.md#requests

For example, to check if OBS is streaming you can use the "GetStreamingStatus" request:
OBSCommand.exe /command=GetStreamingStatus

This will return a JSON string that looks something like this:
{
"message-id": "6tuxBUmcFTQp3oAW",
"preview-only": false,
"recording": false,
"recording-paused": false,
"status": "ok",
"streaming": false
}

Ok
 

probablypablito

New Member
Hey, amazing tool you've got. My question is: Is there a way to execute a new command before the previous one finishes? I'd like to switch filtes while a scene transitions, and currently I can't find a good way to do that. Thanks again for this awesome tool!
 

FSC

Member
Hey, amazing tool you've got. My question is: Is there a way to execute a new command before the previous one finishes? I'd like to switch filtes while a scene transitions, and currently I can't find a good way to do that. Thanks again for this awesome tool!

Please see this post on Page 6 of this discussion
 

PixelBeardQc

New Member
Good afternoon, I am having a glitch with the color correction filter if I do
/command=SetSourceFilterSettings,sourceName="DM BORDER 2",filterName="COLOR",filterSettings=color=#41b43b

it turns to black.

If I run this after /command=GetSourceFilterInfo,sourceName="DM BORDER 2",filterName=COLOR
I get
"enabled": true,
"message-id": "9KWfb98V5QQ4PbwG",
"name": "COLOR",
"settings": {
"brightness": 0.13,
"color": "#be3dff",
"contrast": 0.2,
"gamma": 0.6,
"hue_shift": 16.52,
"saturation": 0.54
},
"status": "ok",
"type": "color_filter"
}
Ok

I picked a random color and get "color": 4290345254, instead of #2679b9

If I try to run another value like

/command=SetSourceFilterSettings,sourceName="DM BORDER 2",filterName="COLOR",filterSettings=color=4290345254

I get

Error with command "SetSourceFilterSettings,sourceName=DM BORDER 2,filterName=COLOR,filterSettings=color=4290345254": Arithmetic operation resulted in an overflow.
Ok
 

PixelBeardQc

New Member
Good afternoon, I am having a glitch with the color correction filter if I do
/command=SetSourceFilterSettings,sourceName="DM BORDER 2",filterName="COLOR",filterSettings=color=#41b43b

it turns to black.

If I run this after /command=GetSourceFilterInfo,sourceName="DM BORDER 2",filterName=COLOR
I get
"enabled": true,
"message-id": "9KWfb98V5QQ4PbwG",
"name": "COLOR",
"settings": {
"brightness": 0.13,
"color": "#be3dff",
"contrast": 0.2,
"gamma": 0.6,
"hue_shift": 16.52,
"saturation": 0.54
},
"status": "ok",
"type": "color_filter"
}
Ok

I picked a random color and get "color": 4290345254, instead of #2679b9

If I try to run another value like

/command=SetSourceFilterSettings,sourceName="DM BORDER 2",filterName="COLOR",filterSettings=color=4290345254

I get

Error with command "SetSourceFilterSettings,sourceName=DM BORDER 2,filterName=COLOR,filterSettings=color=4290345254": Arithmetic operation resulted in an overflow.
Ok

I got color to change but I can't have TEN digit I am limited to 9 but the value manually entered into the filter have TEN so I can't replicate my color just randomly guess.

5
55
555
5555... up to 555555555 work but not 5555555555
 

FSC

Member
I got color to change but I can't have TEN digit I am limited to 9 but the value manually entered into the filter have TEN so I can't replicate my color just randomly guess.

5
55
555
5555... up to 555555555 work but not 5555555555

Thanks for reporting, this was indeed a problem in OBSCommand, and should be fixed in 1.5.4
 
Top