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.
npm install noobs
import noobs from 'noobs';
const distPath = ...;
const logPath = ...;
const recordingPath = ...;
const cb = (signal) => console.log(signal);
noobs.Init(distPath, logPath, recordingPath, cb);
...
noobs.Shutdown();
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
noobs.StartRecording();
...
noobs.StopRecording();
noobs.SetBuffering(true);
noobs.StartBuffering();
...
noobs.StartRecording(5); // include last 5 seconds of the recording buffer
...
noobs.StopRecording();
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.
This package includes TypeScript definitions.
TODO
- Node.js ??
- A C++ compiler (Visual Studio Build Tools on Windows, Xcode on macOS, GCC on Linux) ??
- Node-gyp ??
npm install # install deps
npm run build # compile it
npm version patch # version bump
npm pack # build tgz locally
npm publish # publish to npm
GPL-2.0