k-yle / rtsp-relay

📽 View an RTSP stream in your web browser using an express.js server
https://npm.im/rtsp-relay
MIT License
312 stars 58 forks source link

FPS has been dropped when creating multiple streaming #33

Open hongson23 opened 3 years ago

hongson23 commented 3 years ago

hello @k-yle,

When I have created 1 streaming this module works fine but fps have been dropped if we have the number of streaming video > 2. Fps become more and more "drop out" when I added the number of streaming Could you please check it ? thanks

k-yle commented 3 years ago

Hi, this is expected. Every extra stream means more data is being transmitted over the network, and there is only a finite amount of bandwidth.

jernaumorat commented 2 years ago

Is there any way to optimise this that you know of? I have a usecase where I need 12+ streams active at once, and even low-quality streams start to tank the render. I understand that video processing is difficult, but is there a way you can conceive to swap out jsmpeg for a wasm decoder that leverages GPU? (I'm not too familiar with jsmpeg, it could well do this already)

Bandwidth in my case is definitely not a concern, as there are gigabit links between the client/local server and all rtsp cameras.

k-yle commented 2 years ago

hey @jernaumorat, my understanding is that jsmpeg already uses wasm if possible, and there aren't any viable alternatives to jsmpeg, but I'm open to suggestions. I realise this isn't very helpful, sorry.

fullmooooon commented 1 month ago

Creating separate JSMpeg objects allows playing multiple RTSP videos on the page. https://github.com/k-yle/rtsp-relay/issues/271