NOALBS / nginx-obs-automatic-low-bitrate-switching

Simple app to automatically switch scenes in OBS based on the current bitrate fetched from the NGINX stats page.
http://noalbs.com
MIT License
339 stars 77 forks source link

triggers not working #164

Closed fuyonet closed 2 months ago

fuyonet commented 2 months ago

I'm new with his. got it to run and if I start stream, this software start the sceen. after online it switch directly to lowbitrate sceen.

I always get message: Switcher: noalbs::switcher: Scene switched to [Normal] normal every some seconds. but the sceen still on lowbitrate.

the websockets are running well. noalbt can switch me from online to offline.

I try: "triggers": { "low": 500, "rtt": 800, "offline": 400

and : "triggers": { "low": 1000, "rtt": 3000, "offline": 500

no changes. always the same. looks like changes are not apply.

"switcher": { "bitrateSwitcherEnabled": true, "onlySwitchWhenStreaming": false, "instantlySwitchOnRecover": true, "autoSwitchNotification": true, "retryAttempts": 5, "triggers": { "low": 500, "rtt": 800, "offline": 400 }, "switchingScenes": { "normal": "online", "low": "lowbitrate", "offline": "offline" },

i look on the nginx status page and see my stream has stable 4Mbit/s

fuyonet commented 2 months ago

2024-04-06T09:01:11.866607Z INFO NOALBS{user=xxx}:Switcher: noalbs::switcher: Scene switched to [Offline] offline this action was success my OBS change to offline

2024-04-06T09:02:08.946094Z INFO NOALBS{user=xxx}:Switcher: noalbs::switcher: Scene switched to [Previous] online after start stream, success switched to online sceen.

and than it fall back to lowbitrate. looks like he try to switch to normal, but cannot. 2024-04-06T09:02:24.970727Z INFO NOALBS{user=xxx}:Switcher: noalbs::switcher: Scene switched to [Normal] normal 2024-04-06T09:02:29.980886Z INFO NOALBS{user=xxx}:Switcher: noalbs::switcher: Scene switched to [Normal] normal 2024-04-06T09:02:34.989840Z INFO NOALBS{user=xxx}:Switcher: noalbs::switcher: Scene switched to [Normal] normal 2024-04-06T09:02:39.999444Z INFO NOALBS{user=xxx}:Switcher: noalbs::switcher: Scene switched to [Normal] normal

715209 commented 2 months ago

Hi @fuyonet ,

Make sure that the scene name is exactly the same as in OBS, it is case sensitive.

fuyonet commented 2 months ago

yes sure

"switchingScenes": {
  "normal": "online",
  "low": "lowbitrate",
  "offline": "offline"

sceen

fuyonet commented 2 months ago

i fix the problem. most errors in front of the computer :)

the sceen names also configured in the nginx stream server settings. why? but ok, after i configure there too, it works well.

thank you for this nice software :)

715209 commented 2 months ago

The overrideScenes are totally optional, if you're not using it you can set it to null.