nwjs / nw.js

Call all Node.js modules directly from DOM/WebWorker and enable a new way of writing applications with all Web technologies.
https://nwjs.io
MIT License
40.39k stars 3.88k forks source link

Open Broadcaster Software, OBS Studio can we embed in NodeWebKit? to kick streaming world? #5549

Open shamun opened 7 years ago

shamun commented 7 years ago

https://obsproject.com/

img

Maybe we should embed the OBS in NodeWebkit (as silent mode) and avoid all messed up settings all the people are doing with it and make NodeWebkit command line to execute OBS?

rogerwang commented 7 years ago

By "embedding" do you mean NW should support OBS capturing via their browser plugin?

btw, we have renamed NW.js from node-webkit.

shamun commented 7 years ago

I was thinking can we not go straight into there C++ API? and fork at-least one version (current version is very stable, often they dont maintain the API and later becomes unstable)

Or

maybe have NW.js natively communication with OBS via hotkeys? They had hotkeys stable for a very long time, f we execute nw.exe obs start via command line it start recording via OBS silently nw.exe obs stop it stop recording silently. Then at-least anyone who have NW.js and OBS installed can fully get benefit in silent use projects.

snap

EDIT: FYI. better to fork some of OBS in NW.js, because the popularity of OBS is growing, and giant Youtube and other giants are involved with OBS for there core business, maybe later it will stop keeping all the freedom that it now have.

hthetiot commented 7 years ago

Check obs-browser source, It basically integrate CEF (Chrome Embedded Framework).

For example, Crosswalk an alternative webview for android and desktop used CEF and a bridged using IPC (Inter-process communication) to Node.JS.

Another alternative is to create a Node.js module that wrap OBS lib. Same you will need IPC anyway (renderer vs main), if you want to integrate with NW.js or electron to manage the mapping of data from main to renderer stream with obs lib.

shamun commented 7 years ago

I think our goal should be as following:

1 - our users installed NW.js (OBS will be available natively) 2 - user put streaming server information in package.json or in our NW.js javascript 3 - within javascript user simply push button to navigate silent OBS (such as start record or start stream, stop record or stop stream)

4 - using NW.js thirdparty java, python, lua coders can also use OBS. Instead of Hotkeys we allow a bypass to OBS via NW.js for example:

$java_python_coders_cli> nw.exe "obs -record_start"
$java_python_coders_cli> nw.exe "obs -record_stop"

EDIT FYI: In this way we can maintain the OBS source code in NW.js when OBS release new patches or so?

hthetiot commented 7 years ago

@shama This is monkey patch not proper integration.