Unable to RTSP stream with my Hikvision cameras

Joined
Nov 15, 2021
Messages
18
Reaction score
4
Location
Australia
I was using Ffmpeg with Homebridge to have my cameras connected via RTSP. The typical stream was rtsp:/name:password@ipaddress:554/Streaming/channels/102. I have been using this for a really long time. Beforehand, I had my IP cameras connected to a network switch, which was then connected to my DVR. Now I have placed my IP cameras directly into the back of the DVR and set back up the cameras, so the DVR runs it all. The issue now is, I cannot get the RTSP stream to work (Wondering if this is why I used a switch in the 1st place). I have configured to Custom Protocols, but still fails to work. I do not know what to try. I will post screenshots of the setup for any details you will need.

I moved from the Network switch back to the DVR because when I would access the camera on the Hik-Connect application, it would appear to take forever to load. Now they are all directly connected, they load in a second on the app, but now I can't connect for HomeKit through Ffmpeg via Homebridge. It has something to do with my rtsp stream or connection, I just need help locating it. I definately know it is my network or settings because I cannot even get it to work on Network Stream via VLC, Thanks.
 

Attachments

TonyR

IPCT Contributor
Joined
Jul 15, 2014
Messages
16,851
Reaction score
39,209
Location
Alabama
Beforehand, I had my IP cameras connected to a network switch, which was then connected to my DVR. Now I have placed my IP cameras directly into the back of the DVR and set back up the cameras, so the DVR runs it all.
When you moved cams from a switch to the back of the NVR (assuming its a POE NVR), didn't your cam IP's change to a different subnet because of the NVR's virtual server?


EDIT: Also, in the image where you attempt to stream to VLC, what is the IP of the computer that VLC is running on?
 
Last edited:

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,970
Reaction score
6,795
Location
Scotland
By default - the cameras on a Hikvision NVR PoE port are not directly accessible using their native 192.168.254.x IP address.
Although there is a fairly straightforward way to enable this access.

But what might be easier for your use case would be to access the camera RTSP stream that's provided from the NVR itself.
Just replace the camera IP address with the NVR IP address, and use the same URL format, for example
rtsp:/name:password@NVR_ipaddress:554/Streaming/channels/401
for the main stream of camera number 4.
 
Joined
Nov 15, 2021
Messages
18
Reaction score
4
Location
Australia
When you moved cams from a switch to the back of the NVR (assuming its a POE NVR), didn't your cam IP's change to a different subnet because of the NVR's virtual server?


EDIT: Also, in the image where you attempt to stream to VLC, what is the IP of the computer that VLC is running on?
All my devices us the same Subnet which is 255.255.255.0. The IP address of the PC I am working on is 192.168.0.71. I have attached a screenshot of my DVR Network screen for you. Thanks1638065192061.png
 

TonyR

IPCT Contributor
Joined
Jul 15, 2014
Messages
16,851
Reaction score
39,209
Location
Alabama
All my devices us the same Subnet which is 255.255.255.0.
That's the "subnet mask" or "netmask".
The IP address of the PC I am working on is 192.168.0.71.
That's what I was looking for.
If that's the IP of the PC running VLC then it can't open the stream as in your 4th image, at 192.168.254.14, in a different network segment.
 
Last edited:
Joined
Nov 15, 2021
Messages
18
Reaction score
4
Location
Australia
By default - the cameras on a Hikvision NVR PoE port are not directly accessible using their native 192.168.254.x IP address.
Although there is a fairly straightforward way to enable this access.

But what might be easier for your use case would be to access the camera RTSP stream that's provided from the NVR itself.
Just replace the camera IP address with the NVR IP address, and use the same URL format, for example
rtsp:/name:password@NVR_ipaddress:554/Streaming/channels/401
for the main stream of camera number 4.
I have tried that and strangely, I am not getting any kind of response from VLC. I am thinking it might be a good idea to factory reset it and setup again. I'm wondering if there might be some conflictions that we cannot see. I don't remember it being this difficult to setup originally.
 
Joined
Nov 15, 2021
Messages
18
Reaction score
4
Location
Australia
That's the "subnet mask" or "netmask".

That's what I was looking for.
If that's the IP of the PC running VLC than it can't open the stream as in your 4th image, at 192.168.254.14, in a different network segment.
Oh ok. How do I fix this then ?
 
Joined
Nov 15, 2021
Messages
18
Reaction score
4
Location
Australia
Could this Hikvision ( nightowl) Dvr stream string be of any use ? View attachment 109985
Unfortunately no. We have narrowed down the issue, I just need the solution to solve it. I will be doing some tests shortly. I believe I'm going to need to manually configure the cameras individually. I have done that with a network switch, not sure how good it will work within the DVR.
 
Joined
Nov 15, 2021
Messages
18
Reaction score
4
Location
Australia
I have done the reset. My DVR IP has changed and the IP cameras. I did attempt to manually adjust the IP addresses of 2 cameras and the system don't like it. I think I might need to initialise the cameras using SADP, but cannot do that while they are connected the DVR. I am looking up some alternative ways to use SADP, so I can assign the cameras IP before they are added to the DVR, but my worry is that the moment I reconnect them to the DVR, it will just reassign the IP addresses.
 

Attachments

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,970
Reaction score
6,795
Location
Scotland
I have tried that and strangely, I am not getting any kind of response from VLC
That URL should work OK on the NVR.
What model is it?
Depending on the model and firmware version, you might have to enable RTSP under Advanced Network settings.
For example :
1638096414665.png


Alternative - you should be able to access the attached cameras directly with a couple of network settings, for example :
 
Joined
Nov 15, 2021
Messages
18
Reaction score
4
Location
Australia
That URL should work OK on the NVR.
What model is it?
Depending on the model and firmware version, you might have to enable RTSP under Advanced Network settings.
For example :
View attachment 109997


Alternative - you should be able to access the attached cameras directly with a couple of network settings, for example :
So far so good. I can see individual networks. Everything seems to be set as the post explained. I do have RTSP streams working again. There is just one small issue. I am not able to edit any of the Video settings. I need to set it so it is in H.264, otherwise Ffmpeg don't like it and there is no way for me to save any adjusted Video settings. Do I need to specifiy it in the steam path? How would I do that if that is correct? Also thank you for being a huge help today.

Edit: There appears to be an issue. I am not able to add it on the Hik-Connect App. The Platform access screen shows it to be offline. After some testing, I found that I could add it manually via the IP address, but it adds all 6 cameras, but only 1 of them is working. The others show Error Code 91. (My Head Hurts) :banghead:
 

Attachments

Last edited:

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,970
Reaction score
6,795
Location
Scotland
I do have RTSP streams working again.
Was this by enabling RTSP in the NVR web GUI?
Or by changing the NVR PoE channel configuration and adding the static route?

I am not able to edit any of the Video settings. I need to set it so it is in H.264
How? When accessing the camera web GUI via the NVR 'Virtual Host'? Using the 'Connect' column in 'Camera Configuration' of the NVR web GUI.
 
Joined
Nov 15, 2021
Messages
18
Reaction score
4
Location
Australia
Was this by enabling RTSP in the NVR web GUI?
Or by changing the NVR PoE channel configuration and adding the static route?


How? When accessing the camera web GUI via the NVR 'Virtual Host'? Using the 'Connect' column in 'Camera Configuration' of the NVR web GUI.
I followed the link you provided and it worked. I then added the rtsp stream url into the custom protocol section. It does work on VLC. The video settings I need to adjust are in the Video/Audio section on the DVR. But I cannot edit much settings for the video parameters on the DVR. The RTSP setting did not need to be enabled, I already had that set. I could only get it to work via the link you gave me.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,970
Reaction score
6,795
Location
Scotland
I followed the link you provided and it worked.
That's good.
Was the initial problem because the forum software mangles such links slightly, like removing one of the double forward-slashes?
We're kinduv used to that and forget to mention it.

The video settings I need to adjust are in the Video/Audio section on the DVR. But I cannot edit much settings for the video parameters on the DVR.
For an IP camera connected to an NVR, it's best to edit the configuration in the camera web GUI (via Virtual Host) as opposed to the NVR web GUI.
 
Joined
Nov 15, 2021
Messages
18
Reaction score
4
Location
Australia
That's good.
Was the initial problem because the forum software mangles such links slightly, like removing one of the double forward-slashes?
We're kinduv used to that and forget to mention it.


For an IP camera connected to an NVR, it's best to edit the configuration in the camera web GUI (via Virtual Host) as opposed to the NVR web GUI.
I have been able to get to the individual cameras Video settings, fantastic. The Ffmpeg Plugin is still not streaming my RTSP streams. I have a bit more work on that to do.

The only other issue I have is the remote platform setup. Hikvision keeps telling me the access is offline. I am able to view 1 camera out of 6, so I cannot understand how the platform is offline. I did manually add the cameras via the IP Address 192.168.0.245 and it shows the correct 6 cameras. But 5 cameras show the following "Error Code 91". I cannot understand why everything has became so difficult. I definately remember the initial setup and was nowhere this complicated. Anyways, just hoping to be able to use the Hik-Connect App still. I was able to add a camera via it's HTTP url, but the stream was offline. How can I fix this issue? Thanks again for all your wonderful help. Screenshot 1 is the DVR, Screenshot 2 is one of the cameras, screenshot 3 is the network current settings of the cameras.
2021-11-29 (2).png2021-11-29 (4).png2021-11-29 (3).png
 
Top