Skip to content

prsauer/noobs

 
 

Repository files navigation

No(de)obs

Previously named "warcraft-recorder-obs-engine"

This library is still very young, you probably don't want to use it.

Native node bindings to libobs, built for Warcraft Recorder.

An alternative but less mature obs-studio-node with a focus on recording gameplay from a replay buffer.

Uses a custom fork of libobs to:

  • Enable "replay_buffer to recording".
  • Allow libobs to be used as a library easier.

Installation

npm install noobs

Usage

Lifecycle

import noobs from 'noobs';

const distPath = ...;
const logPath = ...;
const recordingPath = ...;
const cb = (signal) => console.log(signal);

noobs.Init(distPath, logPath, recordingPath, cb);
...
noobs.Shutdown();

Sources

noobs.CreateSource('Test Source', 'monitor_capture'); // Creates a source
noobs.AddSourceToScene('Test Source'); // Add the source to the scene
const s = noobs.GetSourceSettings('Test Source'); // View current settings
const p = noobs.GetSourceProperties('Test Source'); // View settings schema
noobs.SetSourceSettings('Test Source', { ...s, monitor: 1 });
noobs.RemoveSourceFromScene('Test Source'); // Remove a source from the scene
noobs.DeleteSource('Test Source') // Release a source

Basic Recording Usage

noobs.StartRecording();
...
noobs.StopRecording();

Buffer Recording

noobs.SetBuffering(true);

noobs.StartBuffering();
...
noobs.StartRecording(5); // include last 5 seconds of the recording buffer
...
noobs.StopRecording();

Preview

const hwnd = this.mainWindow.getNativeWindowHandle();
noobs.InitPreview(hwnd);
noobs.ShowPreview(x, y, width, height); // Use this for moving/resizing
// noobs.HidePreview();

See test.js for more.

TypeScript

This package includes TypeScript definitions.

Requirements

TODO

  • Node.js ??
  • A C++ compiler (Visual Studio Build Tools on Windows, Xcode on macOS, GCC on Linux) ??
  • Node-gyp ??

Building from Source

npm install       # install deps
npm run build     # compile it

npm version patch # version bump
npm pack          # build tgz locally
npm publish       # publish to npm

License

GPL-2.0

About

No(de)obs - Native bindings to libobs built for Warcraft Recorder

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 78.4%
  • C++ 20.3%
  • JavaScript 1.3%