I’m looking for a WebRTC streamer that would run as a PC service (no GUI). My PC app would call the service (via sockets) to stream and record a portion of our app screen. Can MediaSoup do this - or be programmed to? Thanks.
Mediasoup can be used to stream the things, however the way you capture the portion of your app screen’s stream is up to your application and this stream can the passed to mediasoup and user can view it based upon you requirements.
How many users can view this streamed video?
Initially, we only need a 1:1 share. Looking to keep this sockets between our app and a browser with no need for central servers.
For mediasoup you will need a server because it is SFU.
If your need is 1:1 then peer to peer methodology is the way to go using plain webrtc, this doesn’t need any servers.
Something simple like PeerJS will give you that 1:1 video sharing behaviour. I don’t see the need for an SFU like mediasoup.
Yes, but my app doesn’t do WebRTC and the libraries I’ve found are JS. I need to make my windows.exe app stream WebRTC. Rather than compile something in, I’d prefer to run a windows service and command it. Is MediaSoup a windows app? Specifically, my app shouldn’t require a browser to be running. I want a service, not a server.
No, mediasoup has its client side libraries available in js, c++. You can use c++ based library in your windows based application somehow.
But as you said you need 1:1 so mediaosup is not something that you need it is used where large audience is needed like a call of 1000 people. As it needs server so it is going to be costly as well based upon your need. You need peer to peer solution.
There will be many webrtc libraries out there to be used in windows based application. In which language your windows app is written?
Written in Java. I’d prefer a server as service because I’ll eventually expand to multi-user. Still trying to understand MediaSoup. Could I compile it into a headless server, wrap a socket protocol around it and have it broadcast a portion of my app’s screen on command?
When you say headless you mean the headless browser like chromium and using some libraries like puppeteer?
I want no browser; just a windows process that I can command. For example, I can run /windows/ffmpeg.exe as a background task, send it a start and stop command and have it record the screen. I’m looking to build a WebRTC server/service that runs independent of my app, but can be commanded in a similar way to stream using the WebRTC protocol.
In that case you will need mediasoup client to communicate to your mediasoup server. Now that mediasoup client is not officially available for java. What you can do is use the c++ based mediasoup client and if you can’t use it directly you may have to expose it’s methods to java via some bridge, no idea how. That’s the same process how mediasoup c++ client is used in android/ios.
Your server will use mediasoup server side library which is nodejs based. Which infact work in c++ under the hood.
Yes. That’s my original ask. My app source code should be irrelevant. I don’t want to compile them together for multiple reasons. My app will talk sockets to another standalone app - a custom MS. So, back to the original question: Can I wrapper a socket protocol around MS and have my app command it to stop/start streaming? When my app ends, it will send ‘exit’ to the local MS service.
Yes you can do that. Once you have your mediasoup app you can use it anyway you like.
The main challenge here will be how to pass stream from your app to this custom MS app.
So I have all the source to extend MS server side library and add a socket based comm protocol? My thought would then be to use electron or some compiler to make it a standalone exe. My app would then use it to broadcast. I understand that I’d need to do so for a portion of the screen, but does MS not have share parameters like desktop/app/screen? I would like to send a high level command like that and not have to produce the stream for it.
Mediasoup doesn’t have these parameters, it doesn’t know all this stuff it just needs stream from client side that stream is sent to server and server then distribute it in SFU way.
Didn’t you said initially that you don’t need a central server? mediasoup is all about central server