Recording MediaStream server-side (with video and audio) from WebRTC to a file

Viewed 2275

I am designing an application which aim is to stream video (with audio) from camera (mobile application) and save it on the disk (on the the server). Everything with the communication between client and server is ok. I am using WebRTC. One of the peers is the server. I just met one problem. The object that I receive via the API is MediaStream. And now the question is how to save video (with sound) to a file from this MediaStream. I know I have to use fs.createWriteStream, but I don't know how to convert MediaStream to use the createWriteStream function. I am using wrtc for WebRTC API.

0 Answers
Related