How to record WebRTC video/audio session on server side?
Asked Answered
T

2

7

I am creating a web app using WebRTC where I need to record and save every session on server so that other user can access later. I do not want to record on client side for which solution is available. What is the best way to do that. Is there any solution already out there.

Trehala answered 13/9, 2015 at 7:48 Comment(0)
S
5

You should be using a WebRTC media server for that. Kurento Media Server is one of the possibilities you have. There are several examples on Kurento GitHub repositories for recording server side. Probably the most simple one is the recording with generators one.

Spaniard answered 14/9, 2015 at 6:53 Comment(0)
C
0

You can implement websocket support on the server side and just stream from client to server via websocket channel.

It is reasonable to use binary mode on the websocket channel. So, on the client side it would look like the following:

var stream_ws = new WebSocket('ws://localhost/ws');
stream_ws.binaryType = 'arraybuffer';
stream_ws.send(streambuffer);

The streambuffer variable is a ArrayBuffer object that contains data you get from MediaRecorder. On the server side you can save the stream to disk.

Chemoreceptor answered 13/9, 2015 at 10:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.