Jump to content
ukanalyst

Zoneminder settings for HikVision 3MP IP Cam DS-2CD2032-I

Recommended Posts

Hi All,

 

Apologies if this has been answered elsewhere or I need to 'RTFM' more thoroughly but I've been trying and searching for about an hour or so and am struggling to get Zoneminder to show a stream from the Hikivision bullet I've installed this evening.

 

Does anyone have the settings handy that will allow these cams to work with ZoneMinder?

 

Many thanks in advance!

 

Dave

Share this post


Link to post
Share on other sites

Thanks... I found this info last night and this works in vlc but it doesn't work with Zoneminder.

 

I have disabled rstp auth in the camera and configured zm like this:

Protocol: RTSP

Remote method: RTP/RTSP

Remote Host name: ip of camera eg 10.10.10.100

Remote Host port: 554

Remote Host path: //Streaming/Channels/1

 

But nothing... I have also tried path with a single first forward slash and no preceding slash.

 

If I try and use the full URL in the host name box it won't allow me to save.

Share this post


Link to post
Share on other sites

Zoneminder is a pain that way, sometimes you get lucky right away, sometimes you have fiddle for days, weeks, months, LOL. To make sure the cameras responds properly to the URL string I gave you, you can test it with VLC Player (free). Click on Media, then Open Network Stream.

Share this post


Link to post
Share on other sites

Thanks for your reply .. as I said, it does work in VNC so the URL is fine.

 

I think I'll have to build a windows VM and try HikVision's own nvr server software.

 

Cheers

 

Dave

Share this post


Link to post
Share on other sites

I have the same Model and there are no Problems with Zoneminder.

Did you have your Username and Password in the RTSP URI configured?

 

In Zoneminder select Ffmpeg for Source Type and in the Source Tab:

 

Source Path: rtsp://admin:12345@XXX.XXX.XXX.XXX:554/Streaming/Channels/2

 

In the above example Username is admin and Password is 12345

replace XXX.XXX.XXX.XXX with the IP-Adress of your IPCam

 

Please also note that you take the correct Zoneminder Parameters for your chosen IPCam Stream [in the the above example it is the Sub Stream (/Channels/2). You find them in the Hikvision Webinterface under Configuration|Advanced Configuration|Video/Audio/Stream Type]

 

And very important to, you have to select the same values for FPS, Width and Height in Zonemminder as the configured in the Hikvision Webinterface (also find under Configuration|Advanced Configuration|Video/Audio/Stream Type).

 

Hope that helps

Share this post


Link to post
Share on other sites

Thanks for this but it will not let me put a URL like this in the Source box. I know the URL works perfectly because I can see the stream in VLC player. When I try and enter the URL like the one you have given an example of below into the source box, Zoneminder tells me the format is not allowed. Here's a Screenshot:

 

227369_1.png

 

When I try and separate this out into source, port and path boxes it accepts (albeit without the auth embedded in the URL ... but then I disabled RTSP auth in the cam (tested OK in VLC)) but won't show the stream.

 

I've now built a windows 2008 VM and have installed HikVisions NVR Server software ... just about to configure but it looks promising!

 

Cheers

 

Dave

 

I have the same Model and there are no Problems with Zoneminder.

Did you have your Username and Password in the RTSP URI configured?

 

In Zoneminder in the Source Tab:

 

Source Path: rtsp://admin:12345@XXX.XXX.XXX.XXX:554/Streaming/Channels/2

 

In the above example Username is admin and Password is 12345

replace XXX.XXX.XXX.XXX with the IP-Adress of your IPCam

 

Please also note that you take the correct Zoneminder Parameters for your chosen IPCam Stream [in the the above example it is the Sub Stream (/Channels/2). You find them in the Hikvision Webinterface under Configuration|Advanced Configuration|Video/Audio/Stream Type]

 

And very important to, you have to select the same values for FPS, Width and Height in Zonemminder as the configured in the Hikvision Webinterface (also find under Configuration|Advanced Configuration|Video/Audio/Stream Type).

 

Hope that helps

Share this post


Link to post
Share on other sites

Please try to remove the leading "rtsp://" in Remote Host Name. But i recommend to use FFmeg. That will work (if you installed FFmpeg on your System and compile Zoneminder with FFmpeg support):D

General.jpg.8075a9c31a4e9b29f71d31c49b96fe68.jpg

Source.png.ff1e9da867404db753a20d2a6979a079.png

Share this post


Link to post
Share on other sites

Thanks for your reply ... I'll look into installing ffmpeg later on ... I'm using the pre-built Zoneminder VM so I didn't have to install from scratch ... looks like I might need to

 

Cheers again and thanks for the screenshot ... a picture often paints 1,000 words

 

Dave

Share this post


Link to post
Share on other sites

No Problem glad to help you

 

Good Luck with Zoneminder, it tooks me about 4 Weeks to understand and install the last version 1.25.0 in the right way. For Beginners it is really a pain,but i think you will "ride this beast".

 

And please use FFMpeg <= 1.0.7. Higher Versions will not compile with Zoneminder.

Share this post


Link to post
Share on other sites

Some information about zoneminder rtsp bugs.

 

Zoneminder 1.25 rtsp mode seems to choke on the stream response from the camera with HIKVISION firmware when it reports the ONVIF stream with the m type of 'application'. I'm using the Sub Stream video set to MJPEG.

 

08/10/13 19:32:10.066458 zmc_m17[12361].DB2-zm_rtsp.cpp/72 [Received RTSP response: RTSP/1.0 200 OK^M
CSeq: 1^M
Content-Type: application/sdp^M
Content-Base: rtsp://10.1.1.181:554/Streaming/Channels/2/^M
Content-Length: 553^M
^M
v=0^M
o=- 1376163129998643 1376163129998643 IN IP4 10.1.1.181^M
s=Media Presentation^M
e=NONE^M
b=AS:5050^M
t=0 0^M
a=control:rtsp://10.1.1.181:554/Streaming/Channels/2/^M
m=video 0 RTP/AVP 26^M
b=AS:5000^M
a=control:rtsp://10.1.1.181:554/Streaming/Channels/2/trackID=1^M
a=rtpmap:26 JPEG/90000^M
m=application 0 RTP/AVP 107^M
b=AS:50^M
a=control:rtsp://10.1.1.181:554/Streaming/Channels/2/trackID=3^M
a=rtpmap:107 vnd.onvif.metadata/90000^M
a=Media_header:MEDIAINFO=494D4B48010100000400040000000000000000000000000000000000000000000000000000000000;^M
a=appversion:1.0^M
(692 bytes)]
08/10/13 19:32:10.066533 zmc_m17[12361].DB1-zm_rtsp.cpp/304 [Processing SDP 'v=0^M
o=- 1376163129998643 1376163129998643 IN IP4 10.1.1.181^M
s=Media Presentation^M
e=NONE^M
b=AS:5050^M
t=0 0^M
a=control:rtsp://10.1.1.181:554/Streaming/Channels/2/^M
m=video 0 RTP/AVP 26^M
b=AS:5000^M
a=control:rtsp://10.1.1.181:554/Streaming/Channels/2/trackID=1^M
a=rtpmap:26 JPEG/90000^M
m=application 0 RTP/AVP 107^M
b=AS:50^M
a=control:rtsp://10.1.1.181:554/Streaming/Channels/2/trackID=3^M
a=rtpmap:107 vnd.onvif.metadata/90000^M
a=Media_header:MEDIAINFO=494D4B48010100000400040000000000000000000000000000000000000000000000000000000000;^M
a=appversion:1.0^M
']
08/10/13 19:32:10.066562 zmc_m17[12361].DB3-zm_sdp.cpp/165 [Processing SDP line 'v=0']
08/10/13 19:32:10.066569 zmc_m17[12361].DB3-zm_sdp.cpp/165 [Processing SDP line 'o=- 1376163129998643 1376163129998643 IN IP4 10.1.1.181']
08/10/13 19:32:10.066576 zmc_m17[12361].DB3-zm_sdp.cpp/165 [Processing SDP line 's=Media Presentation']
08/10/13 19:32:10.066579 zmc_m17[12361].DB3-zm_sdp.cpp/165 [Processing SDP line 'e=NONE']
08/10/13 19:32:10.066582 zmc_m17[12361].DB3-zm_sdp.cpp/165 [Processing SDP line 'b=AS:5050']
08/10/13 19:32:10.066586 zmc_m17[12361].DB3-zm_sdp.cpp/165 [Processing SDP line 't=0 0']
08/10/13 19:32:10.066589 zmc_m17[12361].DB3-zm_sdp.cpp/165 [Processing SDP line 'a=control:rtsp://10.1.1.181:554/Streaming/Channels/2/']
08/10/13 19:32:10.066596 zmc_m17[12361].DB3-zm_sdp.cpp/298 [Ignoring general SDP attribute 'control:rtsp://10.1.1.181:554/Streaming/Channels/2/']
08/10/13 19:32:10.066599 zmc_m17[12361].DB3-zm_sdp.cpp/165 [Processing SDP line 'm=video 0 RTP/AVP 26']
08/10/13 19:32:10.066607 zmc_m17[12361].DB3-zm_sdp.cpp/165 [Processing SDP line 'b=AS:5000']
08/10/13 19:32:10.066612 zmc_m17[12361].DB3-zm_sdp.cpp/165 [Processing SDP line 'a=control:rtsp://10.1.1.181:554/Streaming/Channels/2/trackID=1']
08/10/13 19:32:10.066616 zmc_m17[12361].DB3-zm_sdp.cpp/165 [Processing SDP line 'a=rtpmap:26 JPEG/90000']
08/10/13 19:32:10.066622 zmc_m17[12361].DB3-zm_sdp.cpp/165 [Processing SDP line 'm=application 0 RTP/AVP 107']
08/10/13 19:32:10.066705 zmc_m17[12361].ERR-zm_rtsp.cpp/314 [Unsupported media type 'application' in SDP media attribute 'application 0 RTP/AVP 107']
08/10/13 19:32:10.067008 zmc_m17[12361].DB2-zm_thread.cpp/266 [Exiting thread, status 0xffffffffffffffff]
08/10/13 19:32:19.089890 zmc_m17[12359].FAT-zm_remote_camera_rtsp.cpp/118 [No RTSP sources]

 

The sdp parser fails when the m code is other than 'audio or 'video'.

            case 'm' :
           {
               StringVector tokens = split( line, " " );
               if ( tokens.size() < 4 )
                   throw Exception( "Can't parse SDP media description '"+line+"'" );
               std::string mediaType = tokens[0];
               if ( mediaType != "audio" && mediaType != "video" )
                   throw Exception( "Unsupported media type '"+mediaType+"' in SDP media attribute '"+line+"'" );
               StringVector portTokens = split( tokens[1], "/" );
               int mediaPort = atoi(portTokens[0].c_str());
               int mediaNumPorts = 1;
               if ( portTokens.size() > 1 )
                   mediaNumPorts = atoi(portTokens[1].c_str());
               std::string mediaTransport = tokens[2];
               if ( mediaTransport != "RTP/AVP" )
                   throw Exception( "Unsupported media transport '"+mediaTransport+"' in SDP media attribute '"+line+"'" );
               int payloadType = atoi(tokens[3].c_str());
               currMedia = new MediaDescriptor( mediaType, mediaPort, mediaNumPorts, mediaTransport, payloadType );
               mMediaList.push_back( currMedia );
               break;
           }

 

Modifing the sdp code to ignore the onvif data on the rtsp DESCRIBE response looks like a possible fix.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×