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
7.17k stars 514 forks source link

Allow to add go2rtc as a network camera in Windows #1290

Open felipecrs opened 3 months ago

felipecrs commented 3 months ago

Windows has this feature of network cameras:

image

It would be amazing if Windows could recognize go2rtc as a network camera.

But that would require go2rtc to implement the ONVIF WS-Discovery protocol:

https://learn.microsoft.com/en-us/windows-hardware/drivers/stream/network-cameras#discovery

Do you think that would be possible?

My use case is very niche:

When running Microsoft Teams under Azure Virtual Desktop, it will only recognize cameras that are "physically" connected to the client computer and not virtual cameras like OBS Studio or NVIDIA Broadcast.

With go2rtc running on Windows, I can input the camera with ffmpeg, and then if I was able to add go2rtc back to Windows as a network camera, I would be able to use it in Teams.

felipecrs commented 3 months ago

Another nice use case would be to allow using any arbitrary camera from go2rtc, like cameras plugged in a different computer, in any video conferencing application like Teams or Zoom.

memphisdj commented 3 months ago

I too am interested in having go2rtc act as ONVIF compliant source and to expose the streams in it over ONVIF. My use case is to add a stream from go2rtc into Hikvision DVR, which allows only ONVIF IP Cameras to be added.

AlexxIT commented 3 months ago

ONVIF server supported long time ago

memphisdj commented 3 months ago

ONVIF server supported long time ago

Actually if that is the case, can i achieve the following IP Cam -> Go2rtc -> Hikvision DVR

I didnt find any documentation around this.

felipecrs commented 3 months ago

https://github.com/AlexxIT/go2rtc?tab=readme-ov-file#source-onvif:~:text=to%20go2rtc%20config-,Hass%20%3E%20Settings,-%3E%20Integrations%20%3E%20Add%20Integration

memphisdj commented 3 months ago

https://github.com/AlexxIT/go2rtc?tab=readme-ov-file#source-onvif:~:text=to%20go2rtc%20config-,Hass%20%3E%20Settings,-%3E%20Integrations%20%3E%20Add%20Integration

In first place sorry for hijacking your issue, but the doc you linked is if i would like to interogate my camera from go2rtc through onvif. That is not what i want. I mean each camera in go2rtc to be able to be added to another device as onvif source for it. As pictured above: IP Cam already in go2rtc -> go2rtc exposing its stream info as onvif source -> Hikvision DVR (or any device for that matter).

felipecrs commented 3 months ago

Ops, sorry, wrong link. I meant this:

https://github.com/AlexxIT/go2rtc?tab=readme-ov-file#module-hass

image

AlexxIT commented 3 months ago

Yes. This is not documented feature. It should be in the Module: ONVIF section. This feature works out of box and doesn't have additional settings.

memphisdj commented 3 months ago

Hi, thanks for pointing to the doc.

I played around a bit, had to setup rtsp auth in go2rtc, because the dvr requires it. I changed the log level of go2rtc to debug and this is what i get:

5:20:22.026 PM | debug | [onvif] unsupported request:<?xml version="1.0" encoding="UTF-8" ?>admin</wsse:Username>Um609QzCBAdQrPJW7tpEUSLWThk=</wsse:Password>UvUznxjrT3Gzx/dn6i5jwA==</wsse:Nonce>2024-08-07T14:20:22Z</wsu:Created></wsse:UsernameToken></wsse:Security></soap:Header>Manual</tds:DateTimeType>true</tds:DaylightSavings>EET-2</tt:TZ></tds:TimeZone>15</tt:Hour>20</tt:Minute>21</tt:Second></tt:Time>2024</tt:Year>8</tt:Month>7</tt:Day></tt:Date></tds:UTCDateTime></tds:SetSystemDateAndTime></soap:Body></soap:Envelope>

5:20:22.029 PM | debug | [onvif] unsupported request:<?xml version="1.0" encoding="UTF-8" ?>admin</wsse:Username>kl8mDmQUrD7NX4Rk3+zG5WC2klI=</wsse:Password>JH1pGhe0QPe3Gc+NteqOOg==</wsse:Nonce>2024-08-07T15:20:20Z</wsu:Created></wsse:UsernameToken></wsse:Security></soap:Header>false</tds:IncludeCapability></tds:GetServices></soap:Body></soap:Envelope>

felipecrs commented 3 months ago

@memphisdj please open a separate issue.

memphisdj commented 3 months ago

Done, totally fair, sorry !

bleedinge commented 2 weeks ago

Also looking for a way to use a go2rtc camera in MS Teams and other camera solutions. Any plans in the near future to get this feature in?

AlexxIT commented 2 weeks ago

There are plans. But I wouldn't describe them as a near future.

bleedinge commented 2 weeks ago

Thanks for answering. I'm ok if "near future" happens in the coming months.