To close my daily recordings cleany after 3 hours, I have just decided to do this :
In "
OBS > Output Timer", I have put : 3 hours
In "
Task Scheduler", I have put :
Program : powershell.exe
Args : -Command "Start-Process 'C:\Program Files\obs-studio\bin\64bit\obs64.exe' --startrecording --minimize-to-tray; Start-Sleep -Minutes 185; (Get-Process obs64).CloseMainWindow()"
------------------------------
Here's what it will do :
1 - Launch a recording by running the command :
powershell -Command "Start-Process 'C:\Program Files\obs-studio\bin\64bit\obs64.exe' --startrecording --minimize-to-tray; Start-Sleep -Minutes 185; (Get-Process obs64).CloseMainWindow()"
2 - Stop recording after 3 hours (180 minutes)
3 - Close the window cleanly 5 minutes later
4 (optional) - You can, if you want, add a task kill in the "Parameters" tab of Task Scheduler to kill the task if for some reason OBS is still running, but it shouldn't be necessary.
------------------------------
But it would be soooo much better if there were a command line switch to close OBS after a specified amount of time. It shouldn't be hard to do ?