Question / Help OBS + Task Schedule~ scheduled stream

Howdyboy

New Member
Context: I have a stream that I do at midnight EST, that people in other timezones are unable to watch for obvious reasons.
My solution is simple, record the stream and play it at a more appropriate time for Europeans the subsequent day. The problem with that I'm not at home during the day to start the stream, much less the recorded video.

I know that I can use Window's Task Scheduler to start OBS and get it streaming automatically, but that's pretty much the extent of my knowledge. I don't know how I would go about doing it. The same with starting MPC-HC at the specified time, and playing the video. (Though I suppose I should as that at their forum.

Any help at all would be much appreciated.
Also sorry if this is the wrong forum subsection to be asking in. I looked at the other ones, and this one seemed the most appropriate.
 

0v3rnuLl

New Member
HI, maybe is too late but, i use some task scheduler and cmd trick to do regular streaming(only streaming not recording).
First the cmd lines to start the obs

content of start.bat

REM Posticion of the obs executable.
cd "C:\Program Files\obs-studio\bin\64bit\"
REM start de obs with your profile
start obs64.exe -profile "Perfil1" --startstreaming
REM set te time to sleep (in seconds )to finish the stream and kill the process. In this case every 6 hours because i whant a cut on youtube stream.
TIMEOUT 21600
REM kill the process
taskkill /f /t /im obs64.exe

Content of task on the scheduler, modify the time data to start it and save it as xml.

<Author>COMPUTERNAME/USERNAME</Author> your user name
<Interval>PT6H</Interval> time interval , in this case every 6hrs
<StartBoundary>2018-09-04T16:00:00</StartBoundary> the time to start it for the first time
<UserId>S-1-5-21-12XXXXX449-XXXXXXXXXXX1-741343252-XXX</UserId> you can get this by exporting another task
<UserId>S-1-5-21-12XXXXX449-XXXXXXXXXXX1-741343252-XXX</UserId> it will askyou at the moment of save the task
<Command>C:\Users\yourusername\Documents\cmds\start.bat</Command> the path to your cmd batch file
<WorkingDirectory>C:\Users\yourusername\Documents\cmds\</WorkingDirectory> the path to your cmd batch folder




============XML FILE================


<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2018-09-04T12:03:57.6183348</Date>
<Author>COMPUTERNAME\USERNAME</Author>
<URI>\StartObs</URI>
</RegistrationInfo>
<Triggers>
<TimeTrigger>
<Repetition>
<Interval>PT6H</Interval>
<StopAtDurationEnd>false</StopAtDurationEnd>
</Repetition>
<StartBoundary>2018-09-04T16:00:00</StartBoundary>
<Enabled>true</Enabled>
</TimeTrigger>
</Triggers>
<Principals>
<Principal id="Author">
<UserId>S-1-5-21-12XXXXX449-XXXXXXXXXXX1-741343252-XXX</UserId>
<LogonType>Password</LogonType>
<RunLevel>LeastPrivilege</RunLevel>
</Principal>
</Principals>
<Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>false</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
<IdleSettings>
<StopOnIdleEnd>true</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
<Actions Context="Author">
<Exec>
<Command>C:\Users\yourusername\Documents\cmds\start.bat</Command>
<WorkingDirectory>C:\Users\yourusername\Documents\cmds\</WorkingDirectory>
</Exec>
</Actions>
</Task>
 
Top