mediasoup-server
WebRTC SFU mediasoup implementation
-
Optional RTSP server to play the streams.
-
Optional ffmpeg recorder to media file or publish to RTMP media server.
-
Mediasoup GitHub https://github.com/ibc/mediasoup
-
Mediasoup Web site https://mediasoup.org
Installation
How to use library
Install NPM modules
Python 2, make, g++ or clang are required for installing mediasoup.
$ npm install mediasoup-server
Run WebRTC server
const WebRtcServer = WebRtcServer; const hostname = oshostname; const webRtcServer = ;webRtcServer;
Run RTSP server
const RtspServer = RtspServer; const rtspServer = webRtcServer;rtspServer;
Record to disc
const rtspServer = webRtcServer;rtspServer;
Publish to RTMP server
const rtspServer = webRtcServer;rtspServer;
How to use example
Git clone
git clone https://github.com/tan-tan-kanarek/mediasoup-server.git
cd mediasoup-server/
Install NPM modules
Python 2, make, g++ or clang are required for installing mediasoup.
$ npm install
Run server example
$ node example
or
$ npm start
access with borwser
- Open http://localhost:3888/.
- Set room name and click [Join] button
TODO
Server
- Execute ffmpeg remotely (send message to different server to execute ffmpeg)
- To support scalability and redundancy, hold list of rooms in all servers and redirect socket.io commands to the server that handles the room, SDPs should be generated on the server that holds the room.
Client
- Rejoin room when socket.io reconnected.
- Accept new room created event.