obsproject / obs-websocket Goto Github PK
View Code? Open in Web Editor NEWRemote-control of OBS Studio through WebSocket
License: GNU General Public License v2.0
Remote-control of OBS Studio through WebSocket
License: GNU General Public License v2.0
Hi, my Issue is, for some reason source bounds (cx & cy) are 0
, I'm using obs-websocket-js
and I can't work out if this issue is from here or there
my request is for more events/functions, for example, I want to be able to change a sources position and dimensions when, for example, I use jQueryUI draggable()
and resize()
to change them on my webUI
The WebUI so far, this is for a friend to be able to control his OBS when he's at conventions, etc...
I also posted this over at obs-websocket-js
Can someone turn this beautiful tool into plug-in for mac
Desired:
Nice to have:
Currently, there can only be one OBS window open at a time if I want to use this project. I would love for there to be a feature allowing me to change the listen port for each window, and if possible, set it in the main OBS settings so it remains set for the specific profile.
this distro is equipped with Qt 5.2.1 and is still supported until April 2019.
obs-studio provides build instructions PPA repository and packages for trusty with ffmpeg-next enabled.
obs-websocket compile breaks on:
/home/travis/build/asquelt/obs-websocket/WSEvents.cpp:81:3: error: no matching function for call to ‘QTimer::singleShot(int, WSEvents::WSEvents(WSServer*)::__lambda0)’
});
^
/home/travis/build/asquelt/obs-websocket/WSEvents.cpp:81:3: note: candidates are:
In file included from /usr/include/qt5/QtCore/QTimer:1:0,
from /home/travis/build/asquelt/obs-websocket/WSEvents.cpp:21:
/usr/include/qt5/QtCore/qtimer.h:81:17: note: static void QTimer::singleShot(int, const QObject*, const char*)
static void singleShot(int msec, const QObject *receiver, const char *member);
^
/usr/include/qt5/QtCore/qtimer.h:81:17: note: candidate expects 3 arguments, 2 provided
/usr/include/qt5/QtCore/qtimer.h:82:17: note: static void QTimer::singleShot(int, Qt::TimerType, const QObject*, const char*)
static void singleShot(int msec, Qt::TimerType timerType, const QObject *receiver, const char *member);
^
/usr/include/qt5/QtCore/qtimer.h:82:17: note: candidate expects 4 arguments, 2 provided
whole build log: https://travis-ci.org/asquelt/obs-websocket/jobs/219241067
Show a prompt when an unknown client attempts a connection to the server. Users will then have to choose what to do :
hello !
I suggest adding the profile to the websocket because sometimes it is necessary to change the.
We've been using the websocket as a remote tool to change scenes and get information on current status. This is installed using the zip file.
We coded a custom web application to access the websocket, following the API documentations using the node API library.
The remote control web-app stays connected for hours at a time, and we've had it crash [consistently] after refreshing.
Crash dump:
Unhandled exception: c0000005
Date/Time: 2016-12-12, 00:04:11
Fault address: 545001F3 (c:\program files (x86)\obs-studio\bin\64bit\qt5core.dll)
libobs version: 0.16.6
Windows version: 6.3 build 9600 (revision: 17415; 64-bit)
CPU: Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
Thread 31E4 (Crashed)
Stack EIP Arg0 Arg1 Arg2 Arg3 Address
000000373FDCB810 00000000545001F3 00000037528F0870 000000000000000C 000000000000000C 0000000000000000 qt5core.dll!0x545001f3
000000373FDCB900 00007FFF72DC1274 00000037528F0870 000000373FE9EE40 0000000000000000 000000375277A490 qt5websockets.dll!0x7fff72dc1274
000000373FDCB940 0000000054505907 000000373FEB52E0 000000373FEBAD40 00000037528F0870 0000003752895130 qt5core.dll!0x54505907
000000373FDCBAF0 00000000548A7CA0 000000373FE9EE10 000000373FDCBC20 0000003752895130 00000000542A2C6E qt5widgets.dll!0x548a7ca0
000000373FDCBB20 00000000548A6BFA 000000373FDCFB40 000000373FE9EE10 0000003752895130 00000037528F0800 qt5widgets.dll!0x548a6bfa
000000373FDCC260 00000000544E23C9 00007FFF935545FA 0000000000000000 0000003752895130 000000373FDCC368 qt5core.dll!0x544e23c9
000000373FDCC2E0 00000000544E4161 000000373FE9EE40 0000000000000000 000000373FEBF3D0 000000373FDCC390 qt5core.dll!0x544e4161
000000373FDCC390 00007FFF78916F7F 0000003700000024 0000000000000000 0000000000000401 000000373FDCC598 qwindows.dll!0x7fff78916f7f
000000373FDCC3C0 0000000054527B25 0000000000000401 000000373FDCC598 000000373FDCC5C8 00000000000306C4 qt5core.dll!0x54527b25
000000373FDCC4D0 00007FFF935524FD 000000374044B690 000000373FDCC660 00000000000306C4 000002400350CFE6 user32.dll!0x7fff935524fd
000000373FDCC5A0 00007FFF93552357 00000000060003FF 0000000006000301 0000000000000000 0000000000000000 user32.dll!0x7fff93552357
000000373FDCC620 0000000054527299 0000000000000000 0000003700000024 0000000000000000 000000373FDCFB40 qt5core.dll!0x54527299
000000373FDCF9B0 00007FFF78916F59 000000373FEB52E0 0000003700000014 000000373FDCFA88 000000373FE9EE10 qwindows.dll!0x7fff78916f59
000000373FDCF9E0 00000000544DEDA1 000000373FEBB960 0000003700000000 000000373FE9EE10 00007FF7C1C043F0 qt5core.dll!0x544deda1
000000373FDCFA60 00000000544E1237 000000373FEAAE40 00007FF7C1C043F0 000000373FDCFD30 000000373FEA2F20 qt5core.dll!0x544e1237
000000373FDCFAD0 00007FF7C1AF6833 0000000000000000 0000000000000001 0000003700000000 0000000000000000 obs64.exe!run_program+0x1a3
000000373FDCFC30 00007FF7C1AF862E 0000000000000001 0000000000000000 000000373FDCFC68 000000373FEA9DE0 obs64.exe!main+0x35e
000000373FDCFDB0 00007FF7C1BE2195 000000373FE92938 0000000000000000 0000000000000001 0000000000000000 obs64.exe!WinMain+0x155
000000373FDCFE40 00007FF7C1BE1BA5 00007FF7C1BE1A48 00007FF7C13CF000 0000000000000000 0000000000000000 obs64.exe!__tmainCRTStartup+0x149
000000373FDCFE80 00007FFF913D13D2 00007FFF913D13B0 0000000000000000 0000000000000000 0000000000000000 kernel32.dll!0x7fff913d13d2
000000373FDCFEB0 00007FFF938A54E4 0000000000000000 0000000000000000 0000000000000000 0000000000000000 ntdll.dll!0x7fff938a54e4
Appveyor for Windows builds and Travis for Linux + eventually OS X.
Can you have the events return recording timecodes on each event?
EX: {"recTimecode": "00:05:47"}
or better Ex:
{
"scene-name": "Game",
"update-type": "SwitchScenes",
"rec-Timecode": "00:05:47",
"stream-Timecode": "00:05:37"
}
{
"scene-name": "Intro",
"update-type": "SwitchScenes",
"rec-Timecode": "00:08:53",
"stream-Timecode": "00:06:37"
}
I'm hopping to use this to whole thing to dynamically create an EDL file so we can Quickly edit the recordings instantly after recording has completed.
Maybe in the future OBS can introduce Chapter Markers too, then we can use our web socket connection to add events to the feed, making it easy to do quick edits based on time-coding events within a recording...
Thank you for the consideration
Steps to reproduce :
GetSceneList
methodI'm using ubuntu 16.04 with OBS 0.16.2 and plugin version 0.3.1. I've installed via deb.
When I go to run OBS I get this:
error: os_dlopen(/usr//lib/obs-plugins/obs-websocket.so->/usr//lib/obs-plugins/obs-websocket.so): libobs-frontend-api.so.0: cannot open shared object file: No such file or directory
warning: Module '/usr//lib/obs-plugins/obs-websocket.so' not found
I've listed the directory in question and the file obs-websocket.so
is there.
hello .
I installed obs-studio 17.0.2 and obs-websocket 0.3.2 with client connection for a few times to change the source show off will occur crash
Sometimes, video lags when a message is being processed.
OBS must be both streaming and recording to emit StreamStatus, the cause being this check
https://github.com/Palakis/obs-websocket/blob/master/WSEvents.cpp#L175
StreamStatus probably should be emit regardless of whether the user is actually streaming or not, with a bunch of Zero default values for all the numeric values.
do you have any plans to release it as a plugin (in binary form)?
obs-websocket needs a way to protect OBS from unauthorized control.
The bitrate calculation code of the StreamStatus
event is poorly implemented.
Hey there! First off, I wanted to thank you for obs-websocket
--this is awesome software and I love integrating with it.
Second, a feature request--maybe it's not possible because of the way that OBS works, but I'm wondering about the feasibility of preview scene notifications in Studio Mode. I use HTML5/Canvas overlays (a shared BrowserSource per "scene category"; cameras can switch in a single scene category without replacing the overlay) and it would be super useful from a CPU conservation standpoint to be able to disable rendering on inactive scenes. But, obviously, we want to render them in preview, too.
My C++ is rusty to the point of comedy but I'd be happy to help out if I can.
Add event types SourceOrderChanged
and RepopulateSources
Scene items have been rearranged.
An item has been added to the current scene.
An item has been removed from the current scene.
OBS (32 and 64bit) crashes whenever I send a second message.
Steps to reproduce the crash:
ws://localhost:4444
){"message-id":"1","request-type":"GetSceneList"}
RECEIVED: { "current-scene": "Scene 1", "message-id": "2", "scenes": [ { "name": "Scene 1", "sources": [ { "cx": 1920.0, "cy": 1080.0, "name": "Image", "render": true, "type": "image_source", "volume": 1.0, "x": 0.0, "y": 0.0 } ] }, { "name": "Scene 2", "sources": [ { "cx": 1920.0, "cy": 1080.0, "name": "Image 1", "render": true, "type": "image_source", "volume": 1.0, "x": 0.0, "y": 0.0 } ] } ], "status": "ok" }
Problemsignatur:
Problemereignisname: APPCRASH
Anwendungsname: obs64.exe
Anwendungsversion: 0.0.0.0
Anwendungszeitstempel: 5831e36c
Fehlermodulname: StackHash_571a
Fehlermodulversion: 6.3.9600.18438
Fehlermodulzeitstempel: 57ae642e
Ausnahmecode: c0000374
Ausnahmeoffset: PCH_03_FROM_ntdll+0x0000000000090C6A
Betriebsystemversion: 6.3.9600.2.0.0.144.8
Gebietsschema-ID: 1031
Zusatzinformation 1: 571a
Zusatzinformation 2: 571a82f8f669fe6504f96cd83e647d6c
Zusatzinformation 3: fbfe
Zusatzinformation 4: fbfe6d11217e4e4d97ba18df8e2619c0
When I click debug VisualStudio tries to open the following file: obs2\deps\w32-pthreads\pthread_mutex_trylock.c
Hi Palakis,
Apologies, as I could not figure out any other way to communicate with you.
I am excited to consume your next version with the fixes and features I am aware of to date.
Asking for release dates is contentious so I would be content with an estimate of days, weeks or months :)
I don't know if it is the fault of the obs-websocket itself or the obs-websocket-js I'm using but I can't seem to get a working HTTPS connection (I need it because github.io pages are all HTTPS).
I tried to change the request from 'ws' to 'wss' but there is no respond.
Request fields :
Response : OK if specified item exists, error otherwise.
Request fields :
Response : OK if specified item exists, error otherwise.
Additionally, JSON objects describing scene items will also give the item's original size.
Suggestion for more "Transition Aware" Events...
getTransitionDuration( callback[ err, data ] )
Returns the current Transition name and duration in Milliseconds
setTransitionDuration( int milliseconds )
Sets the duration of the current transition in milliseconds
onTransitionDurationChange( )
Returns the current transition name and duration in milliseconds if it is changed. should include if the websocket client itself made the change, not just other clients or manually via the OBS UI
onSceneTransitionStart
Fires when...
onSceneTransitionEnd
Fires when the transition has finished and we have successfully switched scenes
onSceneTransitionStopped
This example requires more detail. You have 3 scenes. A, B, and C.
I setup the solution and I can compile the project without errors. However I when try to add the DLLs in obs's plugin directory and try to run obs I get a number of errors like:
The procedure entry point ?toUtf8@QString@@QEGBA?AVQByteArray@@XZ could not be located in the dynamic link library C:\Program Files (x86)\obs-studio\obs-plugins\64bit\obs-websocket.dll
The procedure entry point ?toLatin1@QString@@QEGBA?AVQByteArray@@XZ could not be located in the dynamic link library C:\Program Files (x86)\obs-studio\obs-plugins\64bit\QT5Network.dll
I'm using Qt5.8 and building using VS2015 on Windows 10. Not sure what I'm doing wrong, but I assume that I am not building obs-websocket.dll properly even though I seem to compile without issue.
Right now I can build the plugin on Windows and Linux. However, I need access to an OS X system to build and test an OS X version.
Was randomly adding and removing scenes when suddenly removing scenes ended up in a crash, so far been able to constantly reproduce by opening test case, refreshing the page and then removing a scene in obs
test case, logs and stack trace: https://www.dropbox.com/sh/uc0vhjm76ozoy43/AAAHv4vSrz9WI0Is2E8EmhMBa?dl=0
socket traffic:
obs:recieve Object { update-type: "ScenesChanged" } test.html:28:4
obs:sending Object { request-type: "GetSceneList", message-id: String } test.html:36:5
obs:recieve Object { current-scene: "Scene 3", message-id: "1", scenes: Array[6], status: "ok" } test.html:28:4
obs:recieve Object { scene-name: "Scene 3", update-type: "SwitchScenes" } test.html:28:4
obs:recieve Object { update-type: "ScenesChanged" } test.html:28:4
obs:sending Object { request-type: "GetSceneList", message-id: String } test.html:36:5
obs:recieve Object { current-scene: "Scene 2", message-id: "2", scenes: Array[5], status: "ok" } test.html:28:4
Add a command named SetVolume
to set the volume of a specific source.
Request fields :
Response : OK if source exists, error otherwise. No additional fields.
When calling HandleSetCurrentScene, OnSceneChange is emit before the scene change finishes?
Based on the logs, it looks like the SceneChange emit is before the SetCurrentScene sends its OK response. Not familiar with the whole process of releasing obs_sources/scenes - but it might be related to that and may just be an issue with the obs api.
Example:
setCurrentScene('scene 2')
sceneChange => 'scene 1'
(setCurrentScene response)
setCurrentScene('scene 1')
sceneChange => 'scene 2'
(setCurrentScene response)
setCurrentScene('scene 1')
sceneChange => 'scene 1'
(setCurrentScene response)
On another note, I've had some crashes that might be related to this commit, but my new machine's build environment is all screwed up. I'll see if I can reconfigure and actually build the updates locally.
Again, I'll see if I can update my machine and test with your changes since the last build.
Ok I'm very excited at how this project is coming along.
Did some initial tests on the rec-timecode and I couldn't have asked for more. Then I started testing if the clients could pass on information to each other as they already had a connection to each other and may need to exchange info.
Oh no. Every message that isn't directed at the server is interpreted as bad json and a message to that effect is shared. Now my future webpage/app could account for this and just ignore the messages, but that's a lot of useless chatter. Can we add an option to ignore other chatter?
Then I thought more about it and realized that maybe I'd want the websocket server to not be hosted by OBS itself and maybe just be another client on an existing websocket server. Then I realized I might want to have multiple obs websocket clients check in on that server and be individually commendable! So we have to name each OBS websocket instance and have them respond to that individual name or an "all" name.
This rabbit whole is getting big.
Hopefully this all makes sense, I just woke from a hot sweat dreaming about the possibilitys.
Thank you for your brilliant tool and time.
As of now, PROTOCOL.md is written by hand.
The idea would be to have protocol definitions in a machine-readable format somewhere in the repo (a separate file or inline comments in the source code) that will serve as a base for an automatically generated PROTOCOL.md and/or an eventual test suite.
congratulations for the project, I would like to know if it is possible to get through the API target of the recordings folder. I would not set them only for reading
Thank you
When connecting to obs-websocket with client.obsremote.com, the plugin crashes.
#OBS Studio 17.0.2
Let me take another shot at this, I confused the issue as I had my main function on the brain and this is just about getstreamingstatus, not startstopstreaming.
When the stream is offline and I call getstreamingstatus I get what is expected, a nice json response with "streaming" set to false.
When the stream is online and I call getstreamingstatus I get:
{'preview-only': False, 'update-type': 'StreamStarting'}
Most times OBS crashes (log attached) but I'll share the top here...
Thread 2934 (Crashed)
Stack EIP Arg0 Arg1 Arg2 Arg3 Address
0115C1A8 71A86B2E 0115C454 0E01EAB4 00000000 0115D4F0 msvcr120.dll!0x71a86b2e
0115C43C 71AF4AAF 0115C4B0 00000FFF 0E01EAB4 00000000 msvcr120.dll!0x71af4aaf
0115C47C 71AF4A29 0115C4B0 00000FFF 0E01EAB4 0115D4F0 msvcr120.dll!0x71af4a29
0115C498 00EB2E36 0000012C 0E01EAB4 0115D4F0 0115FC0C obs32.exe!do_log+0x36
0115D4BC 029E7008 0000012C 0E01EAB4 0115D4F0 0115D548 obs.dll!blogva+0x18
0115D4D4 029E6FE2 0000012C 0E01EAB4 00313A3A 14AA4550 obs.dll!blog+0x12
0115D4E8 0E014F25 00000001 25AD4FC8 141C25B8 0115D578 obs-websocket.dll!0xe014f25
0115D550 6650EBDB 00000000 00000000 00000000 00000000 qt5core.dll!0x6650ebdb
I have problems with running obs-websocket in OBS Studio FTL
After plugin installation OBS does not starting. In Event log I see that record:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2017-04-01T09:04:08.659185700Z" />
<EventRecordID>153858</EventRecordID>
<Channel>Application</Channel>
<Computer>DevStudio</Computer>
<Security />
</System>
<EventData>
<Data>obs64.exe</Data>
<Data>0.0.0.0</Data>
<Data>58d29914</Data>
<Data>ucrtbase.dll</Data>
<Data>10.0.14393.0</Data>
<Data>578997b5</Data>
<Data>c0000409</Data>
<Data>000000000006ea1e</Data>
<Data>52b0</Data>
<Data>01d2aac6eb07e641</Data>
<Data>C:\Program Files (x86)\OBS Studio - FTL\bin\64bit\obs64.exe</Data>
<Data>C:\WINDOWS\System32\ucrtbase.dll</Data>
<Data>9935b9b7-80c0-45f6-a1d2-b0d34d92212f</Data>
<Data />
<Data />
</EventData>
</Event>
Hi, I am using obs-ftl found here: https://github.com/WatchBeam/obs-studio-ftl/releases
I am trying to install obs-websocket plugin on this version, but cannot seem to figure out why it isn't working. I am getting the following error when I am trying to start obs after a successful install.
The error seems similar to the one mentioned in this issue: #22
I have no experience in compiling anything, I have only tried the windows-installer. I hope anyone can help me out, or have any ideas. Or maybe point me in the right direction on how to compile the obs-ftl version with obs-websocket.
Regards,
Hamatzu
Gfy: https://gfycat.com/UniqueCoordinatedBrant
On every scene change the event is { "scene-name": "", "update-type": "SwitchScenes" }
Originally mentioned in obs-websocket-community-projects/obs-websocket-js#6
Desired Scene Name: Änd
16:29:59.123: Source 'Scene 2' renamed to 'Änd'
16:30:25.151: obs-data.c: [obs_data_create_from_json] Failed reading json string (1): unable to decode byte 0xc4 near '"'
16:30:25.151: [obs-websockets] invalid JSON payload for '{"scene-name":"Änd","message-id":"11","request-type":"SetCurrentScene"}'
Sending 'getCurrentScene' or similar functions returns the correct scene name, but sending a request to setCurrentScene fails
https://github.com/Palakis/obs-websocket/blob/master/WSRequestHandler.cpp#L64-L77
A Qt dialog with the following settings :
At first: Many thanks for the project!
Unfortunately, I can't get it to work on Debian Jessie. I installed the newest version of OBS, then installed obs-websocket with the commands provided in your readme.md but the socket is not listed in the tools of OBS.
Is there a more detailed installation guide or has someone an idea / guess of what could be wrong?
Many thanks!
An event to notify clients when sources are renamed or the visibility has been changed.
"SceneItemChanged"
An item has been changed in the current scene.
Whatever transition name is given as parameter, SetCurrentTransition
always responds with an error ; "requested transition does not exist".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.