Skip to content

Latest commit

 

History

History
57 lines (44 loc) · 2.24 KB

README.md

File metadata and controls

57 lines (44 loc) · 2.24 KB

OBS Stream Automation

Using Node.js and @b3nelly/change-obs-scene package for dynamically switching scenes in OBS.

See Automations in action @ breaking3Dreality on Twitch.tv

More automates to come!

Dependancies

Usage

  1. Startup OBS and enable the WebSocket Server
  • Tools > WebSocket Server Settings:
    • obs websocket server settings
    • Don't forget to set your Server Password
  1. git clone https://github.com/b3nelly2/obs-stream-automation.git
  2. cd ./obs-stream-automation
  3. npm install
  4. Create .env file and add your OBS WebSocket Server Settings:
  • Windows Powershell:
    New-Item .env -ItemType File
    >> "OBS_WS='ws://localhost:4455'" | Out-File -FilePath .env -Encoding utf8 -Append
    >> "OBS_WS_PASS='yourPassword'" | Out-File -FilePath .env -Encoding utf8 -Append
    >> "OBS_SCENE_INT_SECS=90" | Out-File -FilePath .env -Encoding utf8 -Append
  • macOS & Linux: touch .env
    echo "OBS_WS='ws://localhost:4455'" >> .env
    echo "OBS_WS_PASS='yourPassword'" >> .env
    echo "OBS_SCENE_INT_SECS=90" >> .env
  • Or you can just edit the changeScene.js, manuallying update:
    • obsSkipScenes: Default is an empty array
    • intervalInSeconds: Default is 45s
    • obsWebSocketServerURL: Default is ws://localhost:4455
    • obsWebSocketServerPassword: Default is undefined
    • You can also comment out dotevn if you aren't using an .env file
      • Lines 1 and 3:
      • import * as dotenv from "dotenv"; // https://github.com/motdotla/dotenv#how-do-i-use-dotenv-with-import
        import obsSwitchScenes from "@b3nelly/change-obs-scene"; // https://github.com/web3nelly/change-obs-scene
        https: dotenv.config();
        const obsSkipScenes = ["Scene 1"];
        const intervalInSeconds = process.env.OBS_SCENE_INT_SECS ?? 45;
        const obsWebSocketServerURL = process.env.OBS_WS ?? "ws://localhost:4455";
        const obsWebSocketServerPassword = process.env.OBS_WS_PASS ?? undefined;
  1. npm start (OBS must me started to work)
  2. That's it, for now 😉

@b3nelly/change-obs-scene In Action

Working change obs scene example image