Resource icon

Free Command line tool for obs-websocket plugin (Windows) 1.6.3

PoWeR-Ding

New Member
for OBS below version 28
for OBSCommand_v1.5.7

OBSCommand.exe /command=SetCurrentSceneCollection,sc-name="123"

Why is this command always errr
 

FSC

Member
View attachment 97041
View attachment 97043

OBSCommand.exe /command=SetStreamSettings,settings=server='srt://pushtx.surgerycast.com:9000?streamid=#!::h=pushtx.surgerycast.com%2Cr=onelive/11009599-BtBuqqFfn'


Can be passed in normally in cmd.exe
However, after being passed in, OBS cannot connect to the server using this str address.

server:srt://pushtx.surgerycast.com:9000?streamid=#!::h=pushtx.surgerycast.com%2Cr=onelive/11009599-BtBuqqFfn
key:r=onelive/11009599-BtBuqqFfn
you can try to use /sendjson, command should look something like this (sorry can't test it):
/sendjson="SetStreamSettings={'settings': {'server': 'srt://pushtx.surgerycast.com:9000?streamid=#!::h=pushtx.surgerycast.com,r=onelive/11009599-BtBuqqFfn'}}"
 

Overlookedfile

New Member
I feel like a complete idiot, and I'm not sure whether to comment here or on VoiceMacro, but the gist is this:

I'm attempting to get OBS studio, via OBScommand, to save the replay buffer when VoiceMacro recognizes a specific voice command. VM appears to be doing its job, as I have a tone associated with it when it fires and I reliably hear that when the command is spoken, but nothing seems to happen in OBS Studio. Am I supposed to connect OBSc and the OBS web socket in some manner and, if so, how? What am I doing wrong? OBSc is "installed" on my desktop, if that makes any difference.

OBS version 29.1.3 (x64) on Windows 11
OBScommand version 1.6.3 (run as admin)
VoiceMacro version 1.4 (run as admin)

Screenshots attached
 

Attachments

  • VoiceMacro - FDRS voice command.png
    VoiceMacro - FDRS voice command.png
    125.7 KB · Views: 22
  • VoiceMacro - FDRS Profile.png
    VoiceMacro - FDRS Profile.png
    44.8 KB · Views: 23

FSC

Member
I feel like a complete idiot, and I'm not sure whether to comment here or on VoiceMacro, but the gist is this:

I'm attempting to get OBS studio, via OBScommand, to save the replay buffer when VoiceMacro recognizes a specific voice command. VM appears to be doing its job, as I have a tone associated with it when it fires and I reliably hear that when the command is spoken, but nothing seems to happen in OBS Studio. Am I supposed to connect OBSc and the OBS web socket in some manner and, if so, how? What am I doing wrong? OBSc is "installed" on my desktop, if that makes any difference.

OBS version 29.1.3 (x64) on Windows 11
OBScommand version 1.6.3 (run as admin)
VoiceMacro version 1.4 (run as admin)

Screenshots attached
Make sure you have enabled OBS Websocket server in OBS WebSocket Server settings
1699817230410.png

Also, you don't need to use "OBSCommand" as an argument for OBSCommand.exe in VoiceMacro OpenFile action, this is not necessary and will just be ignored by OBSCommand, all the YT videos seem to copy from each other and have this wrong. If all is working you can set Window Style to "Hidden" so you won't see a popup of the command line Window.
 

Overlookedfile

New Member
So, apparently the difference is in whether the video is recording or not? Within OBS I can press the "Save Replay" button while the buffer is running and it will save just that video even if the overal recording is not turned on. It appears that OBSc/VM will only save the replay buffer if the overall recording is also on. It's not the worst thing ever to have that be the case, but given the amount of video my use-case already requires, it'd be fantastic if just the buffer could be saved instead of a whole video.

Any help or direction you could offer would be most appreciated. Oh, and thank you very, very much for both applications, whether you're able to help with that snag or not.
 

FSC

Member
You're welcome, I'm glad my apps are useful for you. Sorry I can't help a lot with OBS itself, I'm not a streamer and don't have that much experience with it. All the available commands from OBS Websocket are here if there is no command for what you can do on the OBS UI, you might have to address this to OBS/OBS Websocket devs. OBS Websocket dev's github is here.
 

tim.calderwood

New Member
We are using OBSCommand.exe to start and stop recordings of our test automation scripts. We are running into an issue of not knowing if the OBSCommand request fails or not. We tried using the returned error code, however, it seems to always return 0. Here is our batch script. If the command fails, IE OBS is not running or web service is disabled, we should get Error Found, but we dont. Is there a workaround for this?

rem Stop the Video Recording
echo off
cd C:\\Program Files\\obs-studio\\bin\\64bit
OBSCommand.exe /stoprecording
if errorlevel 0 goto stop_recording
else goto error_found

:stop_recording
ECHO Stop Recording
ECHO OBS was recording, trying to stop recording. Returned error code of: %ERRORLEVEL%
goto :eof

:error_found
ECHO Error Found
ECHO An error was found w/ error code of: %ERRORLEVEL%
goto :eof
 

tim.calderwood

New Member
We are using OBSCommand.exe to start and stop recordings of our test automation scripts. We are running into an issue of not knowing if the OBSCommand request fails or not. We tried using the returned error code, however, it seems to always return 0. Here is our batch script. If the command fails, IE OBS is not running or web service is disabled, we should get Error Found, but we dont. Is there a workaround for this?
After serveral hours of fun, here is what I have got to work

To stop a recording
cd C:\\Program Files\\obs-studio\\bin\\64bit || exit 0
OBSCommand.exe /stoprecording | findstr "Ok 501" || exit 1
echo OBSCommand.exe /stoprecording will return
echo * Ok - Stopped recording
echo * 501 - Not recording, nothing to stop
echo * Everything else is an error
To start a recording
del /Q /F %userprofile%\\Videos\\*.mkv || exit 0
cd C:\\Program Files\\obs-studio\\bin\\64bit || exit 0
OBSCommand.exe /startrecording | findstr "Ok 500" || exit 1
echo OBSCommand.exe /startrecording will return
echo * Ok - Started recording
echo * 500 - Already recording, nothing to start
echo * Everything else is an error
For a Jenkins pipeline
stage('Start Recording using OBS software') {
steps {
script {
try {
bat '''
del /Q /F %userprofile%\\Videos\\*.mkv || exit 0
cd C:\\Program Files\\obs-studio\\bin\\64bit || exit 0
OBSCommand.exe /startrecording | findstr "Ok 500" || exit 1
echo OBSCommand.exe /startrecording will return
echo * Ok - Started recording
echo * 500 - Already recording, nothing to start
echo * Everything else is an error
'''
} catch (err) {
echo "Error detected, sending an email then we will continue."
emailext body: "OBS Error for ${env.JOB_NAME} build ${env.BUILD_NUMBER}<br> More info at: ${env.BUILD_URL}",
subject: "OBS Error: ${env.JOB_NAME}",
mimeType: 'text/html', to: '$DEFAULT_RECIPIENTS'
}
}
}
}
 

hlynge

New Member
Is this still working ?
I am having a really hard time just sending a command to e.g. start a recording:
1711172054931.png


OBSCommand.exe /server=127.0.0.1:4455 /password="" /startrecording
 
Top