Anyone here write ONVIF code? How does Dahua request an ONVIF sub-stream profile?

Joined
Apr 29, 2023
Messages
5
Reaction score
6
Location
Canada
Here is my setup:

I have a Dahua NVR42A16-P16-4K-2SL NVR.
I have written my own firmware for an ESP32-CAM board and am now streaming to my NVR.

The problem:
In the Live view, if I click on the Camera button (in this example, Channel 8), I get the spinning circle of death and nothing happens.
ipcamtalk_1.jpg

If however I select from the drop-down menu and click on Main Profile, then the camera streams (that's another ESP32-CAM being programmed in case anyone is wondering.)

ipcamtalk_2.jpg

In my ONVIF response, I have only one profile called "main", and I don't particularly care what stream Dahua is asking for when it makes the GetProfile request; I just give it the only profile I have.

If I look under Encoding for that camera, I see only one profile - the one I gave it. So why is it trying to play a substream when I click the channel button if it knows the camera supplies only one profile?

ipcamtalk_3.jpg

I tried creating a second profile called "sub", but strangely Dahua made it appear as a second camera. I removed the profile and added a second encoder to the "main" profile, but Dahua never requests it, and this is where I am stuck.

Have any of you implemented ONVIF, and if so, would you happen to have a log of the SOAP calls between a properly implemented ONVIF camera that I could use as reference?

I'm looking for insight into how to provide a sub-stream that will be recognized by Dahua, but of the ONVIF docs and examples I've found online, they typically don't provide two streams.


Torin...
 

Attachments

horseflesh

Getting the hang of it
Joined
Jan 3, 2016
Messages
261
Reaction score
33
I recently set up an ESP32 camera for the first time... Lots of fun... but I immediately realized that ONVIF support would make it much more useful.

Did you ever figure out your ESP32 ONVIF problem?

If you're willing to share your code I would be happy to see how my LTS (Hikvision OEM) NVR likes it.
 
Top