Hello all,
it seems that i cant get a connetion between pyton and websocket.
i installed today python-3.12.5-amd64
run pip install pyinstaller
try to set up 4 scenes for twitch
start,stream,brb,raid
set pyton path with the .exe
activate websocket
wrote .lua
/////////////////////////
import obswebsocket
import time
# Verbindung mit OBS WebSocket
ws = obsws("localhost", 4455, "password")
ws.connect()
# BRB Szene definieren
BRB_SCENE = "BRB"
LIVE_SCENE = "Stream"
while True:
stats = ws.call(requests.GetStreamingStatus())
bitrate = stats.getStats()['output']['bitrate']
# Überprüfe Bitrate
if bitrate < 500: # Bitrate-Schwelle für schlechte Verbindung
ws.call(requests.SetCurrentScene(BRB_SCENE))
else:
ws.call(requests.SetCurrentScene(LIVE_SCENE))
time.sleep(5) # Überprüfe alle 5 Sekunden
//////////////////////////////////////////////////////////////////////////
i tryed obswebsocket / websocket but it seems i get no connection what im doing wrong? with chatgpt i turn in a circle
error message =
[brb szenenwechsel.lua] Error loading file: [string "C:/Program Files/obs-studio/data/obs-plugins/..."]:1: '=' expected near 'obswebsocket'
plugin not in the folder? what i have to do?
C:\Program Files\obs-studio\data\obs-plugins\obs-websocket\locale
here are the plugin
it seems that i cant get a connetion between pyton and websocket.
i installed today python-3.12.5-amd64
run pip install pyinstaller
try to set up 4 scenes for twitch
start,stream,brb,raid
set pyton path with the .exe
activate websocket
wrote .lua
/////////////////////////
import obswebsocket
import time
# Verbindung mit OBS WebSocket
ws = obsws("localhost", 4455, "password")
ws.connect()
# BRB Szene definieren
BRB_SCENE = "BRB"
LIVE_SCENE = "Stream"
while True:
stats = ws.call(requests.GetStreamingStatus())
bitrate = stats.getStats()['output']['bitrate']
# Überprüfe Bitrate
if bitrate < 500: # Bitrate-Schwelle für schlechte Verbindung
ws.call(requests.SetCurrentScene(BRB_SCENE))
else:
ws.call(requests.SetCurrentScene(LIVE_SCENE))
time.sleep(5) # Überprüfe alle 5 Sekunden
//////////////////////////////////////////////////////////////////////////
i tryed obswebsocket / websocket but it seems i get no connection what im doing wrong? with chatgpt i turn in a circle
error message =
[brb szenenwechsel.lua] Error loading file: [string "C:/Program Files/obs-studio/data/obs-plugins/..."]:1: '=' expected near 'obswebsocket'
plugin not in the folder? what i have to do?
C:\Program Files\obs-studio\data\obs-plugins\obs-websocket\locale
here are the plugin