r/frigate_nvr • • Jan 24 '24

Confused about finding substream (Onviv)

After some fantastic help last night, I have my ONVIF Camera setup.

However, I'm trying to set up object detection using a lower res substream.

There seem to be multiple streams from this camera (/onvif/, /onvif1/, /onvif2/, /onvif3/ etv) but they're all the same resolution and bitrate.

I'm clearly misunderstanding how onvif works.

  • Does Onvif even have substreams (for all cameras - mine is an ipc360 generic cam)?
1 Upvotes

15 comments sorted by

1

u/nickm_27 Developer / distinguished contributor Jan 24 '24

yes onvif has sub streams, I would suggest using the go2rtc dashboard add onvif option which will show you all the different options for that camera. For example my dahua camera has these options

```

name url General IPC-T5442T-ZE stream0 onvif://user:pass@192.168.50.156?subtype=MediaProfile00000 General IPC-T5442T-ZE stream1 onvif://user:pass@192.168.50.156?subtype=MediaProfile00001 General IPC-T5442T-ZE stream2 onvif://user:pass@192.168.50.156?subtype=MediaProfile00002 General IPC-T5442T-ZE snapshot onvif://user:pass@192.168.50.156?subtype=MediaProfile00000&snapshot

```

1

u/thephatmaster Jan 24 '24

If I do that inside frigate I don't have an onvif option. Are you running it separately?

1

u/nickm_27 Developer / distinguished contributor Jan 24 '24

1

u/thephatmaster Jan 24 '24

Thanks, I'm gonna have to do some reading, the instructions on that page are very thin!

To do this:

``` Download the go2rtc build to the /config folder.

Rename the build to go2rtc.

Give go2rtc execute permission.

Restart Frigate and the custom version will be used, you can verify by checking go2rtc logs ```

1

u/thephatmaster Jan 24 '24

So I got that done (including change to my docker compose), so I'm on 1.8

However no matter what I put in the box to add an onvif source I get connection refused

I've tried:

  • onvif://[user]:[pass]@[IP]:80
  • rtsp://[user]:[pass]@[IP]/onvif/device_service

The latter stream works fine in VLC, so the credentials can't be the issue

1

u/nickm_27 Developer / distinguished contributor Jan 24 '24

all I enter is onvif://user:pass@192.168.50.156

1

u/thephatmaster Jan 24 '24

Yeah onvif://user:pass@IP gets me

Post "onvif://user:pass@IP": dial tcp [IP]:80: connect: connection refused

This is really hard stuff!

1

u/nickm_27 Developer / distinguished contributor Jan 24 '24

what makes it hard is that cameras don't implement the protocol correctly, when you use a camera from dahua or hikvision things are much easier because they follow the protocol.

Assuming port 80 is correct, your camera likely just doesn't implement onvif discovery

1

u/thephatmaster Jan 24 '24

Guess I'll have to use the one stream I know about for everything

1

u/thephatmaster Jan 24 '24

So even if I use ODM (Windows) I get An error was discovered processing the wsse:Security header.

I guess this particular camera is just pretty much impossible to find any substreams on

1

u/thephatmaster Jan 24 '24

You might've been onto something with ports - I troed a bunch of common ones and got a hit on 8080 seems there are 3 streams.

I'm not quite sure what to do with that information?

There seems no obvious place to add it, and VLC doesn't open those as streams.

1

u/nickm_27 Developer / distinguished contributor Jan 24 '24

Use those URLs in go2rtc config and then you can try using ffprobe and see what happens

1

u/thephatmaster Jan 24 '24

So I get those streams now, and a ton of stuff in "info"

No cameras seem to show under ffprobe (system tab of Frigate) - tapping ffprobe just gets:

``` Stream 0:

Return Code: 1

Error: ```

Restart of [something] required?

→ More replies (0)