Tuesday, 4 April 2017

Send webcam stream to server using node JS over UDP protocol

Currently trying to develop a video call application with electron. As electron is basically the whole node js in the javaScript runtime so I am wondering is it possible to to stream live video from users webcam using node js to a server using UDP protocol.

I think from the webcam stream I have to generate udp packets of limited length (e.g. max udp packet size is 65,507 bytes) and send to server from where it can be sent to the destination client.

My problem is if that's the way I mentioned above how can I do that. To be specific how can I generate Udp packets with the stream from webcam and as well as how can I receieve those packets in node js form an udp server and show live call video to the user.

P.S. as i have already established server I have to implement it in udp protocol and using webRTC is not an option for me due to some unavoidable circumstances.

I studied node dgram package and set up a simple broadcast server and client but I was only able to send string message to the client but couldn't find a way to chunk a large video file into udp packets to transfer through network and receive on other end.



via Ishrak Imam

No comments:

Post a Comment