Starting obs from command line and closing obs

jorgeneo560

New Member
hi, i couldnt find any guide about the command lines but doing obs -h i get some idea, i want to record zoom clases while i am sleeping, i managed to auto-stop the recording via putting in the tools the timer to stop recording after 2 hours and 15 minutes, now, after obs stop recording it still open consuming pc resources (i am using an old pc, the new one is for gaming and mining), i has seen that command line are very limited, is theres a way to auto close the obs when the timer stop? or i just had to put a external timer telling ubuntu to kill it +1 minute to avoid file corruption or any other nasty thing
 

Juliac

New Member
There may be a way to do this from Lua, but I couldn't find it. You can use a shell script to terminate a program run in the background. Save this under a suitable name, obviously after adding any other parameters you need for obs & changing the delay, chmod the executable flag of the file on & then use it instead of the OBS command:
#!/bin/sh
#
# Start OBS, stash the process ID
obs >/dev/null 2>&1 &
task=$!
#
# Wait 30 seconds
sleep 30
#
# shutdown OBS
kill $task
 
Top