AlexxIT / go2rtc

Ultimate camera streaming application with support RTSP, RTMP, HTTP-FLV, WebRTC, MSE, HLS, MP4, MJPEG, HomeKit, FFmpeg, etc.
https://github.com/AlexxIT/Blog
MIT License
3.77k stars 307 forks source link

Best format to stream RTSP into web browser #946

Open thewh1teagle opened 4 months ago

thewh1teagle commented 4 months ago

I have h.264/5 rtsp stream on my local network from my security camera. I would like to view it in my web browser. Since the web browser doesn't support raw rtsp stream, I need solution for streaming it into the browser. I'm looking for the fastest way to stream it, I don't mind running anything on the receiver PC but eventually the goal is to view it in the browser.

I tried to use WebRTC, but it has a little delay and slow startup. Is there a good solution for that? maybe transcode it into mjpeg? (possible with go2rtc?)

Barabba11 commented 4 months ago

Hi mate, I have the same problem, I?m glad there is existing go2rtc but I don't understand how to use it. I need to put something inside go2rtc.yaml but what exactly? Looking the examples I found (not many) there are a lot of stuff I don't need at all. WHat I need is: open the camera stream rtsp://user:password@ipaddress:port/path/streamname.spd create a web browser on default port 80 with video stream fullscreen/maximized (I suppose WebRTC is the best option) type on my phone's browser "http://localIPofserverrunninggo2rtc/index.html". How to get it? Thank you a lot!

AlexxIT commented 4 months ago

Here you can see latency https://github.com/AlexxIT/go2rtc#codecs-madness WebRTC has best possible latency. MJPEG also OK, but it is proto from a previous century.

Barabba11 commented 4 months ago

I'm looking for go2rtc.yaml which can suite my needs, I hope somebody can help me, thanks!

Barabba11 commented 4 months ago

I have h.264/5 rtsp stream on my local network from my security camera. I would like to view it in my web browser. Since the web browser doesn't support raw rtsp stream, I need solution for streaming it into the browser. I'm looking for the fastest way to stream it, I don't mind running anything on the receiver PC but eventually the goal is to view it in the browser.

I tried to use WebRTC, but it has a little delay and slow startup. Is there a good solution for that? maybe transcode it into mjpeg? (possible with go2rtc?)

Hi, may you please post here your go2rtc.yaml file? Thank you a lot!

Barabba11 commented 4 months ago

I've succeed, for who can be interested here is my solution: https://github.com/AlexxIT/go2rtc/issues/954#issuecomment-1957995617