Created
June 21, 2018 19:15
-
-
Save sytem/06d80993ab9831bdd994aed4bc9e6a7f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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