Giter Club home page Giter Club logo

obs-studio-node's Introduction

libobs via node bindings

This library intends to provide bindings to obs-studio's internal library, named libobs accordingly, for the purpose of using it from a node runtime. Currently, only Windows and MacOS are supported.

Building

Prerequisites

You will need to have the following installed:

Windows

Building on windows requires additional software:

Example Build

We use a flexible cmake script to be as broad and generic as possible in order to prevent the need to constantly manage the cmake script for custom uses, while also providing sane defaults. It follows a pretty standard cmake layout and you may execute it however you want.

Example:

yarn install
git submodule update --init --recursive
mkdir build
cd build
cmake .. -G"Visual Studio 17 2022" -A x64 -DCMAKE_PREFIX_PATH=%CD%/libobs-src/cmake/
cmake --build . --target install --config RelWithDebInfo

This will will download any required dependencies, build the module, and then place it in an archive compatible with npm or yarn that you may specify in a given package.json.

Custom OBS Build

By default, we download a pre-built version of libobs if none is specified. However, this pre-built version may not be what you want to use or maybe you're testing a new obs feature.

You may specify a custom archive of your own. However, some changes need to be made to obs-studio's default configuration before building:

  • ENABLE_SCRIPTING must be set to false
  • ENABLE_UI must be set to false
  • QTDIR should not be specified as it is not used.

If you don't know how to build obs-studio from source, you may find instructions here.

cppcheck

Install cppcheck from http://cppcheck.sourceforge.net/ and add cppcheck folder to PATH To run check from command line:

cd build 
cmake --build . --target CPPCHECK

Also target can be built from Visula Studio. Report output format set as compatible and navigation to file:line posiible from build results panel.

Some warnings suppressed in files obs-studio-client/cppcheck_suppressions_list.txt and obs-studio-server/cppcheck_suppressions_list.txt.

Clang Analyzer

Ninja and LLVM have to be installed in system. Warning: depot_tool have broken ninja.
To make build open cmd.exe.

mkdir build_clang
cd build_clang

"c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
 
set CCC_CC=clang-cl
set CCC_CXX=clang-cl
set CC=ccc-analyzer.bat
set CXX=c++-analyzer.bat
#set CCC_ANALYZER_VERBOSE=1

#make ninja project 
cmake  -G "Ninja" -DCLANG_ANALYZE_CONFIG=1 -DCMAKE_INSTALL_PREFIX:PATH=""  -DCMAKE_LINKER=lld-link -DCMAKE_BUILD_TYPE="Debug"   -DCMAKE_SYSTEM_NAME="Generic" -DCMAKE_MAKE_PROGRAM=ninja.exe ..

#try to build and "fix" errors 
ninja.exe 

#clean build to scan 
ninja.exe clean 

scan-build --keep-empty -internal-stats -stats -v -v -v -o check ninja.exe

Step with "fixing" errors is important as code base and especially third-party code are not ready to be build with clang. And files which failed to compile will not be scanned for errors.

Tests

The tests for obs studio node are written in Typescript and use Mocha as test framework, with electron-mocha pacakage to make Mocha run in Electron, and Chai as assertion framework.

You need to build obs-studio-node in order to run the tests. You can build it any way you want, just be sure to use CMAKE_INSTALL_PREFIX to install obs-studio-node in a folder of your choosing. The tests use this variable to know where the obs-studio-node module is. Since we use our own fork of Electron, you also need to create an environment variable called ELECTRON_PATH pointing to where the Electron binary is in the node_modules folder after you run yarn install. Below are three different ways to build obs-studio-node:

Terminal commands

In obs-studio-node root folder:

  1. yarn install
  2. git submodule update --init --recursive --force
  3. mkdir build
  4. cmake -Bbuild -H. -G"Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="path_of_your_choosing"
  5. cmake --build build --target install

Terminal using package.json scripts

In obs-studio-node root folder:

  1. mkdir build
  2. yarn local:config
  3. yarn local:build
  4. Optional: To clean build folder to repeat the steps 2 to 3 again do yarn local:clean

CMake GUI

  1. yarn install
  2. Create a build folder in obs-studio-node root
  3. Open CMake GUI
  4. Put obs-studio-node project path in Where is the source code: box
  5. Put path to build folder in Where to build the binaries: box
  6. Click Configure
  7. Change CMAKE_INSTALL_PREFIX to a folder path of your choosing
  8. Click Generate
  9. Click Open Project to open Visual Studio and build the project there

Running tests

Some tests interact with Twitch and we use a user pool service to get users but in case we are not able to fetch a user from it, we use the stream key provided by an environment variable. Create an environment variable called SLOBS_BE_STREAMKEY with the stream key of a Twitch account of your choosing.

  • To run all the tests do yarn run test
  • To run only run one test do yarn run test --grep describe_name_value where describe_name_value is the name of the test passed to the describe call in each test file. Examples: yarn run test --grep nodeobs_api or yarn run test -g "Start streaming"

obs-studio-node's People

Contributors

andycreeth avatar avoitenko-logitech avatar berkon avatar borzun avatar computerquip-streamlabs avatar dependabot[bot] avatar eddygharbi avatar eugen15 avatar florin0x01 avatar hrueger avatar orion78fr avatar prsdamasceno avatar rodrigoholztrattner avatar stevensoftware52 avatar summeroff avatar xaymar avatar xaymar-streamlabs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

obs-studio-node's Issues

RecFileNameWithoutSpace sizeOfCurrentValue error

Parameter recFileNameWithoutSpace;
recFileNameWithoutSpace.name = "RecFileNameWithoutSpace";
recFileNameWithoutSpace.type = "OBS_PROPERTY_BOOL";
recFileNameWithoutSpace.description = "Generate File Name without Space";
bool noSpace = config_get_bool(config, "AdvOut", "RecFileNameWithoutSpace");
recFileNameWithoutSpace.currentValue.resize(sizeof(noSpace));
memcpy(recFileNameWithoutSpace.currentValue.data(), &noSpace, sizeof(noSpace));
recFileNameWithoutSpace.sizeOfCurrentValue = (noSpace);

recFileNameWithoutSpace.sizeOfCurrentValue = sizeof(noSpace);

As a result of a reference to another source, it is correct to use it as sizeof.

} else if (param.type.compare("OBS_PROPERTY_BOOL") == 0) {
bool val = config_get_bool(config, section.c_str(), param.name.c_str());
param.currentValue.resize(sizeof(val));
memcpy(param.currentValue.data(), &val, sizeof(val));
param.sizeOfCurrentValue = sizeof(val);

Duplication of setting CMAKE_CXX_STANDARD in root CMakeLists.txt

Is there any purpose of setting CMAKE_CXX_STANDARD two times in CMakeLists.txt?

cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

Why the need for IPC?

Hello,

I am just curious. Why is there a need for IPC between the obs-studio-server and obs-studio-client? Why couldn't they both run in the same address space?

Thanks in advance for your time!

Can't compile on Windows 10

I'm currently trying to compile a Release version of obs-studio-node for myself, but I neithor manage to solve nor understand the compilation errors I stumble upon.

This is my installation script, executed with Bash from Git for Windows.

#!/bin/bash

srcDirectory=~/src
repoDirectory=$srcDirectory/obs-studio-node

rimraf $repoDirectory
git clone [email protected]:stream-labs/obs-studio-node.git $repoDirectory
cd $repoDirectory
git submodule update --init --recursive
yarn install
mkdir build
cd build
cmake .. -G"Visual Studio 15 2017" -A x64
cmake --build .
cpack -G ZIP
code $repoDirectory

This is the CPack output:

CPack: Create package using ZIP
CPack: Install projects
CPack: - Install project: obs-studio-node
CMake Error at C:/Users/jaid-live/src/obs-studio-node/build/obs-studio-client/cmake_install.cmake:71 (file):
  file INSTALL cannot find
  "C:/Users/jaid-live/src/obs-studio-node/build/obs-studio-client/Release/obs_studio_client.node".
Call Stack (most recent call first):
  C:/Users/jaid-live/src/obs-studio-node/build/cmake_install.cmake:38 (include)

CMake Error at C:/Users/jaid-live/src/obs-studio-node/build/obs-studio-server/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/jaid-live/src/obs-studio-node/build/obs-studio-server/Release/obs64.exe".
Call Stack (most recent call first):
  C:/Users/jaid-live/src/obs-studio-node/build/cmake_install.cmake:39 (include)

CMake Error at C:/Users/jaid-live/src/obs-studio-node/build/_deps/stackwalker-build/cmake_install.cmake:55 (file):
  file cannot create directory: C:/Program Files (x86)/obs-studio-node/lib.
  Maybe need administrative privileges.
Call Stack (most recent call first):
  C:/Users/jaid-live/src/obs-studio-node/build/obs-studio-server/cmake_install.cmake:81 (include)
  C:/Users/jaid-live/src/obs-studio-node/build/cmake_install.cmake:39 (include)

CMake Error at C:/Users/jaid-live/src/obs-studio-node/build/_deps/stackwalker-build/cmake_install.cmake:88 (file):
  file cannot create directory: C:/Program Files
  (x86)/obs-studio-node/include.  Maybe need administrative privileges.
Call Stack (most recent call first):
  C:/Users/jaid-live/src/obs-studio-node/build/obs-studio-server/cmake_install.cmake:81 (include)
  C:/Users/jaid-live/src/obs-studio-node/build/cmake_install.cmake:39 (include)

CMake Error at C:/Users/jaid-live/src/obs-studio-node/build/_deps/stackwalker-build/cmake_install.cmake:100 (file):
  file cannot create directory: C:/Program Files (x86)/obs-studio-node/lib.
  Maybe need administrative privileges.
Call Stack (most recent call first):
  C:/Users/jaid-live/src/obs-studio-node/build/obs-studio-server/cmake_install.cmake:81 (include)
  C:/Users/jaid-live/src/obs-studio-node/build/cmake_install.cmake:39 (include)

CPack Error: Error when generating package: obs-studio-node

Whole output on Pastebin.

The first 2 error blocks tell about missing files. Neither C:/Users/jaid-live/src/obs-studio-node/build/obs-studio-client/Release nor C:/Users/jaid-live/src/obs-studio-node/build/obs-studio-server/Release exist for me. Do I have to put a Release flag anywhere?

The next 3 error blocks tell about missing permission to write to C:/Program Files and C:/Program Files (x86). Can I specify another installation path or should I run CPack as an administrator?

Unable to create virtual webcam

I have installed the virtual webcam plugin and when checking with:

osn.NodeObs.OBS_service_isVirtualCamPluginInstalled()

I'm getting true. But when I then try to create the webcam with:

osn.NodeObs.OBS_service_createVirtualWebcam('Streamlabs OBS Virtual Webcam')

my Electron app crashes without an error. After installing segfault-handler node module, at least I'm getting a:

PID 18952 received SIGSEGV for address: 0x7af13b29

Its strange, because in Streamlabs OBS the functions are used exactly the same way.

Would be great if someone could give me a hint what might go wrong. Thanks!

UPDATE: Looks like this is an timing issue. When I'm waiting for 1 sec, or when calling osn.NodeObs.OBS_service_createVirtualWebcam('Streamlabs OBS Virtual Webcam') after osn.NodeObs.OBS_content_createSourcePreviewDisplay(...) it seems to work fine. Thus, I'd leave it up to the experts here whether you want to classify this as a bug or as "works as designed".

In-Stream Bitrate settings

Windows 10 64-bit.
Settings ->Streaming -> Bitrate : only adjustable through arrows while streaming (Twitch). Should be an editable text field but the appears to be disabled during stream.

Docs / Examples avalible?

Is there any documentation or examples avalible? I'd like to use this in an electron project. I had a look at the TypeScript definitions and at the Stream-labs obs code, but since this looks very complicated to a developer without vue experience, I couldn't even figure out how to mix two sources together and get the result.

How to create a display

Hi,
with the help of this repository, I was able to get the basic setup with electron working.
However, for now just adding scenes, sources and recording works. I'd like to add a output display.
In streamlabs-obs I found this code: https://github.com/stream-labs/streamlabs-obs/blob/e707f9819a10296893f4d3e058d12110c1ec44a7/app/services/video.ts#L254-L275
So I have the following code:

const osn = require("obs-studio-node");
 // do all the initialization stuff, like here: https://github.com/Envek/obs-studio-node-example/blob/a099849c5e053cced4cfb23f9a250f95e5c7967f/obsRecorder.js#L10-L64
const t = new BrowserWindow({
    height: 300,
    width: 400,
    webPreferences: {
      nodeIntegration: true,
    }
  });

  osn.NodeObs.OBS_content_createDisplay(
    t.getNativeWindowHandle(),
    "test",
    1,
  );

But it just gives me the normal BrowserWindow.
Rendering mode can be 0, 1 or 2 as defined here but it doesn't work with any of them.

What am I missing or doing wrong?

OBS_API_initAPI Error

Windows, OBS_API_initAPI Initialization is success in the development mode. An error is reported after the package is completed.
local logs:

[000:00:00:01.442.190.800][Info] Reset video failed with error: -1
[000:00:00:01.442.221.100][Info] Error returning now

Can't find the Release folder

My order:
git submodule update --init --recursive
mkdir build
cd build
cmake .. -G"Visual Studio 15 2017" -A x64
cmake -DCMAKE_BUILD_TYPE=Release .
cmake --build .
cpack -G ZIP

cmake --build . prompts no nan.h, I tried to put nan.h in the client folder and no error.
cpack prompts no release folder,I add the order CMAKE_BUILD_TYPE, but Release never seen.
Please tell me what did I do wrong.very greatful!

Building obs-studio-node with custom OSN_LIBOBS_URL does not have 32 bit virtual camera

Pre-built version of libobs have virtual camera for both 32 bit and 64 bit

But when we compile and build custom libobs and provide that as custom OSN_LIBOBS_URL in cmake command for building obs-studio-node it does not pack 32 bit virtual source or virtual camera.

How to build obs-studio-node with custom libobs which can provide virtual source for 64 bit as well as 32 bit?

Errors running OBS_service_startRecording()

I built the package locally and was able to initialize osn successfully in Electron 6. However, once OBS_service_startRecording is called, the app immediately crashes and fills the logs with this error (it continues running even after I close the Electron app).

[Error] WriteFileEx failed with getErrorCode 232

Any idea what is causing this? I followed the setSettings structure in the tests and verified that the FilePath has indeed been changed to a folder of my choosing.

Incidentally, when I run the tests from this package via yarn test all pass except for 2, including nodeobs_service, which calls the OBS_service_startRecording function I'm looking at. I recognize that this is likely due to the Twitch comment from the README, but even after I comment that code, the tests seem to just hang on that function. When I look up the logs, I see this error:

load_graphics_offsets: Failed to start 'get-graphics-offsets32.exe`

Any help is very much appreciated!

Linux support

Is there any plan to support linux platform? we are planning to create a nodejs server, which can invoke obs in linux server/docker.

I'm very new to obs and also the nodejs c++ add on. if i want to handle this work, how can i do it well?

Can't compile on Windows 10 using Visual Studios 2015 and CMake 3.18.4

I was trying to compile a custom obs-studio-node, but I am facing some errors in the process and I am unable to understand the error. Can you please, provide me a solution (if you encountered the same errors before) or provide some guidance to understand the resolve the below errors.

The Script that I followed is below. I ran it in the Git Bash (As Administrator) on Windows.

Below are the steps I'm following :
git clone https://github.com/stream-labs/obs-studio-node.git
cd obs-studio-node
yarn install
git submodule update --init --recursive
mkdir build
cd build
cmake .. -G"Visual Studio 14 2015" -A x64 -DCMAKE_INSTALL_PREFIX="C:/dev"
cmake --build . --config Release
cpack -G TGZ

I can't build it successfully and it is getting failed at last step when running "cpack -G TGZ" command as admin.

Error Message:
CPack: - Install project: obs-studio-node []
CMake Error at C:/dev/customOBS/obs-studio-node/build/obs-studio-client/cmake_install.cmake:71 (file):
file INSTALL cannot find
"C:/dev/customOBS/obs-studio-node/build/obs-studio-client/Release/obs_studio_client.node":
No such file or directory.
Call Stack (most recent call first):
C:/dev/customOBS/obs-studio-node/build/cmake_install.cmake:39 (include)

CMake Error at C:/dev/customOBS/obs-studio-node/build/obs-studio-server/cmake_install.cmake:39 (file):
file INSTALL cannot find
"C:/dev/customOBS/obs-studio-node/build/obs-studio-server/Release/obs64.exe":
No such file or directory.
Call Stack (most recent call first):
C:/dev/customOBS/obs-studio-node/build/cmake_install.cmake:40 (include).

I am not sure if the problem is in the last step only or is something wrong in the previous steps as well. If you require anything else as well, please let me know. I can share a complete video of the process or screenshots.

Really thankful in advance for taking out time helping out.

SubCategory paramsCount type mismatch

Type does not match in serialization and deserialization.

*reinterpret_cast<uint32_t*>(buffer.data() + indexBuffer) = paramsCount;

*reinterpret_cast<size_t*>(buffer.data() + indexBuffer) = paramsCount;

uint32_t != size_t

Visual Studio 2015 32bit

stdint.h

typedef unsigned int       uint32_t;

vcruntime.h

typedef unsigned int     size_t;

Visual Studio 2015 64bit

stdint.h

typedef unsigned int       uint32_t;

vcruntime.h

typedef unsigned __int64 size_t; == typedef unsigned long long size_t;

Virtual-camera-filter plugin help

I need a virtual camera from an individual source and not the entire scene, so I'm trying to use this plugin: https://github.com/exeldro/obs-virtual-cam-filter to accomplish that, but it is crashing.

I had to rebuild it in order to change this line in the code

context->virtualCam = obs_output_create("virtualcam_output", "virtualcam_output_filter", NULL, NULL);

to

context->virtualCam = obs_output_create("virtual_output", "virtualcam_output_filter", NULL, NULL);

in order to rename the output from "virtualcam_output" to "virtual_output" to work with obs-studio-node, and then dropped the dll in the /obs-studio-node/obs-plugins/64bit/ folder. The module loads without any errors in the logs!

Then I add the plugin to a source with the following:

...
[CODE HERE CREATES THE SOURCE obsCameraInput WHICH WORKS CORRECTLY]
...

const vcFilter = osn.FilterFactory.create('virtual_cam_filter', 'virtcam');
obsCameraInput.addFilter(vcFilter);

This gives the following output in the logs

[000:00:00:03.809.769.000][Debug] output 'virtualcam_output_filter' (virtual_output) created
[000:00:00:03.809.794.400][Debug] private source 'virtcam' (virtual_cam_filter) created
[000:00:00:03.810.217.400][Debug] - filter 'virtcam' (virtual_cam_filter) added to source 'camera-video'
[000:00:00:03:810.842.400][Debug] starting virtual-output on VirtualCam'1'

Then it crashes with no more output.

Any ideas on what to try next?

win32 support

Is there any way I can build obs-studio-node for win32 platform?

Mac support

From this issue #512 , Mac support is now done. But this git Library can’not run in mac.

Use the --enable-media-stream functionality

The OBS studio project has an option to execute the obs64.exe with flags --enable-media-stream in order to access the microphone and camera from browser source, what would be the equivalent here?

Unable to get the Volmeter callback working

Unable to get the Volmeter callback working. I know that it works in Streamlabs OBS, but the code is quite complex for reverse engineering it. What I found out (and what I think should work) is the code below. Does someone have an idea what I'm doing wrong?

    let dev = osn.InputFactory.create ( 'wasapi_input_capture', 'mydevice', {device_id: 'Mikrofon (Logitech Webcam C925e)' })
    let volmeter = osn.VolmeterFactory.create ( 1 )
    volmeter.attach ( dev )
    volmeter.addCallback ( (a,b,c) => {
         console.log (a,b,c)
    })

    // Don't know if the following lines are required, but just in case ...
    osn.Global.setOutputSource ( 0, dev )
    let scene = osn.SceneFactory.create ("Scene")
    scene.add ( dev )

Not able to cpack obs-studio-node after compilation

I am trying to build obs-studio-node by following these steps.

  • git clone https://github.com/stream-labs/obs-studio-node
  • cd obs-studio-node
  • yarn install
  • git submodule update --init --recursive
  • mkdir build
  • cd build
  • cmake .. -G"Visual Studio 16 2019" -A x64
  • cmake --build .
  • cpack -G TGZ
    In the last step cpack -G ZIP I am error
PS C:\Users\alok\Downloads\tmp\streamlabs\obs-studio-node\build> cpack -G TGZ
Chocolatey v0.10.15
File specified is either not found or not a .nuspec file. 'TGZ'

What is error? How can I fix this to create TGZ file?

Not able to cpack libobs for obs-studio-node

I followed steps given in readme file for building libobs that we can use for obs-studio-node.

git clone https://github.com/stream-labs/obs-studio
cd obs-studio
git submodule update --init --recursive
mkdir build
cd build
cmake .. -DENABLE_UI=false -DDepsPath="C:\Users\alokm\Downloads\dependencies2019\win64" -DENABLE_SCRIPTING=false -G"Visual Studio 16 2019" -A x64
cmake --build .
cpack -G ZIP

Last step of cpack is failing with errors

PS C:\Users\alokm\tmp\streamlabs\obs-studio\build> cpack -G ZIP
CPack: Create package using ZIP
CPack: Install projects
CPack: - Install project: obs-studio []
CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/deps/w32-pthreads/cmake_install.cmake:51 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/deps/w32-pthreads/Release/w32-pthreads.dll":
  File exists.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/deps/cmake_install.cmake:37 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:37 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/deps/glad/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/deps/glad/Release/obsglad.dll":
  File exists.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/deps/cmake_install.cmake:42 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:37 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/libobs-d3d11/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/libobs-d3d11/Release/libobs-d3d11.dll":
  File exists.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:42 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/libobs-winrt/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/libobs-winrt/Release/libobs-winrt.dll":
  File exists.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:47 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/libobs-opengl/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/libobs-opengl/Release/libobs-opengl.dll":
  File exists.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:52 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/libobs/cmake_install.cmake:51 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/libobs/Release/obs.dll":
  File exists.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:57 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/coreaudio-encoder/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/coreaudio-encoder/Release/coreaudio-encoder.dll":
  File exists.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:37 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-wasapi/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-wasapi/Release/win-wasapi.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:42 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-dshow/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-dshow/Release/win-dshow.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:47 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/Release/win-capture.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:52 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/graphics-hook/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/graphics-hook/Release/graphics-hook64.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/cmake_install.cmake:59 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:52 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/get-graphics-offsets/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/get-graphics-offsets/Release/get-graphics-offsets64.exe":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/cmake_install.cmake:64 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:52 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/inject-helper/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/inject-helper/Release/inject-helper64.exe":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/cmake_install.cmake:69 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:52 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/decklink/win/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/decklink/win/Release/win-decklink.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:57 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-mf/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-mf/Release/win-mf.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:62 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-qsv11/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-qsv11/Release/obs-qsv11.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:67 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/enc-amf/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/enc-amf/Release/enc-amf.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:77 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/enc-amf/amf-test/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/enc-amf/amf-test/Release/enc-amf-test64.exe":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/enc-amf/cmake_install.cmake:59 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:77 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-openvr/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-openvr/Release/win-openvr.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:87 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/motion-effect/src/motion-transition/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/motion-effect/src/motion-transition/Release/motion-transition.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/motion-effect/cmake_install.cmake:38 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:92 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-vst/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-vst/Release/obs-vst.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:97 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/image-source/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/image-source/Release/image-source.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:102 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-x264/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-x264/Release/obs-x264.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:107 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-ffmpeg/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-ffmpeg/Release/obs-ffmpeg.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:117 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-ffmpeg/ffmpeg-mux/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-ffmpeg/ffmpeg-mux/Release/obs-ffmpeg-mux.exe":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-ffmpeg/cmake_install.cmake:59 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:117 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-outputs/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-outputs/Release/obs-outputs.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:122 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-filters/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-filters/Release/obs-filters.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:127 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-transitions/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-transitions/Release/obs-transitions.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:132 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-text/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-text/Release/obs-text.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:137 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/rtmp-services/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/rtmp-services/Release/rtmp-services.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:142 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/text-freetype2/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/text-freetype2/Release/text-freetype2.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:147 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-ndi/cmake_install.cmake:37 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-ndi/Release/obs-ndi.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:152 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/slobs-virtual-cam/windows/obs-virtual-cam/src/virtual-output/cmake_install.cmake:39 (file):
":
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/slobs-virtual-cam/cmake_install.cmake:37 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/slobs-virtual-cam/windows/obs-virtual-cam/src/virtual-source/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/slobs-virtual-cam/windows/obs-virtual-cam/src/virtual-source/Release/obs-virtualsource.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/slobs-virtual-cam/cmake_install.cmake:37 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:157 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)


CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/UI/obs-frontend-api/cmake_install.cmake:39 (file):
  file INSTALL cannot find
  "C:/Users/alokm/tmp/streamlabs/obs-studio/build/UI/obs-frontend-api/Release/obs-frontend-api.dll":
  No such file or directory.
Call Stack (most recent call first):
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/UI/cmake_install.cmake:37 (include)
  C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:67 (include)


CPack Error: Error when generating package: OBS Studio (64bit)

How can I get rid of this error?

Always compile error when using my local build obs-studio

I want to use my own obs-studio because I'm going to modify obs-studio and debug.

But there is two git, obs-studio and obs-studio-node, everytime after I specify DOSN_LIBOBS_URL(my own build obs-studio, pack as a zip), I have to build obs-studio-node, this step always leads to many compile error. (It seems that the two git must match, which means we must checkout to correct Sha1)

So I wanna know if there is any laterly stable Sha1 of obs-studio & obs-studio-node that I can build without compile error.
I've tried obs-studio-node on tag '0.15.20' and obs-studio on tag '27.0.0-rc6' and some more combinations, failed.

Thanks & respect

Seek help:osn.NodeObs.OBS_API_initAPI Error

I used Electron and Vue for development. After referring to OBS-studio-node, the initialization report is wrong. However, I don't know what I did wrong.It took me a long time, but I didn't get anywhere.Does anyone have the same problem?How did you solve it?

This is my log file

[000:00:00:01.170.747.557][Error] config_save_safe: failed to write to D:\WebstormProjects\electron_demo\dist_electron\osn-data\global.ini.tmp
[000:00:00:01.186.036.179][Info] About to reset the video context
[000:00:00:01.191.012.181][Info] ---------------------------------
[000:00:00:01.191.056.489][Info] Initializing D3D11...
[000:00:00:01.191.075.771][Info] Available Video Adapters: 
[000:00:00:01.200.831.672][Info] 	Adapter 0: NVIDIA GeForce GTX 1050 Ti
[000:00:00:01.200.939.570][Info] 	  Dedicated VRAM: 4213178368
[000:00:00:01.200.971.159][Info] 	  Shared VRAM:    4234792960
[000:00:00:01.200.987.570][Info] 	  PCI ID:         10de:1c8c
[000:00:00:01.202.203.980][Info] 	  Driver Version: 27.21.14.6109
[000:00:00:01.202.837.417][Info] 	  output 0: pos={0, 0}, size={1920, 1080}, attached=true, refresh=60, name=
[000:00:00:01.202.885.827][Info] 	Adapter 1: Intel(R) HD Graphics 630
[000:00:00:01.202.897.724][Info] 	  Dedicated VRAM: 134217728
[000:00:00:01.202.906.750][Info] 	  Shared VRAM:    4234792960
[000:00:00:01.202.914.545][Info] 	  PCI ID:         8086:591b
[000:00:00:01.205.357.212][Info] 	  Driver Version: 22.20.16.4749
[000:00:00:01.220.072.295][Info] Loading up D3D11 on adapter NVIDIA GeForce GTX 1050 Ti (0)
[000:00:00:01.413.565.298][Info] D3D11 loaded successfully, feature level used: b000
[000:00:00:01.413.609.195][Info] DXGI increase maximum frame latency success
[000:00:00:01.413.640.375][Debug] set_priority: Failed to set process priority class: -1073741790
[000:00:00:01.413.653.913][Info] D3D11 GPU priority setup failed (not admin?)
[000:00:00:01.425.183.354][Debug] gs_effect_create_from_file: Null 'file' parameter
[000:00:00:01.425.295.764][Debug] gs_effect_create_from_file: Null 'file' parameter
[000:00:00:01.425.383.969][Debug] gs_effect_create_from_file: Null 'file' parameter
[000:00:00:01.425.490.636][Debug] gs_effect_create_from_file: Null 'file' parameter
[000:00:00:01.425.592.380][Debug] gs_effect_create_from_file: Null 'file' parameter
[000:00:00:01.425.677.303][Debug] gs_effect_create_from_file: Null 'file' parameter
[000:00:00:01.425.761.816][Debug] gs_effect_create_from_file: Null 'file' parameter
[000:00:00:01.425.844.277][Debug] gs_effect_create_from_file: Null 'file' parameter
[000:00:00:01.425.925.918][Debug] gs_effect_create_from_file: Null 'file' parameter
[000:00:00:01.426.017.816][Debug] gs_effect_create_from_file: Null 'file' parameter
[000:00:00:01.440.243.052][Info] Reset video failed with error: -1
[000:00:00:01.440.294.745][Info] Error returning now

This is my code

const initOBS = function () {
    console.debug('Initializing OBS...');
    // osn.NodeObs.IPC.host('obs-studio-node-example'); 
    osn.NodeObs.IPC.host(`obs-studio-node-example-${Date.now()}`);
    // osn.NodeObs.SetWorkingDirectory(path.join(__dirname, 'node_modules', 'obs-studio-node'));
    osn.NodeObs.SetWorkingDirectory(path.join(__dirname, "../../node_modules/obs-studio-node"));

    const obsDataPath = path.join(__dirname, 'osn-data'); 

    const initResult = osn.NodeObs.OBS_API_initAPI('en-US', obsDataPath, '1.0.0');
    console.log('initResult------------------------------------------------')
    console.log(initResult)

    if (initResult !== 0) {
        const errorReasons = {
            '-2': 'DirectX could not be found on your system. Please install the latest version of DirectX for your machine here <https://www.microsoft.com/en-us/download/details.aspx?id=35?> and try again.',
            '-5': 'Failed to initialize OBS. Your video drivers may be out of date, or Streamlabs OBS may not be supported on your system.',
        }

        const errorMessage = errorReasons[initResult.toString()] || `An unknown error #${initResult} was encountered while initializing OBS.`;

        console.error('OBS init failure', errorMessage);

        shutdown();

        throw Error(errorMessage);
    }

    osn.NodeObs.OBS_service_connectOutputSignals((signalInfo) => {
        signals.next(signalInfo);
    });

    console.debug('OBS initialized');

}

How are the monitors indexed?

When creating a video source via monitor capture, it seems that monitors are 0-indexed, but for each given index, I'm unable to figure out how to get any info on that monitor, such as its resolution.

An alternative solution may be to know how the monitors are indexed in the first place, since they don't seem to line up with the default indexing by, say, Electron.

Thanks!

libobs download on cmake build fails with 403 status code

[ 25%] Performing download step (download, verify and extract) for 'libobs-download'
-- Downloading...
dst='/mnt/dev/node/tests/obs/node_modules/@streamlabs/obs-studio-node/build/libobs-download/libobs-download-prefix/src/libobs--release-27.2.3.7z'
timeout='none'
inactivity timeout='none'
-- Using src='https://obsstudios3.streamlabs.com/libobs--release-27.2.3.7z'
CMake Error at libobs-download/libobs-download-prefix/src/libobs-download-stamp/download-libobs-download.cmake:170 (message):
Each download failed!

error: downloading 'https://obsstudios3.streamlabs.com/libobs--release-27.2.3.7z' failed
      status_code: 22
      status_string: "HTTP response code said error"
      log:
      --- LOG BEGIN ---
        Trying 104.16.144.22:443...

Connected to obsstudios3.streamlabs.com (104.16.144.22) port 443 (#0)

...

The requested URL returned error: 403

cmakejs.log
CMakeOutput.log

Not able to build 32 bit obs-studio-node with custom libobs

I am able to build 64bit obs-studio-node with custom OSN_LIBOBS_URL

But I am not able to build 32bit obs-studio-node with custom 32bit OSN_LIBOBS_URL
I followed following steps

First I built 32bit libobs using steps

  1. git clone --recursive https://github.com/stream-labs/obs-studio
  2. cd obs-studio
  3. mkdir build32
  4. cmake -G "Visual Studio 16 2019" -A Win32 -S . -B build32 -DDepsPath=C:\Users\alokm\Downloads\dependencies2019\win32 -DCMAKE_CONFIGURATION_TYPES=Release -DENABLE_UI=false -DENABLE_SCRIPTING=false
  5. cmake --build build32 --config Release
  6. cd .\build32\
  7. cpack -G TGZ
    I have got obs-studio/build32/obs-studio-x86-26.4.9-modified.tar.gz generated

I used this generated libobs for building obs-studio-node

  1. git clone https://github.com/stream-labs/obs-studio-node
  2. cd obs-studio-node
  3. mkdir build32
  4. cmake -G"Visual Studio 16 2019" -A Win32 -DOSN_LIBOBS_URL="C:/Users/alokm/tmp/streamlabs/obs-studio/build32/obs-studio-x86-26.4.9-modified.tar.gz" -B build32
  5. cmake --build build32 --config Release this step is giving linker error
util-crashmanager.obj : error LNK2019: unresolved external symbol "public: __thiscall base::FilePath::FilePath(void)" (??0FilePath@base@@QAE@XZ) re
ferenced in function "void __cdecl `dynamic initializer for 'db''(void)" (??__Edb@@YAXXZ) [C:\Users\alokm\tmp\streamlabs\obs-studio-node\build32\ob
s-studio-server\obs-studio-server.vcxproj]
util-crashmanager.obj : error LNK2019: unresolved external symbol "public: __thiscall base::FilePath::FilePath(class std::basic_string<wchar_t,stru
ct std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &)" (??0FilePath@base@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocat
or@_W@2@@std@@@Z) referenced in function "private: static bool __cdecl util::CrashManager::SetupCrashpad(void)" (?SetupCrashpad@CrashManager@util@@
CA_NXZ) [C:\Users\alokm\tmp\streamlabs\obs-studio-node\build32\obs-studio-server\obs-studio-server.vcxproj]
util-crashmanager.obj : error LNK2019: unresolved external symbol "public: __thiscall base::FilePath::~FilePath(void)" (??1FilePath@base@@QAE@XZ) r
eferenced in function "void __cdecl `dynamic atexit destructor for 'db''(void)" (??__Fdb@@YAXXZ) [C:\Users\alokm\tmp\streamlabs\obs-studio-node\bui
ld32\obs-studio-server\obs-studio-server.vcxproj]
util-crashmanager.obj : error LNK2019: unresolved external symbol "public: class base::FilePath & __thiscall base::FilePath::operator=(class base::
FilePath const &)" (??4FilePath@base@@QAEAAV01@ABV01@@Z) referenced in function "private: static bool __cdecl util::CrashManager::SetupCrashpad(voi
d)" (?SetupCrashpad@CrashManager@util@@CA_NXZ) [C:\Users\alokm\tmp\streamlabs\obs-studio-node\build32\obs-studio-server\obs-studio-server.vcxproj]
util-crashmanager.obj : error LNK2019: unresolved external symbol "public: static class std::unique_ptr<class crashpad::CrashReportDatabase,struct
std::default_delete<class crashpad::CrashReportDatabase> > __cdecl crashpad::CrashReportDatabase::Initialize(class base::FilePath const &)" (?Initi
alize@CrashReportDatabase@crashpad@@SA?AV?$unique_ptr@VCrashReportDatabase@crashpad@@U?$default_delete@VCrashReportDatabase@crashpad@@@std@@@std@@A
BVFilePath@base@@@Z) referenced in function "private: static bool __cdecl util::CrashManager::SetupCrashpad(void)" (?SetupCrashpad@CrashManager@uti
l@@CA_NXZ) [C:\Users\alokm\tmp\streamlabs\obs-studio-node\build32\obs-studio-server\obs-studio-server.vcxproj]
util-crashmanager.obj : error LNK2019: unresolved external symbol "public: __thiscall crashpad::CrashpadClient::CrashpadClient(void)" (??0CrashpadC
lient@crashpad@@QAE@XZ) referenced in function "void __cdecl `dynamic initializer for 'client''(void)" (??__Eclient@@YAXXZ) [C:\Users\alokm\tmp\str
eamlabs\obs-studio-node\build32\obs-studio-server\obs-studio-server.vcxproj]
util-crashmanager.obj : error LNK2019: unresolved external symbol "public: __thiscall crashpad::CrashpadClient::~CrashpadClient(void)" (??1Crashpad
Client@crashpad@@QAE@XZ) referenced in function "void __cdecl `dynamic atexit destructor for 'client''(void)" (??__Fclient@@YAXXZ) [C:\Users\alokm\
tmp\streamlabs\obs-studio-node\build32\obs-studio-server\obs-studio-server.vcxproj]
util-crashmanager.obj : error LNK2019: unresolved external symbol "public: bool __thiscall crashpad::CrashpadClient::StartHandler(class base::FileP
ath const &,class base::FilePath const &,class base::FilePath const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocat
or<char> > const &,class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<c
har,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class st
d::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>
> const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &,class std::vector<class std::basic_s
tring<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<cha
r>,class std::allocator<char> > > > const &,bool,bool)" (?StartHandler@CrashpadClient@crashpad@@QAE_NABVFilePath@base@@00ABV?$basic_string@DU?$char
_traits@D@std@@V?$allocator@D@2@@std@@ABV?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_t
raits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@6@ABV?$
vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@
@6@_N4@Z) referenced in function "private: static bool __cdecl util::CrashManager::SetupCrashpad(void)" (?SetupCrashpad@CrashManager@util@@CA_NXZ)
[C:\Users\alokm\tmp\streamlabs\obs-studio-node\build32\obs-studio-server\obs-studio-server.vcxproj]
util-crashmanager.obj : error LNK2019: unresolved external symbol "public: bool __thiscall crashpad::CrashpadClient::WaitForHandlerStart(unsigned i
nt)" (?WaitForHandlerStart@CrashpadClient@crashpad@@QAE_NI@Z) referenced in function "private: static bool __cdecl util::CrashManager::SetupCrashpa
d(void)" (?SetupCrashpad@CrashManager@util@@CA_NXZ) [C:\Users\alokm\tmp\streamlabs\obs-studio-node\build32\obs-studio-server\obs-studio-server.vcxp
roj]
util-crashmanager.obj : error LNK2019: unresolved external symbol "public: bool __thiscall crashpad::Settings::SetUploadsEnabled(bool)" (?SetUpload
sEnabled@Settings@crashpad@@QAE_N_N@Z) referenced in function "private: static bool __cdecl util::CrashManager::SetupCrashpad(void)" (?SetupCrashpa
d@CrashManager@util@@CA_NXZ) [C:\Users\alokm\tmp\streamlabs\obs-studio-node\build32\obs-studio-server\obs-studio-server.vcxproj]
C:\Users\alokm\tmp\streamlabs\obs-studio-node\build32\obs-studio-server\Release\obs32.exe : fatal error LNK1120: 10 unresolved externals [C:\Users\
alokm\tmp\streamlabs\obs-studio-node\build32\obs-studio-server\obs-studio-server.vcxproj]

What I am missing in case of 32bit building?

Build with recent version of NodeJS

Hi,
first of all it's a great library. Do you plan to update it so that it can be used with a more recent version of node and electron?
What I've tried so far:

  • I updated the package.json to use electron 8.0.0
  • I changed these lines to this:
SET(NODEJS_URL "https://nodejs.org/dist" CACHE STRING "Node.JS URL")
SET(NODEJS_NAME "node" CACHE STRING "Node.JS Name")
SET(NODEJS_VERSION "v13.7.0" CACHE STRING "Node.JS Version")

The download process works fine, the headers are found, too. The only problem is that when I build it with cmake, I get not only warnings, but also errors. I'm sure that they come because of the new v8 engines and all those breaking changes.

Is there any chance that this will be updated?

CMake fails to download the libobs archive

I am trying to build this library on Linux and when CMake downloads the libobs archive from the streamlabs server with this url it seems that the url doesn't exists. I know I can provide my own archive but I think that the broken url is non intended.

OSX/Linux Support

I'd love to use this library, but I need linux/osx support.

Are there plans for this to happen?

If it's not on the roadmap at the moment, could I get a rough estimate of how much work would entail? I'd love to help.

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.