Question / Help Command line to stop stream/record

afmxer

New Member
Has there been any movement on getting in the command line controls to start/stop streams and recordings? Seems strange there's start commands via command line but no stop. I can automatically kill OBS which stops the streams, however, that also corrupts the recording and makes it unusable. And no hotkeys is not a great alternative cause it's not simple to automate sending hot keys to OBS either. Thanks for your time and any help/info!
 

Discostoff

Member
I dont know if i get u right, but there is a new tool where you can set a timer to stop the stream or recording.
Under tools output timer.
 

afmxer

New Member
I do not believe that's able to be set during the command line to start though, but I could be wrong.
 

Discostoff

Member
Yes it can only stop the stream.
I never used a command line.
I dont even know where to put a command line to start the stream.
Thats why i was not really sure if you havent found the output timer tool already.
 

Gol D. Ace

Member
Currently, available cmd arguments are (18.0.1):

--portable
--verbose
--unfiltered_log
--startstreaming
--startrecording
--startreplaybuffer
--collection
--profile
--scene
--minimize-to-tray
--studio-mode
 
Last edited:

malone76

New Member
I'm unsure that these are functioning in OBS Studio.

I have the most up to date studio and the following target line in shortcut does nothing:
Code:
"C:\Program Files (x86)\obs-studio\bin\32bit\obs32.exe" -profile "Gaming" -collection "Gaming"

I've tried using both -collection and -scenecollection

No matter which option I use though OBS Studio simply opens up the last used Profile/Collection.
 

tomcroll

New Member
I need to Start OBS and start streaming automatically every day at a specific time, depending on the day of the week. Then stop streaming again at a specific time, depending on the day of the week.

Running on Windows 10, OBS Version 28.1.2.

Currently, I use Windows Scheduler to run a "bat" script. Let's call it obs.bat
The script contains the following:
# Start OBS Studio for Mass.
cd \Program Files\obs-studio\bin\64bit
obs64.exe --collection "Collection01" --profile Profile02 --scene Scene2 --startstreaming --startrecording


This works perfectly

But I don't know how to stop the streaming and recording and then stop OBS.
I was hoping there is a --stopstreanming and a --stoprecording command line parameter. But it appears not.

OR.... Does anyone have a different solution I might use?
 

tomcroll

New Member
Following my previous post, I have been playing with ways to stop streaming at a given date and time automatically.

I found the following has worked.

But it is as crude as a 12lb sledgehammer!
Anybody got a better suggestion?

I set up a task ( stopOBS.bat) in Windows Scheduler to run at the desired date and time.

# Stop OBS Studio.
cd \Program Files\obs-studio\bin\64bit
taskkill /im obs64.exe /t /f
WARNING!!!!
This is not a suitable way to stop OBS if you are recording video because the video file gets corrupted.
 
Last edited:

ElMalditoBatman

New Member
There might be a better solution using obs websockets, instead of launch parameters, since it has support for both starting and stopping the stream.
 
Top