Question / Help Automatic Stream Schedule

Jean de Florette

New Member
Hi,

I'd like to make a script but don't know how.

I'd like to make it start and end the stream at specific time each day.
Like starts at 3pm ends at 10pm.

Also the script should autostart with windows.

Can someone help ?

Thanks
 
Nevermind I did it myself with AHK.

Code:
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
#Persistent
SetTitleMatchMode, 2 ; match start of the title

SetTimer, checkTime, 30000
SetTimer, checkIfStillRunning, 10000
StartTime := 1847
StopTime := 1848
streaming := 0
obsPath := "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\OBS Studio\OBS Studio (64bit)"

RunOBS(obsPath) {
    Run %obsPath%,, Min
    Sleep, 2000
    WinMinimize OBS
    Sleep, 500
    ControlSend,,{F9},ahk_class Qt5QWindowIcon ; Go to right scene
    Sleep, 500
    ControlSend,,{F10},ahk_class Qt5QWindowIcon  ;starts the stream
    WinMinimize OBS
}
CheckIfOBSIsRunning(obsPath) {
    Process, Exist, obs64.exe
    if !ErrorLevel {
        RunOBS(obsPath)
    } else {
        Process, Close, obs64.exe
        Sleep, 1000
        RunOBS(obsPath)
    }
}
checkTime:
time := A_Hour . A_Min
If (time = StartTime && !streaming) {
    streaming := 1
    CheckIfOBSIsRunning(obsPath)
    TrayTip STREAMING, Streaming lance jusque minuit
}
If (time = StopTime && streaming) {
    streaming := 0
    ControlSend,,{F12},ahk_class Qt5QWindowIcon  ;stop the stream
    TrayTip STREAMING, Arret du stream
    Sleep, 2000
    Process, Close, obs64.exe
}
return
checkIfStillRunning:
If (streaming) {
    Sleep, 100
    Process, Exist, obs64.exe
    if !ErrorLevel {
        RunOBS(obsPath)
    }
}
return
 
Hi, is there a way to schedule OBS to start recording my browser, for example after x hours and x minutes..

I want auto start recording when 9:00

and

auto stop recording when 12:00

I search the forum, not find this tool/plugin for OBS-Studio
How can I do that?

Thank you!!!!
 
Hi,

I'd like to make a script but don't know how.

I'd like to make it start and end the stream at specific time each day.
Like starts at 3pm ends at 10pm.

Also the script should autostart with windows.

Can someone help ?

Thanks

Hi Jean.
I saw your script, I need it too !!!

Does it work with windows?
Do I have to insert it in the OBS scripts?

Thank's for your job.
 
Back
Top