Skip to content

Instantly share code, notes, and snippets.

@sytem
Created June 21, 2018 19:15
Show Gist options
  • Save sytem/06d80993ab9831bdd994aed4bc9e6a7f to your computer and use it in GitHub Desktop.
Save sytem/06d80993ab9831bdd994aed4bc9e6a7f to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import time
import logging
logging.basicConfig(level=logging.INFO)
sys.path.append('../')
from obswebsocket import obsws, requests
host = "10.39.1.83"
port = 4444
password = ""
ws = obsws(host, port, password)
ws.connect()
try:
while True:
print (ws.call(requests.SetSceneItemRender("cam1",True,"Scene1")))
print (ws.call(requests.SetSceneItemRender("cam2",False,"Scene1")))
time.sleep(2)
print (ws.call(requests.SetSceneItemRender("cam1",False,"Scene1")))
print (ws.call(requests.SetSceneItemRender("cam2",True,"Scene1")))
time.sleep(2)
except KeyboardInterrupt:
pass
ws.disconnect()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment