obs-websocket - Remote-control OBS Studio using WebSockets

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

Palakis

Developer
According to Facebook's current documentation, the Stream URL and Key are valid for 7 days. Once you preview the video (start the stream in OBS and preview on their end), you have up to 5 hours to go live.

If you close the Facebook Live dialog and open a new one, your old stream key will still "work" in this time period, but you will not be able to preview it in their dialog, so you will not be able to actually go live (Facebook requires you to preview the stream and indicate that you're going live by clicking a button on their system before actually going live). I'm having trouble finding info on how Switchboard/Joicaster relate to this problem. Could you elaborate a bit on how you would set up OBS once for Facebook Live?

Another thing to mention is that the Facebook Live stream are created through the Facebook API. You only have to link your Facebook profile and select the pages Joicaster/Switchboard can access and it creates the live event automatically when you click on "Start Broadcast".
 

RytoEX

Forum Admin
Forum Moderator
Developer
Okay, so that explains Switchboard/Joicaster (their public documentation seemed very sparse). Thank you for that.

However, that works if you use Switchboard/Joicaster in your workflow. What if you were just using OBS itself with no RTMP relay or restreaming services? Can you use this plugin to update the stream key for Facebook Live (or any other service OBS supports)? I think that scenario (only OBS and this plugin) is more in line with @lorec's question, though they are free to correct me.
 

Palakis

Developer
What if you were just using OBS itself with no RTMP relay or restreaming services? Can you use this plugin to update the stream key for Facebook Live (or any other service OBS supports)? I think that scenario (only OBS and this plugin) is more in line with @lorec's question, though they are free to correct me.

I think it is what @lorec meant. Never thought of it, but this seems like a good idea to implement as a feature in coming releases.
 

lorec

New Member
I think it is what @lorec meant. Never thought of it, but this seems like a good idea to implement as a feature in coming releases.

Indeed. Because I want to create a frontend that lets users set up a Facebook stream, without having to deal with OBS or Facebook.
 

asq

New Member
does anybody have a plan to build macos version?
or already has a binary?

i'd like to avoid setting compiler if possible :)
 

asq

New Member
i decided to try it myself, but after 1.5h of fiddling get into this:
Code:
[ 79%] Automatic moc and uic for target obs-websocket
[ 79%] Built target obs-websocket_automoc
[ 79%] Automatic moc and uic for target mbedcrypto
[ 79%] Built target mbedcrypto_automoc
[ 97%] Built target mbedcrypto
[ 97%] Building CXX object plugins/obs-websocket/CMakeFiles/obs-websocket.dir/obs-websocket.cpp.o
In file included from ~/obs-studio/plugins/obs-websocket/obs-websocket.cpp:26:
~/obs-studio/plugins/obs-websocket/Config.h:23:10: fatal error: 'mbedtls/entropy.h' file not found
#include <mbedtls/entropy.h>
         ^
1 error generated.
make[2]: *** [plugins/obs-websocket/CMakeFiles/obs-websocket.dir/obs-websocket.cpp.o] Error 1
make[1]: *** [plugins/obs-websocket/CMakeFiles/obs-websocket.dir/all] Error 2
make: *** [all] Error 2

referenced header file is there, inside of deps/mbedtls, so i have no idea why it complains.
Code:
 find ../plugins/obs-websocket/ -name entropy.h
../plugins/obs-websocket//deps/mbedtls/include/mbedtls/entropy.h

command to build was:
Code:
mkdir build && cd build
echo "add_subdirectory(obs-websocket)" >> ../plugins/CMakeLists.txt
git clone --recursive https://github.com/Palakis/obs-websocket.git ../plugins/obs-websocket
cmake .. -DCMAKE_PREFIX_PATH=$(brew --prefix qt5) -DQt5WebSockets_DIR=$(brew --prefix qt5)/lib/cmake/Qt5WebSockets -DCMAKE_MODULE_PATH=$(brew --prefix qt5)/lib/cmake/ -DLIBOBS_INCLUDE_DIR=~/obs-studio/libobs -DLIBOBS_LIB=~/obs-studio/libobs  && make
 

Tim0n

New Member
Hello!

I just found this neat plugin and thinking of using it since it would be most helpful, I'm using node-javascript to control some features of OBS.
I looked through the API and found that you could turn visibility of sources on/off which is great! But I would also love it if you could rearrange sourcecs, for example "move 'name of source' up/down one step", I was wondering if this is possible to do in the plugin or if it's a feature that could be added?

Cheers
Simon
 

Palakis

Developer
Hello!

I just found this neat plugin and thinking of using it since it would be most helpful, I'm using node-javascript to control some features of OBS.
I looked through the API and found that you could turn visibility of sources on/off which is great! But I would also love it if you could rearrange sourcecs, for example "move 'name of source' up/down one step", I was wondering if this is possible to do in the plugin or if it's a feature that could be added?

Cheers
Simon

The source list changes notifications are planned, but not the client commands yet (but they will be).
 

Lombra

New Member
There any similar (ie more than the tablet UI linked previously) alternatives to the OBS Remote web interface yet or in the making by someone? Functionality wise it's ok, but it looks awful. "No offence". I started hacking it a while ago, but I'm no designer, nor am I very good at implementing the login stuff.

Btw, does this plugin support switching of profiles and scene collections?
 

Claire Matthews

New Member
Thank you for this. I have successfully set up obs-websocket, port forwarding, dynamic dns, and t2t2's obs tablet remote so that I can control my stream from anywhere. It was surprisingly easy to do!

Now my question is - I see reference to password protection, but how do I actually set that up?
 

ShalDDA

New Member
Hai, I'm new to this. I have a questions. I want to add some feautures to the websocket, for example: to set the streaming key in obs studio via the websocket. Can someone give me some guidelines. I know how to program in nodejs etc
 
> for example: to set the streaming key in obs studio via the websocket.

That would require support in OBS to accept changing the streaming key from an API call, and that would require the websocket api plugin to have a function to accept changing the stream key.

And considering that traffic is currently not encrypted between the websocket and the websocket-client, I wouldn't endorse it, even if it was capable.
 

Palakis

Developer
@Lombra not yet, but it is planned. The plugin's config is currently stored in the profile and this has to be changed if profile switching is eventually implemented.

@Claire Matthews In OBS, go to Tools -> Websocket server settings -> check "Enable authentication" and type the desired password in the Password textbox.
Regarding your use of obs-websocket, be warned : exposing the plugin's Websocket server on the public Internet is not recommended. Please, at least, set up some sort of VPN between your OBS computer and your remote device.

@ShalDDA Out of curiosity : why would you want to change the RTMP stream key from an API call?

@TickleMeOzmo Agreed.
 

Palakis

Developer
Palakis updated obs-websocket - Remote control of OBS Studio made easy with a new update entry:

obs-websocket 4.0.0

Good news everyone, obs-websocket 4.0.0 is out! This release is better and stronger than ever before, with many bug fixes, feature additions and protocol updates. Check out the release's page on GitHub for a comprehensive changelog and download links.

Minimum OBS Studio version required : 18.0.0

If you get an error message with obs_output_get_congestion in it, this means you'll have to update your OBS Studio...

Read the rest of this update entry...
 

HashBrownJM

New Member
You'll have to forgive me for my lack of expertise on this issue, but, if I'm not going to use it on my computer running OBS, how can I know what the OBS Host is if I want to use it on a tablet (using the OBS Remote app) or as a bookmark, running in the Chrome browser?

Thank you!
 

Rayj

Member
When I seen "OBS Remote" I though it meant that you could join a broadcast remotely? I guess not.

What I want to do is run a studio to do local news with a couple of local cameras. And also have a remote "man on the street" type access using his smart phone. Obviously he won't be on my LAN, but on his provider (AT&T, T-Mobil, whoever...network).

Any idea how I can have the "man on the street" join me in a broadcast I do from the studio?
 
Top