obs-websocket - Remote-control OBS Studio using WebSockets

obs-websocket - Remote-control OBS Studio using WebSockets 5.0.1

Aflynn1

New Member
I'm running the newest OBS (in fact downloaded fresh this morning just in case something was corrupted somewhere) and show the extension: View attachment 65254

I'm totally at a loss. Even spoke with the developer of the OBSwitcher app. He's investigating but likewise doesn't have a ready answer.

And please - please - don't wish 24/7 on me!!! 2021 has to be better, right?
[/Q
 

Aflynn1

New Member
I wanted to post SUCCESS! Hopefully.

I had been considering the idea that OBS wasn't finding the plug in - maybe installed somewhere obscure - but hadn't succeeded in finding the .dll. I found it, and oddly, it had its own program folder, apart from OBS. I copied the files and dropped them into the subfolder for OBS plugins. VOILA - it appears to be working. True test will be when I'm on site and on the same network to see if my mobile devices will connect. Fingers cross.

Sometimes I wonder if I had just been born 30 years later...LOL But in the early 80s, Basic and Pascal seemed soooo boring. ;-)
 

bcoyle

Member
I'm running the newest OBS (in fact downloaded fresh this morning just in case something was corrupted somewhere) and show the extension: View attachment 65254

I'm totally at a loss. Even spoke with the developer of the OBSwitcher app. He's investigating but likewise doesn't have a ready answer.

And please - please - don't wish 24/7 on me!!! 2021 has to be better, right?
Maybe in the wrong place. If you don't see a bunch of other plugins, then wrong place. It should be c:\program_Files\obs_studio\obs_Studio_Plugins\64bit
1609442497993.png


Should have lots of plugins like this

1609442584447.png


Why not 24/7 - It does require lots of material.
 

authorleon

New Member
Hello. I am using the latest version of obs with LioranBoard.

When I close down OBS and LioranBoard is active. OBS crashes:

000000F5A87FE770 00007FF979A7A39D 000002E200000000 00007FF900000000 00007FF97A997CF8 000002E28B7CE970 qt5core.dll!0x7ff979a7a39d

But if I close LioranBoard first and then close down OBS. It closes perfectly.

Please help.

Thanks
 

Fraggle69

New Member
Hi I wonder if someone could assist. I have websockets running on OBS, it's a linux install and I can recall presets using the companion platform. However, the commands available in the companion instance are limited and I do have the option to use HTTP POST, GET etc. I was hoping someone could post a string example, to recall a scene maybe? I should be able to work out the rest from there. Ideally, I am looking for the command that will allow me to switch scene collections by name. I can see it's supported in websockets API, I am just at a loss as to what the string format should be. If anyone can assist, that would be epic. I've put in a request to companion to add this feature, so I am sure it'll come in time, in the meantime I remain puzzled. :) TIA
 

bcoyle

Member
Hi I wonder if someone could assist. I have websockets running on OBS, it's a linux install and I can recall presets using the companion platform. However, the commands available in the companion instance are limited and I do have the option to use HTTP POST, GET etc. I was hoping someone could post a string example, to recall a scene maybe? I should be able to work out the rest from there. Ideally, I am looking for the command that will allow me to switch scene collections by name. I can see it's supported in websockets API, I am just at a loss as to what the string format should be. If anyone can assist, that would be epic. I've put in a request to companion to add this feature, so I am sure it'll come in time, in the meantime I remain puzzled. :) TIA
Hi.Attached is two jpegs. One is the view of what I send for a scene change with a formatted view showing what I send and the other is the real string I send. Th message-id in this example is set to 3025 which is what I use to decode any answer coming back. You can put anything in message id to help you decode the answer. I'm using visual basic here so this is where the windows come from. Hope this helps
1611077056735.png

1611076980526.png
 

bcoyle

Member
Please be aware, the command is CASE SENSITIVE. I have a function that puts it all together. Example:

last_Serialized_request = OBS_Support.Simple_Request_Using_Param_Pairs(Req, Message_id, Param_1_name, value) 'serialize it - obs format for a simple request.

Req is "SetCurrentScene", message_id = "3025" or whatever you want and param_1 = "scene-name" and value = "VIEW_BLACK"

This is a function I coded, so will not find it by googling. Also have a version that does 2 and 3 pairs of parameters. You have to code this yourself. I put them into a class and then use a JSON serializer to convert the class into a json message.
 

Fraggle69

New Member
Please be aware, the command is CASE SENSITIVE. I have a function that puts it all together. Example:

last_Serialized_request = OBS_Support.Simple_Request_Using_Param_Pairs(Req, Message_id, Param_1_name, value) 'serialize it - obs format for a simple request.

Req is "SetCurrentScene", message_id = "3025" or whatever you want and param_1 = "scene-name" and value = "VIEW_BLACK"

This is a function I coded, so will not find it by googling. Also have a version that does 2 and 3 pairs of parameters. You have to code this yourself. I put them into a class and then use a JSON serializer to convert the class into a json message.

That makes sense, I've got two fields to fill out in companion software. One is URL which I thought would just be the IP address and port, the second is json body. It makes sense to me that the code {"request-type":"SetCurrentScene","message-id":"3025","scene-name":"violin"} fits within the json body. Clearly I am way off.
 

bcoyle

Member
Hope that helped you. I struggled a lot at first figuring some of these things out. Took a little bit to get the authentication right also. You set up the websocket, get the connection. Do authenticate if needed. then you can send your message. Obs will return the same message with status field set or error or not. When you change the source for a scene, you get a boatload of messages back. There are some command line apps in this forum. You might try them ?????? Have never used linux so can't help you much there.
 

Technologywell

New Member
I love using this plugin for running my black magic ATEM in tandem with OBS!

I wanted to report an issue (not sure if its just happening to me) but if I have companion open before opening OBS, none of my commands work after loading OBS downloading gta 5 game and I never get an alert saying that the websocket is connected. I have to manually close and re-open companion before it will recognize that OBS is open.

Anyone know if there's a good workaround?

This has been adressed and will be released in obs-websocket 4.8 (the next release)
 

tinodo

New Member
I am using the "Dynamic Delay" plugin (source). Operations on that plugin are triggered only through Hotkeys. Can we send these hotkeys through websockets? (I see TriggerHotkeyByName is listed as "Unreleased"). Or is there another way to execute such an action through websockets?
 

demzou

New Member
I am using the "Dynamic Delay" plugin (source). Operations on that plugin are triggered only through Hotkeys. Can we send these hotkeys through websockets? (I see TriggerHotkeyByName is listed as "Unreleased"). Or is there another way to execute such an action through websockets?

I have the exact same question. Using Hotkeys with the Move Transition plugin and I would need to trigger via WebSocket instead. Does anyone know if there's a workaround? Many thanks!
 

itscrash

New Member
Hi. Was checking my logs today and noticed this. Not sure why. I've never connected to FFZ



CONSOLE: %cFFZ [%csocket%c]:%c (source: https://cdn.frankerfacez.com/static/avalon.eff7a87081290a7c4bf8.js:2)
15:53:56.432: obs-browser[3]: CONSOLE: WebSocket connection to 'wss://pog.frankerfacez.com/' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT (source: https://cdn.frankerfacez.com/static/avalon.eff7a87081290a7c4bf8.js:2)
15:53:56.432: obs-browser[3]: CONSOLE: %cFFZ [%csocket%c]:%c (source: https://cdn.frankerfacez.com/static/avalon.eff7a87081290a7c4bf8.js:2)
15:54:08.433: obs-browser[3]: CONSOLE: %cFFZ [%csocket%c]:%c (source: https://cdn.frankerfacez.com/static/avalon.eff7a87081290a7c4bf8.js:2)
15:54:08.899: obs-browser[3]: CONSOLE: WebSocket connection to 'wss://tuturu.frankerfacez.com/' failed: Error during WebSocket handshake: Unexpected response code: 503 (source: https://cdn.frankerfacez.com/static/avalon.eff7a87081290a7c4bf8.js:2)
15:54:08.899: obs-browser[3]: CONSOLE: %cFFZ [%csocket%c]:%c (source: https://cdn.frankerfacez.com/static/avalon.eff7a87081290a7c4bf8.js:2)
15:54:21.900: obs-browser[3]: CONSOLE: %cFFZ [%csocket%c]:%c (source: https://cdn.frankerfacez.com/static/avalon.eff7a87081290a7c4bf8.js:2)
15:54:24.498: obs-browser[3]: CONSOLE: %cFFZ [%csocket%c]:%c (source: https://cdn.frankerfacez.com/static/avalon.eff7a87081290a7c4bf8.js:2)
15:54:26.425: obs-browser[3]: CONSOLE: %cFFZ [%csocket%c]:%c (source: https://cdn.frankerfacez.com/static/avalon.eff7a87081290a7c4bf8.js:2)
15:54:26.425: obs-browser[3]: CONSOLE: %cFFZ [%csocket%c]:%c (source: https://cdn.frankerfacez.com/static/avalon.eff7a87081290a7c4bf8.js:2)
15:54:26.425: obs-browser[3]: CONSOLE: %cFFZ [%csocket%c]:%c (source: https://cdn.frankerfacez.com/static/avalon.eff7a87081290a7c4bf8.js:2)
15:54:26.425: obs-browser[3]: CONSOLE: %cFFZ [%csocket%c]:%c (source: https://cdn.frankerfacez.com/static/avalon.eff7a87081290a7c4bf8.js:2)
 

iSvein

Member
Hello. I am using the latest version of obs with LioranBoard.

When I close down OBS and LioranBoard is active. OBS crashes:

000000F5A87FE770 00007FF979A7A39D 000002E200000000 00007FF900000000 00007FF97A997CF8 000002E28B7CE970 qt5core.dll!0x7ff979a7a39d

But if I close LioranBoard first and then close down OBS. It closes perfectly.

Please help.

Thanks
Check if it still happens with the latest websocket update, 4.9.
Looks like this has been fixed now.
 

coRpSE

Member
Okay, I just updated this script using the obs-websocket-4.9.0-Windows-Installer.exe, I am running the latest version of OBS, but I have noticed when I go into OBS->Tools->WebSockets Server Settings, that I am unable to change the password. There is something there by default, 8 characters, but I don't know what it is. When I type something new in there and click "OK", it doesn't save. Any idea's?
 

iSvein

Member
Okay, I just updated this script using the obs-websocket-4.9.0-Windows-Installer.exe, I am running the latest version of OBS, but I have noticed when I go into OBS->Tools->WebSockets Server Settings, that I am unable to change the password. There is something there by default, 8 characters, but I don't know what it is. When I type something new in there and click "OK", it doesn't save. Any idea's?
You need to click on the box above the password box to enable password to be able to set your own password :)
By default password is disabled.
 

coRpSE

Member
You need to click on the box above the password box to enable password to be able to set your own password :)
By default password is disabled.

I know that, :P
You can't even target the password text box without that checkbox checked. ;)
What I am saying that it does not save. Below is a link to an animated GIF that shows that there is something in there, but when I type in there to change it to something that I actually know, it will not save, it just defaults to the 8 characters.

https://www.headshotdomain.net/modules/Image_Repository/files/10002/pM2PW0xH4D.gif

I have tried using shorter passwords, larger passwords like I did in that animation, I tried alphanumerical, just numbers, just letters, caps and no caps, and a mix of caps and alphanumerical, and nothing worked. It just won't let me change the password. As for the password that is in there, I do not know what it is because I did not enter a password when I installed this.
 
Top