Code Monkey home page Code Monkey logo

obs-stream-automation's Introduction

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

obs-stream-automation's People

Contributors

web3nelly avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.