Hikvision DS-KB8112-IM connection to ZM?

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
DonZalmrol
Posts: 5
Joined: Wed Jun 24, 2020 8:21 am

Hikvision DS-KB8112-IM connection to ZM?

Post by DonZalmrol » Wed Jun 24, 2020 8:32 am

Hi,

First post here, hopefully right subforum.
I've been using ZM for a while now and I'm gradually expanding my cam network.

Recently purchased and installed my two Hikvision doorbells (DS-KB8112-IM) with the Indoor station (DS-KH8301-WT) and they are working well.
Now I'm trying to add my doorbells to my ZM installation, this seems a bit difficult as (at first glance) there is no RTSP available on the doorbells, I only have the ports 80, 443 and 8000 available.

Searched the forum and wiki, and only found the how to for the DS-KB6003-WIP.
https://wiki.zoneminder.com/Hikvision_V ... KB6003-WIP

Unfortunately not working (as RTSP is not available).

Tips, tricks greatly appreciated!

EDIT 01: Seems that RTSP should be available according to the datasheet.
https://www.hikvision.com/en/products/V ... KB8112-IM/

I probably need to find the correct RTSP stream.

Doobie Brother
Posts: 6
Joined: Sun Jun 21, 2020 12:24 pm

Re: Hikvision DS-KB8112-IM connection to ZM?

Post by Doobie Brother » Thu Jun 25, 2020 9:55 pm

Have you tried the URL in this post?:

https://community.home-assistant.io/t/h ... a/45123/41

DonZalmrol
Posts: 5
Joined: Wed Jun 24, 2020 8:21 am

Re: Hikvision DS-KB8112-IM connection to ZM?

Post by DonZalmrol » Tue Jun 30, 2020 4:04 pm

Apologies for the late reply, work had gotten in the way.

The link provided works for me through VLC player!
But not in ZM, yet they are the exact same RTSP URLs.

Maybe I need to set something additionaly for it to work in ZM besides the FFMPEG codec?

From the ZM log:
2020-06-30 18:06:03 zmc_m3 94401 ERR Unable to open input rtsp://username:password@IPADDRESS:554/Streaming/Channels/101 due to: Invalid data found when processing input zm_ffmpeg_camera.cpp 379

burger
Posts: 62
Joined: Mon May 11, 2020 4:32 pm

Re: Hikvision DS-KB8112-IM connection to ZM?

Post by burger » Tue Jun 30, 2020 5:03 pm

Try source type: LibVLC in zoneminder if it works in VLC.

Also review https://wiki.zoneminder.com/Finding_Camera_Stream_Paths

Test things out of ZM before using ZM. i.e. use vlc from gui, and ffmpeg from terminal to verify that these source type will work, then use the path you used, and the resolution they will print out, when/if they work.

It's faster to test outside of ZM, first.
fastest way to test streams:
ffmpeg -i rtsp://<ipaddress>:554/path output.mp4
from terminal, and run through paths on ispydb or in zm hcl

incompetent-nerd
Posts: 7
Joined: Sat Jun 13, 2020 4:49 am

Re: Hikvision DS-KB8112-IM connection to ZM?

Post by incompetent-nerd » Thu Jul 02, 2020 4:24 am

DonZalmrol,

I don't have the Hikvision doorbell, but do have several of their other cameras on my ZM system.
The URL I ended up using was:
rtsp://username:password@192.168.0.1:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1

I had to create a username and password in the camera GUI. If I left it blank, I had problems.

Perhaps the above URL will work with the doorbell also?
I'd also recommend double checking SELINUX or IPTABLES is not blocking anything.
I'm embarassed to admit how much time I spent troubleshooting things when it was a simple firewall or SELINUX issue...

*EDIT* My source type is FFMPEG.

DonZalmrol
Posts: 5
Joined: Wed Jun 24, 2020 8:21 am

Re: Hikvision DS-KB8112-IM connection to ZM?

Post by DonZalmrol » Fri Jul 03, 2020 2:39 pm

@Burger: seems my ZM cannot open the stream correctly, yet the settings are the same. My computer (different VLAN as my ZM and CAMS) can open the stream with VLC and ffmpeg.

Code: Select all

PS C:\temp\ffmpeg-20200628-4cfcfb3-win64-static\bin> .\ffmpeg.exe -i rtsp://xxx:xxx@x.x.x.x:554/Streaming/Channels/101 output.mp4
ffmpeg version git-2020-06-28-4cfcfb3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200621
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 55.100 / 56. 55.100
  libavcodec     58. 93.100 / 58. 93.100
  libavformat    58. 47.100 / 58. 47.100
  libavdevice    58. 11.100 / 58. 11.100
  libavfilter     7. 86.100 /  7. 86.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
[rtsp @ 0000028b7990bf80] Missing PPS in sprop-parameter-sets, ignoring
[rtsp @ 0000028b7990bf80] RTP: dropping old packet received too late
    Last message repeated 1 times
[h264 @ 0000028b7990ff80] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0000028b7990ff80] decode_slice_header error
[h264 @ 0000028b7990ff80] no frame!
[rtsp @ 0000028b7990bf80] RTP: dropping old packet received too late
    Last message repeated 1 times
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://xxx:xxx@x.x.x.x:554/Streaming/Channels/101':
  Metadata:
    title           : HIK Media Server
    comment         : HIK Media Server Session Description : standard
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuv420p(progressive), 1280x720, 25 tbr, 90k tbn, 180k tbc
    Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
File 'output.mp4' already exists. Overwrite? [y/N]
@Incompetent-nerd: Tried your URL, I can open it in VLC and in ffmpeg from my computer. Firewall is not enabled on the ZM server. A local user account has been created

burger
Posts: 62
Joined: Mon May 11, 2020 4:32 pm

Re: Hikvision DS-KB8112-IM connection to ZM?

Post by burger » Fri Jul 03, 2020 3:58 pm

You should test ffmpeg from the ZM server, generally. But, it looks as though it works. It's telling you the resolution 1280x720, and you have the path correct. Did you watch the output.mp4 to verify it is creating a valid video container?

Also you didn't mention if you tried source type: LibVLC. Post a screenshot of your source settings on ZM, and try ffmpeg from the ZM server.

If you have VLANs or firewall, etc, that is a possible point of failure.
fastest way to test streams:
ffmpeg -i rtsp://<ipaddress>:554/path output.mp4
from terminal, and run through paths on ispydb or in zm hcl

DonZalmrol
Posts: 5
Joined: Wed Jun 24, 2020 8:21 am

Re: Hikvision DS-KB8112-IM connection to ZM?

Post by DonZalmrol » Fri Jul 03, 2020 4:16 pm

From the ZM server I can't use the ffmpeg codec. it keeps stating that the used query/ code is invalid or missing arguments.

The current settings are:
1.png
1.png (27.1 KiB) Viewed 79 times
2.png
2.png (23.75 KiB) Viewed 79 times
changing it to libvlc doesn't resolve it.

FYI I have another Hikvision camera connected (DS-2CD2143G0-I). This a regular POE cam and works without any issues.
The cam is in the same vlan as the doorbells and connects to the ZM server that resides in a different vlan.

burger
Posts: 62
Joined: Mon May 11, 2020 4:32 pm

Re: Hikvision DS-KB8112-IM connection to ZM?

Post by burger » Fri Jul 03, 2020 8:45 pm

Can you post the output of the ffmpeg command you are using, and results?

You should verify the zm server can run ffmpeg on the command, and that it outputs to a valid video file. This means its very likely that the server can use it (ffmpeg) w/zm.

And obvious troubleshooting applies here. Try a reboot of the camera, network switches, try different paths, try different username/password.. If you are trying to run 30FPS of 1080p on an RPI1, you might have trouble, so in that case lower res, etc, etc...
fastest way to test streams:
ffmpeg -i rtsp://<ipaddress>:554/path output.mp4
from terminal, and run through paths on ispydb or in zm hcl

DonZalmrol
Posts: 5
Joined: Wed Jun 24, 2020 8:21 am

Re: Hikvision DS-KB8112-IM connection to ZM?

Post by DonZalmrol » Mon Jul 06, 2020 11:10 am

I will test the suggested tomorrow evening.

The server that hosts ZM should be sufficient, its hosted as a VM with decent HW specs (4x CPU (Intel Xeon E5-2650 v3), 8GB RAM).
Switches are good, username/ password, ...

Command I would need to look up, for ZM you don't need to install this codec separately no?
If so, this is probably the reason why its not working.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests