How to "transcode" rtsp-stream to ONVIF in order to be readable by NVR?

mova

n3wb
Joined
Mar 29, 2018
Messages
27
Reaction score
3
Hello guys.
I have a setup with 10 Hikvision cams (DS-2CD2432F-I and DS-2CD2732F-I) (running 5.4.5) I'm trying to add a Vivotek NVR (ND9441P)instead of the badly functioning Hikvision NVR. The problem is that this Vivotek NVR cannot add those cams. I know mixing brands is not alway a good idea but we need the Vivotek NVR in order to flawlessly communicate with other sites running Vivotek. And those 10 Hikvision cams are still fully functional.

I've successfully setup other sites with Vivotek NVR's (ND8322P) and Hikvision cams (although newer modelsrunning 5.5.0)

My question is if it is possible to manually transcode say the rtsp-stream from the cams to an ONVIF compliant (and Vivotek-understandable) stream using ... anything... Raspberry Pi, PC, whatever?
This seems like a last resort before buying new cams. I can't for the life of me figure out how to add these cams to the Vivotek NVR. When adding cameras to the Vivotek NVR you only get the option of choosing ONVIF or Vivotek-protocol (see screenshot of working setup) so there's no direct option of choosing the rtsp-feed from the cameras.

Please point me in any direction. I'm kinda lost right now
 

Attachments

As an Amazon Associate IPCamTalk earns from qualifying purchases.

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,975
Reaction score
6,799
Location
Scotland
My question is if it is possible to manually transcode say the rtsp-stream from the cams to an ONVIF compliant (and Vivotek-understandable) stream using ... anything... Raspberry Pi, PC, whatever?
The Hikvision cameras are already ONVIF compliant - and even properly certified.
It's more likely that the Vivotek NVR isn't properly ONVIF compliant.

What error do you get when trying to add the Hikvision cameras as ONVIF?
If you're into techy stuff (the rpi mention ...) you might get some good clues if you capture the camera <--> NVR network traffic when you have done the ONVIF configuration, and power on the camera. You'd need 'port mirroring' to be able to do this.
It's been quite a while since I studied ONVIF network chat - but from what I recall, it was fairly easy to figure - certainly you should be able to spot any errors.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,681
Reaction score
14,043
Location
USA
ONVIF is built on the SOAP protocol so it is extremely verbose and inefficient but that might be a good thing if you're trying to analyze the traffic.
 

mova

n3wb
Joined
Mar 29, 2018
Messages
27
Reaction score
3
Thank you for your replies.
How will I go about port mirroring and analyzing the data the easiest way? I have a hikvision NVR and the vivotek NVR. Do I need a managed switch for this?
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,681
Reaction score
14,043
Location
USA
A managed switch is one of the easier ways. An old-fashioned network hub mirrors all traffic on all ports without any configuration so it can be handy to have one of those around too.
 

mova

n3wb
Joined
Mar 29, 2018
Messages
27
Reaction score
3
I think I figured it out. But I still don't understand how :)

I tried setting the Vivotek NVR and two Hikvision cams up with DHCP enabled. The cams are connected to the PoE ports of the Vivotek NVR. The NVR is connected to my router (192.168.1.1) on its LAN1 and got an IP of 192.168.1.114.
From the SADP tool on a PC also connected to one of the PoE ports I saw that the cams got the IPs 169.254.9.201 and 169.254.126.150
This confuses me as they're so different from the NVR IP. However when I added the cams on the NVR IT WORKED !

Now I'm gradually trying to disable DHCP one unit at a time which seems to work as long as I keep the IPs of the cams in the subnet of 169.254.xxx.xxx
This bothers me a bit because I'd eventually like the RTSP-streams to be visible on the home network (192.168.1.xxx)
What am I missing here?

See screenshots of NVR IP setup and a cam IP setup (working)

IMG_20180502_104157.jpg IMG_20180502_104429.jpg IMG_20180502_104157.jpg IMG_20180502_104429.jpg
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,975
Reaction score
6,799
Location
Scotland
From the SADP tool on a PC also connected to one of the PoE ports I saw that the cams got the IPs 169.254.9.201 and 169.254.126.150
This confuses me as they're so different from the NVR IP.
These are 'self-assigned' addresses due to DHCP being enabled but no DHCP server available to assign the settings.
It's normal for the IP addresses associated with the PoE ports on an NVR to be in a different address range than the range of the LAN interface.
Does the NVR network configuration show what IP address range is in use for the POE interface? Maybe the 'Net2' settings.

However when I added the cams on the NVR IT WORKED !
That does seem odd.
But one explanation could be that the NVR POE ports are actually also using the 169.254.x.x address range allocated to 'self-assigned' and with the cameras also now on that range, the ONVIF 'discovery' broadcasts and dialogue are working, and the cameras can properly inform the NVR of the needed RTSP URL as they do under the ONVIF protocol.
 

mova

n3wb
Joined
Mar 29, 2018
Messages
27
Reaction score
3
The NVR doesn't show any information about the IP address range in use. Not in any of the settings. I ended up using the 169.254.9.x just because it seemed to work.
This is not a problem... yet.
I'd like to eventually use the RTSP-feeds from some of the cameras on the 'home'-network (192.168.1.x) but the cameras are out of range from any user on that net.
Do you know of a way to set this up or forward traffic for this to work?
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,681
Reaction score
14,043
Location
USA
I could be way off but I am guessing the NVR's NET 2 interface refers to its private camera network (e.g. it is the NVR's PoE ports).

You might be able to use the cameras on 192.168.1.x if you connect one of the NVR's PoE ports to a switch or router that is part of your main network.

In theory.
 

mova

n3wb
Joined
Mar 29, 2018
Messages
27
Reaction score
3
Ahh that makes sense. Would i fuck things up if I make this PoE<->main network connection along with the existing LAN1 <-> main network connection or should I disconnect the LAN1 connection beforehand?
 

mova

n3wb
Joined
Mar 29, 2018
Messages
27
Reaction score
3
I think I found it!

From the manual:

In a single-subnet network managed by a gateway, you can configure the default gateway con- figuration on NET2. NET2 is interfaced with the onboard PoE ports, while NET1 is not. Con- nect NET2 to such network. NET1 will then be left unused.
 
Top