#!/usr/bin/env python
# title : AutoSaveReplay.py
# description : Saves continously Replays
# author : Bootscreen
# date : 2019 05 07
# version : 0.1
# dependencies : - Python 3.6 (https://www.python.org/)
# notes : Follow this step for this script to work:
# : Python:
# : 1. Install python (v3.6 and 64 bits, this is important)
# : OBS:
# : 1. Go to Tools › Scripts
# : 2. Click the "Python Settings" tab
# : 3. Select your python install path
# : 4. Click the "Scripts" tab
# : 5. Click the "+" button and add this script
# : 6. Set the Timespan between Replays
# : 7. (optional: set Scenes on which no Replays should be saved)
# : 8. Check "Enable"
# :
# python_version : 3.6+
# ==============================================================================
import obspython as obs
import os
enabled = True
debug_mode = False
timer_minutes = 10
timer_minutes_to_millisec = 60000
scenes = ''
def script_defaults(settings):
global debug_mode
if debug_mode: print("Calling defaults")
global enabled
global timer_minutes
global scenes
obs.obs_data_set_default_bool(settings, "enabled", enabled)
obs.obs_data_set_default_int(settings, "timer", timer_minutes)
obs.obs_data_set_default_string(settings, "scenes", scenes)
def script_description():
return "Starts a continous timer after which a replay is saved
" + \
"