obs-websocket - Remote-control OBS Studio using WebSockets

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

DF3EI

New Member
Hi, I am using this great plugin to control OBS for use in an Amateur Television repeater. I have started to write a client library in C# for that purpose. It is not complete, but I am getting there. What I haven't figured out is the "geometry" object that is being passed around in some calls. I only ever see the resulting Base64 serialised string, but what does the object look like that is being serialised? Thanks for any hints...
 

bcoyle

Member
Hi, I am using this great plugin to control OBS for use in an Amateur Television repeater. I have started to write a client library in C# for that purpose. It is not complete, but I am getting there. What I haven't figured out is the "geometry" object that is being passed around in some calls. I only ever see the resulting Base64 serialised string, but what does the object look like that is being serialised? Thanks for any hints...
What is a Amateur Television Repeater ? Is it just re transmitting some yourtube live event?
 

m3kili3

New Member
Plugin does not show up in tools on UBUNTU. It is installed and I can find the file location but it doesn't show up on OBS at all. You should learn how to program, this is garbage.
 

ognjent

New Member
Hi, is it possible to remotely trigger recording from 1pc or mobile device multiple instances of OBS running on multiple PCs?
 

bcoyle

Member
Hi, is it possible to remotely trigger recording from 1pc or mobile device multiple instances of OBS running on multiple PCs?
I know that there is a command line tool, so maybe using it and a list of ip addresses in a script would do??? One script to turn them all on, and one to turn off. Don't know much about that, so you will have to do your own research. Maybe someone else on this stream knows the answer
 

manouchk

New Member
Today, I tried the app Outfield avalaible in F-droid (not os well known) depository of android app. It is a remote controle that works like a charm with obs-websocket. I do recommend it. I just tested starting and stopping but it seems to be able to switch between different scenes too.

For who may not know F-droid: In order to install outfield. Install first f-droid and then from f-droid, you can install outfield.
 

UWSCIA

New Member
@Palakis, I'm unable to use password with my project...

Code:
secret_string = pwd . salt
secret_hash = SHA256(secret_string)
secret = Base64(secret_hash)

auth_responce_string = secret . challenge
auth_hash = SHA256(auth_responce_string)
auth_responce = Base64(auth_hash)

this.Send("{""request-type"":""Authenticate"",""auth"":""" . auth_response . """,""message-id"":""123""}")

Can't figure out where the issue is.
 

bcoyle

Member
@Palakis, I'm unable to use password with my project...

Code:
secret_string = pwd . salt
secret_hash = SHA256(secret_string)
secret = Base64(secret_hash)

auth_responce_string = secret . challenge
auth_hash = SHA256(auth_responce_string)
auth_responce = Base64(auth_hash)

this.Send("{""request-type"":""Authenticate"",""auth"":""" . auth_response . """,""message-id"":""123""}")

Can't figure out where the issue is.
I'd like to know also
 

UWSCIA

New Member
OMG, finally got it working...

Code:
secret_string := this.pwd . Data["salt"]
secret := Crypt.Hash.String("SHA256", secret_string,, "base64")
auth_response_string := secret . Data["challenge"]
auth_response := Crypt.Hash.String("SHA256", auth_response_string,, "base64")
 

bcoyle

Member
OMG, finally got it working...

Code:
secret_string := this.pwd . Data["salt"]
secret := Crypt.Hash.String("SHA256", secret_string,, "base64")
auth_response_string := secret . Data["challenge"]
auth_response := Crypt.Hash.String("SHA256", auth_response_string,, "base64")
could you show the complete code so that I could copy it. including library imports etc. Thank you so much.
 

bcoyle

Member
Here is my visual basic code for the same thing. Tried, tested and found good.


' ====================================================================================================

'Imports System.Security.Cryptography <- visual basic import statement

Public Function SHA256_base64(ByVal Content As String) As String
Dim MoleCul3 As New Security.Cryptography.SHA256CryptoServiceProvider
Dim ByteString() As Byte = System.Text.Encoding.ASCII.GetBytes(Content)
ByteString = MoleCul3.ComputeHash(Bytestring)
Dim finalstring As String
finalstring = Convert.ToBase64String(Bytestring)
Return finalstring
End Function



' Create the obs authenticate string
Public Function create_OBS_password_auth_challenge(password As String, Salt As String, challenge As String) As String
Dim secret_string As String
Dim auth_response_string As String
Dim secret As String
secret_string = password & Salt
secret = SHA256_base64(secret_string) 'generate base 64 string - hashed
auth_response_string = SHA256_base64(secret & challenge)
Return auth_response_string
End Function

I appreciate all the work that everyone does, so am glad to payback. You can convert the code to C# if you want.
 

bcoyle

Member
Here is my visual basic code for the same thing. Tried, tested and found good.


' ====================================================================================================

'Imports System.Security.Cryptography <- visual basic import statement

Public Function SHA256_base64(ByVal Content As String) As String
Dim MoleCul3 As New Security.Cryptography.SHA256CryptoServiceProvider
Dim ByteString() As Byte = System.Text.Encoding.ASCII.GetBytes(Content)
ByteString = MoleCul3.ComputeHash(Bytestring)
Dim finalstring As String
finalstring = Convert.ToBase64String(Bytestring)
Return finalstring
End Function



' Create the obs authenticate string
Public Function create_OBS_password_auth_challenge(password As String, Salt As String, challenge As String) As String
Dim secret_string As String
Dim auth_response_string As String
Dim secret As String
secret_string = password & Salt
secret = SHA256_base64(secret_string) 'generate base 64 string - hashed
auth_response_string = SHA256_base64(secret & challenge)
Return auth_response_string
End Function

I appreciate all the work that everyone does, so am glad to payback. You can convert the code to C# if you want.

you need Imports System.Text als
 

UWSCIA

New Member
the "library" was the "KEY" issue, so showing my unique use case would be of no help...

You just need to use a library that can handle "HASH SHA256" and the "Base64"... My issue was my library was outdated.
 

bcoyle

Member
Yeah, I had to go to several places to get the libs and base64. Just thought it helpful to mention my solution.
 

Aflynn1

New Member
Can anyone help? I'm a reasonably intelligent NON coder. I mean, I don't honestly understand half of what is above in this thread, but I generally am better at using tech than most of my co-workers. That said, I desperately need the websocket plugin to work. and it won't. I've downloaded it, followed the directions and used the installer. It SAYS it's installed, but there's no option under Tools at all. I've closed and re-opened OBS. I've restarted the computer. I've re-installed the plug-in multiple times. I'm completely stumped...please, suggestions, advice, step by step instructions? You're welcome to assume I know virtually nothing. We use OBS to do daily broadcasts and the plugin is to facilitate remote switching, which is going to save my sanity...assuming I can make it work!
 

bcoyle

Member
Can anyone help? I'm a reasonably intelligent NON coder. I mean, I don't honestly understand half of what is above in this thread, but I generally am better at using tech than most of my co-workers. That said, I desperately need the websocket plugin to work. and it won't. I've downloaded it, followed the directions and used the installer. It SAYS it's installed, but there's no option under Tools at all. I've closed and re-opened OBS. I've restarted the computer. I've re-installed the plug-in multiple times. I'm completely stumped...please, suggestions, advice, step by step instructions? You're welcome to assume I know virtually nothing. We use OBS to do daily broadcasts and the plugin is to facilitate remote switching, which is going to save my sanity...assuming I can make it work!
Well, not a expert. Web socket requires the latest version of obs, so if working with an older copy may be the problem. Putting it in the correct place. Also don't know if 32 or 64 bit matters.

1609359393216.png

1609359588381.png

1609359644312.png
 

bcoyle

Member
Also you might want to come over to

Which is a forum on 24/7 broadcast streaming
 

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:
1609376401248.png


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?
 
Top