Skip to content

BloodPriestess/obs-studio-node

 
 

Repository files navigation

Reasons | Getting Started | Environment Variables | Issues

Reasons

What happened to node-obs?

node-obs proved to be difficult to work with. The following are just a few reasons why a new set of bindings were warranted:

  • Lack of objects altogether making context harder to control
  • What objects we do use, v8 cannot control their lifetimes
  • Difficult to use over the Electron IPC (or any IPC)
  • Requirement to constantly sync between frontend and backend
  • Lack of flexibility and feature for the frontend
  • An unintuitive interface that was difficult to use and error prone
  • The lack of a scene item object which didn't allow for duplicate sources.
  • And probably more I'm not thinking of right now.

Why cmake?

Because the alternative is gyp which is deprecated. Frankly, node-gyp shouldn't be used anymore since it's incredibly difficult to use outside of simple use-cases.

Getting Started

I've tried to simplify the build system as much as possible to streamline going from nothing to a working library.

Requirements

The rest are handled through package management.

Building

Simply checkout the module and use yarn or yarn install. npm install should also work although I've not tested it.

Building Documentation

Building the documentation couldn't be more simple. Make sure you've done the initial setup and do yarn docs. It will output static HTML inside of a folder called 'docs' in the root directory.

Environment Variables

The environment variables are only used if you build manually or if you set them as globals. I don't recommend either but these are used to get the build system working so changing them is also required to work. In particular, a useful variable is OBS_BUILD_TYPE which you can set to Debug to magically compile things in debug mode. Note that since index loads the node by name, changing OSN_NODE_NAME will current break the export script.

  • ENABLE_DISTRIBUTION - [ Default: false ]
  • OSN_DIST_DIR - [ Default: "distribute" ]
  • OSN_NODE_NAME - [ Default: "obs_node" ]
  • OBS_BUILD_TYPE - [ Default: Release ]
  • OBS_STUDIO_PATH - [ Default: ${CMAKE_SOURCE_DIR}/obs-build ]
  • OBS_STUDIO_BUILD64 - [ Default: ${OBS_STUDIO_PATH}/build64 ]
  • OBS_STUDIO_DEPS64 - [ Default: ${OBS_STUDIO_PATH}/dependencies2015/win64 ]

Issues

  • Need to add support for other platforms.
  • Need the code base to be used and practically tested.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • C++ 93.4%
  • TypeScript 4.4%
  • CMake 1.6%
  • JavaScript 0.6%