GithubHelp home page GithubHelp logo

tbodt / obs-studio-node Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stream-labs/obs-studio-node

1.0 2.0 0.0 105.89 MB

libOBS (OBS Studio) for Node.Js, Electron and similar tools

License: GNU General Public License v2.0

CMake 5.52% JavaScript 1.49% TypeScript 3.98% C++ 88.42% PowerShell 0.58%

obs-studio-node's Introduction

OBS Studio for Node.Js

obs-studio-node is a Node.Js compatible wrapper around OBS Studio. It works by wrapping libOBS inside a secondary process that is talked to using lib-streamlabs-ipc, which results in better stability and performance.

The goal of the project is to provide a fully featured working Node.Js and electron wrapper around libOBS (OBS Studio).

Why CMake?

CMake offers better compatibility with existing projects than node-gyp and comparable solutions. It's also capable of generating solution files for multiple different IDEs and compilers, which makes it ideal for a native module. It is also the build system of obs-studio, which we depend on for any functionality.

Building The Project

The project is for the most part automated, so there is very little to actually do.

Prerequisites

You will need to have the following installed:

  • Node.JS (LTS or latest, LTS recommended for now)
  • Yarn (Run npm install -g yarn inside a shell with node.js access)
  • CMake, Version 3.1 or higher

Windows

Building on windows requires additional software:

First Steps

  1. Open a git enabled shell.
  2. Clone the project: git clone https://github.com/stream-labs/obs-studio-node.git
  3. Enter the cloned project directory: cd obs-studio-node
  4. Initialize all submodules recursively: git submodule update --init --recursive --force
  5. Open a node.js enabled shell (if not already in one) inside the project directory.
  6. Initialize any node dependencies of the project: yarn install

Configuration

  1. Open CMake-GUI.
  2. Set "Where is the source code:" to the cloned project directory.
  3. Set "Where to build the binaries:" to the build directory inside the project directory (you might have to create it first).
  4. Click "Configure".
  5. Specify the generator that you want to use. "... Win64" are 64-bit capable generators.
  6. Optional: If you have a 64-bit system, type in host=x64 into the "Optional toolset to use" box.
  7. Leave it at default native compilers.
  8. Click Finish.
  9. Click Generate once the button is no longer grey.

Building

  1. Open the project (if you still have CMake-GUI open, just click Open Project)
  2. Build the "ALL_BUILD" project.

Installing and Distribution

  1. Open CMake-GUI
  2. Change the "Where to build the binaries:" directory to the configured build directory. CMake should automatically update.
  3. Modify the CMAKE_INSTALL_PREFIX variable to the directory of your liking. Visual Studio will need to have write & execute access to that location.
  4. Click Configure.
  5. Click Generate.
  6. Open the project and build the INSTALL project. This will create the proper node module structure in the directory you specified to CMAKE_INSTALL_PREFIX

Building The Documentation

First make sure that you've configured and built obs-studio-node. Once you have done that, do the following:

  1. Open a node.js enabled shell inside the project directory.
  2. Run yarn build:docs and wait for the command to be done.
  3. Documentation will be inside the /docs/ directory as a static HTML file.

Using a custom OBS Studio

A lot of the build system is automated, which makes integrating custom dependencies difficult. However there are some steps that can be taken to at least debug using custom built versions of OBS Studio.

Configuration Requirements

The following setting must be changed before clicking Generate for the first time in obs-studio:

  • ENABLE_SCRIPTING must be Off (false)
  • ENABLE_UI must be Off (false)
  • QTDIR must be empty

Install/Distribution requirements

To go from just a compiling obs-studio to using the actual custom obs-studio inside obs-studio-node, you must reconfigure obs-studio to install things into <obs-studio-node build dir>/libobs-src. You can do this by changing CMAKE_INSTALL_PREFIX in the obs-studio project. Any changes done to obs-studio must now be installed by building the INSTALL project in obs-studio, and will then be sent along to whatever is using obs-studio-node once you build the INSTALL project in obs-studio-node.

Contributing To The Project

See the Guidelines for contributing.

obs-studio-node's People

Contributors

computerquip-streamlabs avatar xaymar avatar eddygharbi avatar xaymar-streamlabs avatar andycreeth avatar orion78fr avatar

Stargazers

 avatar

Watchers

tbodt avatar  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.