go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

How to configure go2rtc as a ONVIF _server_?

Open theschles opened this issue 2 months ago • 3 comments

Hi all,

Using go2rtc 1.8.5 as port 1984 on a docker instance running on a Raspberry Pi 3. go2rtc works great with RTSP and HTTP streaming to tablets and to Home Assistant clients on my LAN (single subnet).

I’m now trying to get the Roku IP Camera Viewer Basic version to display a camera feed on my TV. As it requires a MJPEG-encoded feed, I configured the settings in the Roku camera app as:

IP: <IP of Raspberry Pi>
Port: 1984
URL: /stream.html?src=my_camera_instance&mode=mjpeg

Doesn’t work.

I also tried just:

IP: <IP of Raspberry Pi>
Port: 1984
URL: /stream.html?src=my_camera_instance

Again, nada nada.

That’s when I learned about ONVIF. If I’m RTFM’ing correctly, if the go2rtc server instance advertised as a ONVIF server (or at least had the right port open), the camera feeds on my go2rtc would be discoverable by the Roku camera app.

Right now, however, when I tell the Roku camera app to scan my network for ONVIF instances, it doesn’t detect anything.

Help?

theschles avatar Apr 09 '24 20:04 theschles

Your URL doesn't have stream name in src param. So them doesn't work. go2rtc doesn't provide ONVIF auto-discovery feature. ONVIF server runs at same port as Web API.

AlexxIT avatar Apr 10 '24 08:04 AlexxIT

Your URL doesn't have stream name in src param. So them doesn't work. go2rtc doesn't provide ONVIF auto-discovery feature. ONVIF server runs at same port as Web API.

Hi @AlexxIT -- apologies, because I didn't wrap the IP / Port / URL entries inside a code-block, the stuff I angle-bracketed didn't display.

Please re-review what I have above?

Thank you for your assistance!

theschles avatar Apr 10 '24 18:04 theschles

MJPEG will work for you only if source camera support it. Or if you setup transcoding via ffmpeg.

If your app support only MJPEG stream - html link won't work. It's only for browsers.

AlexxIT avatar Apr 10 '24 18:04 AlexxIT