Command-line Exit

BoatBodger

New Member
I too would find this helpful. Brute force methods cause a dialog next time you start up OBS, and that is not user friendly, and a pain to code around in the managing script. For me, the best way to achieve this would be to add an 'exit' command to the OSC plugin. I already use that to gracefully shut down the virtual camera. What we want to to is simulate the pressing of the 'exit' button on the UI

For now, I'm using the node robot.js library to send the key Alt-F4 to the process window. Right now, I am trying to figure out how to do that on a MAC - right now, can't find a keystroke to achieve the same effect - 'Command Q' looks as if it is supposed to do it, but doesn't
 

BoatBodger

New Member
Furthermore, on MACOS, I've found that sending the TERM signal (e.g. pkill -15 OBS) certainly kills OBS, but even though 'Terminate' signal is meant to request a graceful shutdown, I still get the "OBS did not shut down properly during your last session" dialog box appearing. Just what you don't want in an automation situation.
I see there is a command line option on startup which may disable this check - I'll give that a try
 

AaronD

Active Member
Furthermore, on MACOS, I've found that sending the TERM signal (e.g. pkill -15 OBS) certainly kills OBS, but even though 'Terminate' signal is meant to request a graceful shutdown, I still get the "OBS did not shut down properly during your last session" dialog box appearing. Just what you don't want in an automation situation.
I see there is a command line option on startup which may disable this check - I'll give that a try
Same on Linux. There's no signal that I've found, that produces a clean shutdown with everything saved, just like the Exit button in the Controls dock. *That*, I think I would call a bug.

So I do this in my management script for a hybrid local and online meeting:
Bash:
obs --verbose --unfiltered_log --disable-updater --disable-shutdown-check --multi --studio-mode --profile "$OBS_PROFILE" --collection "$OBS_PROFILE" --startvirtualcam > /dev/null &
PID_MASTER=$!
sleep 10

obs --verbose --unfiltered_log --disable-updater --disable-shutdown-check --multi --studio-mode --profile "Meeting_Slave" --collection "Meeting_Slave" > /dev/null &
PID_SLAVE=$!
sleep 10

...

kill -TERM "$PID_SLAVE"
sleep 5

kill -TERM "$PID_MASTER"
sleep 5
 

BoatBodger

New Member
Same on Linux. There's no signal that I've found, that produces a clean shutdown with everything saved, just like the Exit button in the Controls dock. *That*, I think I would call a bug.

So I do this in my management script for a hybrid local and online meeting:
Bash:
obs --verbose --unfiltered_log --disable-updater --disable-shutdown-check --multi --studio-mode --profile "$OBS_PROFILE" --collection "$OBS_PROFILE" --startvirtualcam > /dev/null &
PID_MASTER=$!
sleep 10

obs --verbose --unfiltered_log --disable-updater --disable-shutdown-check --multi --studio-mode --profile "Meeting_Slave" --collection "Meeting_Slave" > /dev/null &
PID_SLAVE=$!
sleep 10

...

kill -TERM "$PID_SLAVE"
sleep 5

kill -TERM "$PID_MASTER"
sleep 5
Hi Aaron, Thanks for that. I'm successfully using pkill -15 OBS to kill it, and open -a OBS --disable-startup-check to start it and for me that's good enough - but as you may see from my most recent post, I'm now getting all tangled up with getting the --startvirtualcam to work properly!
Chris (aka BoatBodger)
 
Top