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

How to config an onvif camera with three streams #1410

Open
latel opened this issue Oct 25, 2024 · 12 comments
Open

How to config an onvif camera with three streams #1410

latel opened this issue Oct 25, 2024 · 12 comments
Labels
question Further information is requested

Comments

@latel
Copy link

latel commented Oct 25, 2024

log:
  level: debug

streams:
  Hikvision:
    - rtsp://admin:[email protected]:554/Streaming/Channels/101
    - rtsp://admin:[email protected]:554/Streaming/Channels/102
    - rtsp://admin:[email protected]:554/Streaming/Channels/103

how do I turn into something like this?

streams:
  Hikvision:
    - onvif://admin:[email protected]
@AlexxIT AlexxIT added the question Further information is requested label Oct 25, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Oct 25, 2024

Open WebUI > Add > ONVIF. Add your stream and check response.

@latel
Copy link
Author

latel commented Oct 25, 2024

image

the detected source format looks pretty wired.

@AlexxIT
Copy link
Owner

AlexxIT commented Oct 25, 2024

Add your link with user/pass to test line

@latel
Copy link
Author

latel commented Oct 29, 2024

If I have a camera with three streams, how can I add them to go2rtc and then integrate them into Scrypted? Typically, when I add my camera to Scrypted using ONVIF, all streams become available in the Scrypted camera settings(screenshots below), and Scrypted can switch to a different stream—such as a low-resolution one—when the network is not good. If I add the camera via go2rtc, should I define the three streams individually and then add them to Scrypted individually?

image image

@AlexxIT
Copy link
Owner

AlexxIT commented Oct 29, 2024

If you have one camera with different resolutions - you should add them to go2rtc as separate streams.
go2rtc doesn't have auto switch feature based on bandwidth.

@latel
Copy link
Author

latel commented Oct 29, 2024

Thank you for your guidance. One last question: After I connect the camera to go2rtc and then integrate it with other platforms like Scrypted or Home Assistant, can I still retain the two-way audio capability? As far as I know, this relies on the ONVIF protocol, and I noticed that go2rtc doesn’t support re-exposing as ONVIF, only supports RTSP.

@AlexxIT
Copy link
Owner

AlexxIT commented Oct 29, 2024

  1. In truth, you don't need ONVIF protocol support there. Two way works over RTSP protocol with backchannel support. But such a standard has no name. But ONVIF Profile T has a name.
  2. Go2rtc not support exposing RTSP with backchannel (yet).
  3. Go2rtc support exposing ONVIF.
  4. Home Assistant core doesn't support two way audio out of box (yet)
  5. You can add your camera to go2rtc AND to Scrypted simultaneously.

@latel
Copy link
Author

latel commented Oct 30, 2024

Therefore, the only solution seems to be option #5: adding my camera to both go2rtc and Scrypted simultaneously. However, this would double the load on my low-end camera, which only supports two streams at a time. For the NVR, I suppose two-way audio isn’t necessary, so I’ll have the NVR read the stream from go2rtc. But I’m wondering how I can pass through the camera’s built-in motion sensor to the NVR so that it records motion timestamps on the video timeline.

I hope go2rtc will support pass-through of two-way audio in the future.

@latel
Copy link
Author

latel commented Oct 31, 2024

And what's the meaning of define multiple rtsp address under the same stream source? It's not documented in the README.

streams:
  dahua_camera:
    - rtsp://admin:[email protected]/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
    - rtsp://admin:[email protected]/cam/realmonitor?channel=1&subtype=1

@AlexxIT
Copy link
Owner

AlexxIT commented Oct 31, 2024

@latel
Copy link
Author

latel commented Nov 5, 2024

3. Go2rtc support exposing ONVIF.

Does Go2RTC support exposing ONVIF with two-way audio? This would be a common feature request, especially if added to the Home Assistant dashboard with two-way audio capabilities.

@AlexxIT
Copy link
Owner

AlexxIT commented Nov 5, 2024

  1. As I said earlier - two way audio is not about ONVIF protocol. It's about RTSP protocol with backchannel.
  2. No, go2rtc not support exposing RTSP with backchannel yet.
  3. It has absolutely no effect on the Home Assistant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants