{"id":16991953,"url":"https://github.com/alectrocute/obs-studio-node-example-mac","last_synced_at":"2026-04-09T02:02:29.161Z","repository":{"id":106113440,"uuid":"392413385","full_name":"alectrocute/obs-studio-node-example-mac","owner":"alectrocute","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-03T18:19:43.000Z","size":1564,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-08T20:57:22.098Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alectrocute.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-03T18:16:55.000Z","updated_at":"2021-08-03T18:19:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"fa31536c-f3c5-4dd4-bfb4-5d586b25ea97","html_url":"https://github.com/alectrocute/obs-studio-node-example-mac","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alectrocute/obs-studio-node-example-mac","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alectrocute%2Fobs-studio-node-example-mac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alectrocute%2Fobs-studio-node-example-mac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alectrocute%2Fobs-studio-node-example-mac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alectrocute%2Fobs-studio-node-example-mac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alectrocute","download_url":"https://codeload.github.com/alectrocute/obs-studio-node-example-mac/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alectrocute%2Fobs-studio-node-example-mac/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31581864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T03:27:53.089Z","updated_at":"2026-04-09T02:02:29.144Z","avatar_url":"https://github.com/alectrocute.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Very simple example of [obs-studio-node] usage\n\nOut of the box it works only on Mac. This is where this fork differs.\n\n## Setup\n\n```\nyarn install\n```\n\n## Run\n\n```\nyarn start\n```\n\nor use `F5` in Visual Studio Code.\n\n## Package\n\n```\nyarn dist\n```\n\nYou find the generated installer in the dist folder.\n\n## Current state\n\n It launches, initializes OBS Studio and lets you press \"Start recording\" button. On recording it captures your desktop video, your webcam picture (if available), audio, and microphone to the video file in `Videos` folder in your user profile directory. Look at main process' console output.\n\n![Example application screenshot](./screenshot.png)\n\nSee [this topic](https://obsproject.com/forum/threads/laptop-black-screen-when-capturing-read-here-first.5965/) on how to solve black screen on laptops with two video cards.\n\n### Virtual Camera\nAfter clicking the `Install Plugin` and the `Start Virtual Camera` button, a new webcam will be available for you to use in any other program (like Zoom or Microsoft Teams).\n\nIt will output exactly the same content which is displayed in the preview, in this case, it's the screen recording and maybe your webcam.\n\nHowever, the webcam shows up as `Streamlabs OBS Virtual Camera` and we can't change the name for now (see [#44](https://github.com/Envek/obs-studio-node-example/issues/44)).\n\n## Code of interest\n\nMost of the interesting things are located in [`obsRecorder.js`](./obsRecorder.js). Some snippets are taken verbatim from [obs-studio-node] tests and [streamlabs-obs] source code, but some are results of experiments.\n\n## Documentation\nYou can find some basic documentation [here](https://github.com/hrueger/obs-studio-node-docs/blob/main/docs/index.md).\n\n## Run on MacOS\n\nChange link to [obs-studio-node] in your `package.json` to include version of package built for MacOS:\n\n```\n \"obs-studio-node\": \"https://s3-us-west-2.amazonaws.com/obsstudionodes3.streamlabs.com/osn-0.9.5-release-osx.tar.gz\",\n \"node-window-rendering\": \"https://slobs-node-window-rendering.s3-us-west-2.amazonaws.com/node-window-rendering-1.0.12-osx.tar.gz\"\n```\n\nTo get the latest url, clone [streamlabs-obs](https://github.com/stream-labs/streamlabs-obs), run `yarn install` and copy it from the output.\n\nExecute `yarn`:\n\n```sh\nyarn install\n```\n\nStart the app from a native terminal, not an integrated terminal like VSCode's.\n\n`node-window-rendering` is used to support preview for MacOS.\n\nThere are some known issues with MacOS: \n\n- obs64 process doesn't shutdown on app quit ([#22](https://github.com/Envek/obs-studio-node-example/issues/22))\n- errors in log files ([#18](https://github.com/Envek/obs-studio-node-example/issues/18))\n\nIf you can help with those, please fix them and open a pull request!\n\n## Use with your own build of [obs-studio-node]\n\n 1. Build it somewhere ([look at the docs first](https://github.com/stream-labs/obs-studio-node#building))\n\n    ```sh\n    git clone https://github.com/stream-labs/obs-studio-node.git\n    cd obs-studio-node\n    yarn install\n    git submodule update --init --recursive\n    mkdir build\n    cd build\n    cmake .. -G\"Visual Studio 15 2017\" -A x64 -DCMAKE_INSTALL_PREFIX=\"SOME_WRITABLE_PATH\"\n    cmake --build . --config Release\n    cpack -G TGZ\n    ```\n\n 2. Place path to it to `package.json`:\n\n    ```json\n    {\n        \"devDependencies\": {\n            \"obs-studio-node\": \"file://C:/where/you/cloned/obs-studio-node/build/obs-studio-node-0.3.21-win64.tar.gz\"\n        }\n    }\n\n 3. Install it to `node_modules/`\n\n    ```sh\n    yarn install\n    ```\n\n 4. Launch as usual:\n\n    ```\n    yarn start\n    ```\n\n## Misc\n\nOBS logs can be found in `osn-data\\node-obs\\logs`.\n\n## Tips and tricks\n\n### Change webcam resolution\n\n```js\nlet settings = obsCameraInput.settings;\nsettings['res_type'] = 1\nsettings['resolution'] = \"1920x1080\",\nobsCameraInput.update(settings);\nobsCameraInput.save();\n```\n\nSee [#31](https://github.com/Envek/obs-studio-node-example/issues/31) for details.\n\n## License\n\nAs [OBS Studio] itself is published under the terms of GNU GPL version 2, [obs-studio-node] and all application that are using it (including this example application) also have to be open-sourced and published under the terms of GNU GPL version 2 or compatible license. [Read more on tldrlegal.com](https://tldrlegal.com/license/gnu-general-public-license-v2).\n\n[obs-studio-node]: https://github.com/stream-labs/obs-studio-node \"libOBS (OBS Studio) for Node.JS, Electron and similar tools\"\n[streamlabs-obs]: https://github.com/stream-labs/streamlabs-obs \"Free and open source streaming software built on OBS and Electron\"\n[OBS Studio]: https://obsproject.com/ \"Open Broadcaster Software\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falectrocute%2Fobs-studio-node-example-mac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falectrocute%2Fobs-studio-node-example-mac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falectrocute%2Fobs-studio-node-example-mac/lists"}