Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use node to relay RTSP stream and decode it with SFMediaStream? #28

Open
Leone25 opened this issue Jul 14, 2022 · 2 comments
Open

Use node to relay RTSP stream and decode it with SFMediaStream? #28

Leone25 opened this issue Jul 14, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@Leone25
Copy link

Leone25 commented Jul 14, 2022

Hello,

is there anyway to use the node server to "proxy" a RTSP stream to the browser trough websocket and then use SFMediaStream to decode and display it?

I saw yeellowstone which might be used to connect to the RTSP server, but I'm not sure how to transform the data to something that SFMediaStream would be able to understand.

Thank you in advance

Rico

@StefansArya
Copy link
Member

Hi,
Sadly I also not sure it will work or not, but it's quite interesting feature to be added.
Especially if we can use raw TCP or UDP (still an unofficial draft), we may no longer need to create a proxy.

I also think it's better to find something like RTSP to WebRTC 🤔
and then just play the stream into <audio> or <video>

like rtsp-relay, RTSPtoWebRTC or RTSPtoWSMP4f

after it's playable on the browser, we can do further processing with this library

@Leone25
Copy link
Author

Leone25 commented Jul 15, 2022

Well I've been trying to avoid WebRTC as it's a pain to set up a TURN server, plus I don't need the scalability.

I did look into RTSPtoWSMP4f, and it works but it's very unstable, plus it's in golang and I'm not the best at it.
I looked into rtsp-relay too, but it uses ffmpeg in the backend to convert the video and 1. requires a decent server to run, especially if I want to run a couple of video feeds in parallel 2. looses a lot of quality in the process.

What I was thinking rather than handling the RTSP protocol frontend, is to actually let the node js server take care of it, and only send the video data trough the websocket then pass that to SFMediaStream.
I hope that makes sense

@StefansArya StefansArya added the enhancement New feature or request label Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants