Resource icon

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

BoomSoMuch

New Member
That makes sense. Since filters are applied to sources globally there is no need to specify the scene. But I am still doing something wrong. I just made sure I am on 4.7 of websocket just in case that was the issue. This is how I have it set up in voice attack. Similar command works for showing/hiding sources, changing scenes, all the basic stuff. But I just can't get it to turn on/off filters.

1586892045787.png
 

FSC

Member
I don't see an obvious problem with the syntax.
I suggest checking the syntax in a command line interface to see any error messages before using it in a way where you can't see the output.
 

DrKinslayeR

New Member
Hi,

OBSCommand is a command line tool and does not have a program window, it depends on how you start it if you see a console or not.
Try choosing "minimized" or "hidden" if you have that options in the app you are using to start OBSCommand.

If that's not an option, there are workarounds like this:

1. Create a file in notepad, name it "OBScmdHidden.vbs" and place it next to OBSCommand.exe

2. Copy and paste this 8 lines of vbscript code (or use the attached file):

Code:
Dim WShell
Set WShell = CreateObject("WScript.Shell")
For Index = 0 To WScript.Arguments.Count - 1
    Arguments = Arguments & " " & WScript.Arguments(Index)
Next
Arguments = Replace(Arguments,"'","""")
WShell.Run "OBSCommand.exe " & Arguments, 0
Set WShell = Nothing


3. Now instead of directly using OBSCommand.exe you call OBSHidden.vbs like this:

wscript OBScmdHidden.vbs /scene=MyScene /startrecording /setvolume=Music,100,50


Note: If you have values that contain spaces, use apostrophes ( ' ) to encapsulate them like this:

wscript OBScmdHidden.vbs /scene='My Scene' /startrecording /setvolume='My Music',100,50

I tried this because when I used a command my game was minimizing. With your tips that's the same. How I can use your tool without at desktop returns? pls

I'm on Windows 10 last build.

Sorry for my english, I've tried to do my best! :D
 

FSC

Member
Thank you! I got the async working, but I couldn't figure out how to use the "slidesetting". Could you please add an example?
Code:
/slidesetting=mysource,myfiltername,settingname,startvalue,endvalue,[slidedelay],[slidestep]
                                  start/end value min/max depends on setting!
                                  delay is in milliseconds
                                  step depends on setting (can be x Or 0.x Or 0.0x)
             Note: Use * for start- or end value to slide from/to current value
/slideasync
            The same as slidesetting, only this one runs asynchron!
 

FSC

Member
I tried this because when I used a command my game was minimizing. With your tips that's the same. How I can use your tool without at desktop returns? pls

I'm on Windows 10 last build.

Sorry for my english, I've tried to do my best! :D

Whatever app you are using to start obscommand.exe should have a "hidden" or "start hidden" setting to avoid a window being opened and stealing focus from your game
 

Akkuma

New Member
I'm running into an issue where "/togglesource", "/showsource", "/hidesource" are all failing to do anything. I can get scene changes to work without a problem, but a scene item's visibility is never updating. When I run it from the command line I'm getting back Ok, which to me seems like a problem either not being passed up by OBSCommand or by obs-websocket.

I've tried "SceneName/SourceName" & "SourceName", neither are working for me.

Here is an example log from obs-websocket

Code:
10:28:05.708: [obs-websocket] new client connection from [::ffff:127.0.0.1]:56025
10:28:05.751: [obs-websocket] Request >> '{
10:28:05.751:   "request-type": "GetAuthRequired",
10:28:05.751:   "message-id": "0jsXKFPVLklV3f6Y"
10:28:05.751: }'
10:28:05.751: [obs-websocket] Response << '{
10:28:05.751:     "authRequired": false,
10:28:05.751:     "message-id": "0jsXKFPVLklV3f6Y",
10:28:05.751:     "status": "ok"
10:28:05.751: }'
10:28:05.792: [obs-websocket] Request >> '{
10:28:05.792:   "request-type": "SetSourceRender",
10:28:05.792:   "message-id": "OuDmJQCd1cQvgvUH",
10:28:05.792:   "source": "Basic Webcam Zoom",
10:28:05.792:   "render": false
10:28:05.792: }'
10:28:05.792: [obs-websocket] Response << '{
10:28:05.792:     "message-id": "OuDmJQCd1cQvgvUH",
10:28:05.792:     "status": "ok"
10:28:05.792: }'
10:28:05.795: [obs-websocket] client [::ffff:127.0.0.1]:56025 disconnected
 
Last edited:

Akkuma

New Member
I figured out the above issue is that scene items with the same name are not supported as there is no way to differentiate between them. The easiest solution is to probably make separate scenes and import those scenes if you need duplicate sources in a scene.
 

kutibotond

Member
Code:
/slidesetting=mysource,myfiltername,settingname,startvalue,endvalue,[slidedelay],[slidestep]
                                  start/end value min/max depends on setting!
                                  delay is in milliseconds
                                  step depends on setting (can be x Or 0.x Or 0.0x)
             Note: Use * for start- or end value to slide from/to current value
/slideasync
            The same as slidesetting, only this one runs asynchron!

OBSCommand.exe /slidesetting=Background,BW,Amount,0.00,1.00

I get an OK response, but nothing happens. What am I doing wrong? :(
 

FSC

Member
OBSCommand.exe /slidesetting=Background,BW,Amount,0.00,1.00

I get an OK response, but nothing happens. What am I doing wrong? :(

0.00 to 1.00 would just be 1 jump, you should add the slidedelay and slidestep option, however, I could not manage to get "Apply LUT" running either (the only one with "Amount" I fount in OBS filters)
I tested with Chroma key and Opacity again just to make sure it can work with other settings, and noticed you have to write the settingname as "opacity" with small "o" otherwise it did not work
Never ending story... oh my
 

kutibotond

Member
yeah, I was intending to use the Apply LUT to trigger fade to black and white

is it possible to make a fix to work with the Amount ?
 

FSC

Member
yeah, I was intending to use the Apply LUT to trigger fade to black and white

is it possible to make a fix to work with the Amount ?

I tried everything I could think of, but I could not make it work so far. Currently, it seems it's on obs-websocket's side. I will try again when I have some more time and motivation.

Also noticed fadeopacity from current value (-1) seems to not work now ? ...

Oops yes... this command should also have the new syntax of using "*" instead of "-1" but it's still checking only if it is numeric but "*" is not numeric so it does not work with that either... I have already fixed that, release is following asap
 

kutibotond

Member
I tried everything I could think of, but I could not make it work so far. Currently, it seems it's on obs-websocket's side. I will try again when I have some more time and motivation.



Oops yes... this command should also have the new syntax of using "*" instead of "-1" but it's still checking only if it is numeric but "*" is not numeric so it does not work with that either... I have already fixed that, release is following asap

Great! Much appreciated :)!
 

JDsplice

New Member
Is it possible to use wildcards for sources that all start with the same text to hide/unhide multiple sources? I have sources that all start with "CAM-" and I add to the list on a regular basis. It would be so much easier if I could just use /hidesource=myscene/CAM-* and any source starting with the CAM- text would be hidden. Thanks!
 

akouris

New Member
I know it is a lot to ask but on a future release, can you give the ability on a source, to change via its properties, the Video Connection input? For example, switch from HDMI in to SDI in?
 

FSC

Member
Is it possible to use wildcards for sources that all start with the same text to hide/unhide multiple sources? I have sources that all start with "CAM-" and I add to the list on a regular basis. It would be so much easier if I could just use /hidesource=myscene/CAM-* and any source starting with the CAM- text would be hidden. Thanks!

That would be a nice feature to integrate into obs-websocket plugin, would have no need to change OBSCommand to support that, you should ask there

I know it is a lot to ask but on a future release, can you give the ability on a source, to change via its properties, the Video Connection input? For example, switch from HDMI in to SDI in?

I can do that with:
OBSCommand.exe /command=SetSourceSettings,sourceName=YourSource,sourceSettings=video_device_id="YourDeviceID"

Get the sourceSettings (and the needed Device ID's) with this:
OBSCommand.exe /command=GetSourceSettings,sourceName=YourSource

I do not have 2 sources to test with, so I can't confirm if it actually really works
 

akouris

New Member
That would be a nice feature to integrate into obs-websocket plugin, would have no need to change OBSCommand to support that, you should ask there



I can do that with:
OBSCommand.exe /command=SetSourceSettings,sourceName=YourSource,sourceSettings=video_device_id="YourDeviceID"

Get the sourceSettings (and the needed Device ID's) with this:
OBSCommand.exe /command=GetSourceSettings,sourceName=YourSource

I do not have 2 sources to test with, so I can't confirm if it actually really works
ok great thank you I will try that
 

KardinalZyn

New Member
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
 
Top