Jump to content

StreamLabs OBS NamedPipe Toggle Recording


JRSmile
 Share

Recommended Posts

Hi,

just for reference.

you can control the streamlabs OBS client via Named Pipes like so:

 

Local $sMessage = '{"jsonrpc": "2.0","id": 1,"method": "toggleRecording","params": {"resource": "StreamingService","args": []}}'
                        $handle = FileOpen("\\.\pipe\slobs", 2)
                        FileWriteLine($handle, $sMessage)
                        FileClose($handle)

 

the api can be found here: https://stream-labs.github.io/streamlabs-obs-api-docs/docs/index.html

$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")
For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)
Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI"
Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;
MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)
Link to comment
Share on other sites

On 7/22/2018 at 6:32 AM, JRSmile said:

you can control the streamlabs OBS client via Named Pipes like so:

API reference
Streamlabs-OBS allows remote management of the application via an RPC-based API. The API is split into several different services. You can access services' methods and properties by sending JSON-RPC messages to the named pipe slobs.

Individual JSON-RPC requests should be separated by a single newline character LF ( ASCII code 10). You should ensure that your JSON message does not contain any newline characters. Use \n as replacement for new lines in JSON.

so "FileWriteLine($handle, $sMessage)" would send the #13#10 , ..... is that OK ?

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

Always wondered how Named Pipes work internally, but now I know; it involves a secret cabal of

53 minutes ago, argumentum said:

named pipe slobs

:D

Link to comment
Share on other sites

On 25.7.2018 at 4:27 PM, argumentum said:

so "FileWriteLine($handle, $sMessage)" would send the #13#10 , ..... is that OK ?

 

as long as you keep the json request a one liner i had no problems.

$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")
For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)
Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI"
Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;
MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...