obs-websocket - Remote-control OBS Studio using WebSockets

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

tt2468

New Member
I've got the password bug too. After upgrading from v. 4.8.0 to 4.9.0 I've lost all Companion /Streamdeck control over OBS. I was not asked to set a password on first use, and I'm not asked for a password on any subsequent loading. I only see password errors in the log.
Going back to v4.8.0 doesn't work now either.
Need help please!
Thank you
Does re-entering your password not work? 4.9.0 should not change existing password data.
 

tt2468

New Member
Hello guys!

I was wondering: is there an easy way of exposing your OBS/websocket instance to the internet, without having to fiddle with port forwarding your network and so on? Maybe a python script or something that could easily relay it to someone else so they could use a solution like OBS Remote (http://t2t2.github.io/obs-tablet-remote/) to control my scenes and sources? Or maybe dock a web service that could work as some kind of relay to the internet...

It would be great to be able to just create a portable version of a custom OBS with this solution and send to someone else, so it would just work on any local network configuration.

Thanks!
I made https://github.com/IRLToolkit/obsws-rproxy-client a while ago which would serve this purpose. It works as expected, but I don't have any binaries available. You would have to build the application yourself.
 

Bavuso

New Member
Hi.
I'm trying to make a connection to OBS STUDIO with ESP32.
Has anyone done this?
Can someone help me?
I have basic knowledge of C ++ and ESP

My idea is to use OBS-WEBSOCKET to create a wireless physical STREAM DECK.
 

Attachments

  • stream deck.jpeg
    stream deck.jpeg
    99.9 KB · Views: 234

Barabba

Member
Hi.
I'm trying to make a connection to OBS STUDIO with ESP32.
Has anyone done this?
Can someone help me?
I have basic knowledge of C ++ and ESP

My idea is to use OBS-WEBSOCKET to create a wireless physical STREAM DECK.
Hi, the idea is realy powerful, but it has the disadvantage to realize hardware the consolle, it will take lot of time, I hardly believe someone else after you will realize it. Instead I suggest you to thin about 2 alternative ways:
1) Use a ready consolle, like for DJs, they generally use HID Microsoft compatible joystick interface, you may use an ESP32 to bridge the HID commands to websocket. In thei sway you save time realizing it and you give easier chance to others to take advance of it and eventually help you developing the project.
2) Use instead a tablet to create this layout in touchpad. Sounds easier too, if you can manage the graphical interface.. and no need for hardware
 

KAMIGENO

New Member
Yeah, so, like, after I downloaded and installed this... my OBS stopped being able to connect to Twitch.

It would connect and be green for like 5 seconds... and then afterwards... 0 Kpbs.

I've tried deleting everything related to this thing... but seems like it ain't working.
EDIT: I have quite a few log files from messing about and testing trying to stream. I just ran another test now and will attach the file log of that one, but feel free to ask me to see the others if needed. (Line 377 is where the streaming starts.)

What can I do to fix this?
 
Last edited:

KAMIGENO

New Member
Please ignore and delete this.

I called my ISP and did troubleshooting on my end and it didn't work, so I boiled it all down to obs-websocket being the issue.
However, I re-did all the troubleshooting and that seemed to fix my issue.

Thanks~
 

bcoyle

Member
Versions : running latest 26 version obs, running 4.9.0 web socket.
Context: I'm writing a 24/7 automated TV app. About 90% done. Working on of course the last 10% which normally takes 90% of the time. So my app when switching from one scene to another, wants to start a video at some inpoint <> 0. I've tried the media controls and they seem to work as advertised, BUT they seem to only work when the scene is visible. If I I use the scrub or timestamp command when the scene is not visible, they don't work. What I'm trying to do is switch into the scene at the in point. If I use the commands as soon as soon as the scene is visible and then use the timestamp.scrub commands, I always see the first frames before the command gets going. If I do them before the scene is visible, they don't work. My current work around is to turn on an overlay with a black jpeg in it to cover up the first few frames, do the command and then wait a certain amount of time (maybe 1 second) and then turn the black jpeg off. I am worried about the delay (1 second) not being enough on a slow computer. I always try to use handshaking, like looking at the media status instead of fixed delays.

Questions:
1. So, am I correct about the media controls not working unless the video is running?
2. If so, in the future will I be about to adjust the in point - offset of a video before switching into it? I know this might not be the web socket problem, but the way obs works.
3. Is there some other way of doing this.
4. Off Hand, is there any messages coming back that the media controls are currently at the correct timestamp (handshaking possibility). I know you get back a response, saying your command is ok, ie status= ok, but is there a "got there" and currently playing where you told be to go message. I can investigate myself, but just thought I'd ask.

Thank you in advance for any clarification or suggestions.
 
Last edited:

OpenSUSEuser88

New Member
Hello everyone, i need to control obs from an external control device like kramer sl-240c and/or via a Symetrix RadiusNX, the question is how many simultaneus connections can be with websocket?

 

bcoyle

Member
Good morning,
i can't figure out what is the method to find all audio sources (such as OBS audio mixer) to control the volume and mute or mute, can anyone help me?

I looked here and tried many methods, but nothing https://github.com/Palakis/obs-websocket/blob/4.9.0/docs/generated/protocol.md
The easiest way is that you already know the names of your sources. The following command will control a source. In this example the source name is "BLACK_BLACK", you are using decibels setting to -3 .

{"request-type":"SetVolume","message-id":"67","source":"BLACK_BLACK","volume":-3.0,"useDecibel":true}
-------------------------------------------------------------------------------------
from the manual

SetVolume
  • Added in v4.0.0
Set the volume of the specified source. Default request format uses mul, NOT SLIDER PERCENTAGE.

Request Fields:

Name
Type​
Description
source
String
Source name.
volume
double
Desired volume. Must be between 0.0 and 20.0 for mul, and under 26.0 for dB. OBS will interpret dB values under -100.0 as Inf. Note: The OBS volume sliders only reach a maximum of 1.0mul/0.0dB, however OBS actually supports larger values.
useDecibel
boolean (optional)
Interperet volume data as decibels instead of amplitude/mul.

------------------------------------------------------------------------------------------------

IF YOU WANT A LIST OF SOURCES, use this command

GetSourcesList
  • Added in v4.3.0
List all sources available in the running OBS instance

Request Fields:

No specified parameters.

Response Items:

Name
Type​
Description
sources
Array<Object>
Array of sources
sources.*.name
String
Unique source name
sources.*.typeId
String
Non-unique source internal type (a.k.a kind)
sources.*.type
String
Source type. Value is one of the following: "input", "filter", "transition", "scene" or "unknown"

It's quite a bit of work to decode this

Hope that helps, Bill
 

rssfra97

New Member
The easiest way is that you already know the names of your sources. The following command will control a source. In this example the source name is "BLACK_BLACK", you are using decibels setting to -3 .

{"request-type":"SetVolume","message-id":"67","source":"BLACK_BLACK","volume":-3.0,"useDecibel":true}
-------------------------------------------------------------------------------------
from the manual

SetVolume
  • Added in v4.0.0
Set the volume of the specified source. Default request format uses mul, NOT SLIDER PERCENTAGE.

Request Fields:

Name
Type​
Description
source
String
Source name.
volume
double
Desired volume. Must be between 0.0 and 20.0 for mul, and under 26.0 for dB. OBS will interpret dB values under -100.0 as Inf. Note: The OBS volume sliders only reach a maximum of 1.0mul/0.0dB, however OBS actually supports larger values.
useDecibel
boolean (optional)
Interperet volume data as decibels instead of amplitude/mul.

------------------------------------------------------------------------------------------------

IF YOU WANT A LIST OF SOURCES, use this command

GetSourcesList
  • Added in v4.3.0
List all sources available in the running OBS instance

Request Fields:

No specified parameters.

Response Items:

Name
Type​
Description
sources
Array<Object>
Array of sources
sources.*.name
String
Unique source name
sources.*.typeId
String
Non-unique source internal type (a.k.a kind)
sources.*.type
String
Source type. Value is one of the following: "input", "filter", "transition", "scene" or "unknown"

It's quite a bit of work to decode this

Hope that helps, Bill
thanks, I have to take a general line because I am creating a Web app for managing different streaming events and to control them remotely!
 

ShaunPond

New Member
Hi, recently I've stated getting lockups in OBS when using websocket (via BArRaider's StreamDeck plugin) to change profile in OBS. There are two scenarios that I can determine: 1) when the scene change is triggered, nothing happens - i.e., the scene is unchanged. 2) If I establish a new link from the streamdeck plugin to OBS with OBS I see things like this:
09:43:50.972: [obs-websocket] Update << '{"profile":"Hutton","update-type":"ProfileChanged"}'
09:43:50.972: [obs-websocket] Websocket connection with client '[::ffff:127.0.0.1]:51833' closed (disconnected). Code is 1001, reason is: 'Server stopping'
09:43:50.972: [obs-websocket] IO thread exited.

and OBS hangs - I get an hourblass mousepointer and cannot interact with OBS at all. I appreciate that there are three things in play here: OBS itself, websocket and the streamdeck plugin. The other two players have scratched their heads and basically said "we don't think it's our fault". I'm happy to do whatever testing is necessary to try to determine where the problem lies, as i appreciate that this may be an edge case that I'm hitting... Please help me OBSwan, you're my only hope...
 
Top