kyriesent / node-rtsp-stream

Stream any RTSP stream and output to websocket for consumption by jsmpeg (https://github.com/phoboslab/jsmpeg). HTML5 streaming video! Requires ffmpeg.
MIT License
451 stars 166 forks source link

Possible to support multiple video streaming? #45

Closed sandeepipatel86 closed 4 years ago

sandeepipatel86 commented 4 years ago

The current code work absolutely great for streaming single video camera. For adding new camera, I have to run a new server i.e. I have to copy the script, update the RTSP link and port in it and then start the new server.

Is there any way where a single script will allow for streaming multiple cameras? That is I can use the same port number for streaming the video/camera of user's choice.

I have already made the changes to this script to make it stream only when a client is connected and stop the stream when no one is connected. Have also made it SSL enabled.

Have also made the changes to be able to pass the RTSP link when connecting to the socket but now I am just not able to make it stream. It always stream the first RTSP link.

Any suggestion on how to do this?

gabrielcavalari commented 4 years ago

Take a look to this implementation for SSL (https://github.com/kyriesent/node-rtsp-stream/issues/37#issuecomment-557012760) I think it will also work for your problem.

kyriesent commented 4 years ago

Thanks @gabrielcavalari!