How to start OBS recording automatically when a game launches
Use KeyRoutines' Game started and Game stopped triggers with an If on Started by trigger. On start, Open app opens OBS, a Wait until with OBS is connected holds until OBS is ready, OBS: switch scene picks your game scene and OBS: record / stream / replay starts recording; on stop, the same step stops it and Show notification tells you where the file went.
Steps
- 1
Add the game triggers
Add Game started and Game stopped for the game you want recorded.
- 2
Get OBS ready
In the start branch, add Open app for OBS and a Wait until with OBS is connected, with a time limit of about 30 seconds.
- 3
Start recording
Add OBS: switch scene with your game scene, then OBS: record / stream / replay set to start the recording.
- 4
Stop and report
In the stop branch, add OBS: record / stream / replay set to stop the recording, then Show notification with the file path from its outputs.
Tips
- OBS needs its WebSocket server turned on under Tools, WebSocket Server Settings; KeyRoutines reads the port and password from there.
- OBS: record / stream / replay never waits or retries on its own, which is why the Wait until comes first.
Questions
- Recording or replay buffer?
- Recording saves the whole session. If you only want clips, start the replay buffer instead with the same step.
- Is this free?
- Yes. Game triggers, OBS is connected, OBS: switch scene and OBS: record / stream / replay are all free.