HIKVision Camera

Forum for questions and support relating to the 1.26.x releases only.
Locked
ralph179
Posts: 11
Joined: Tue Oct 22, 2013 11:55 pm

HIKVision Camera

Post by ralph179 »

I have searched for and have read several pieces of info on getting the HIKVision camera to work with zm but have been unable to put the pieces in the correct order to get it working. In VLC this URL works - rtsp://youripaddress:554//Streaming/Channels/1 after entering the URL it prompts for user name and password (cameras WEB interface credentials work).

Can someone tell me how I can get this information to work in zm?

Thanks,
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Re: HIKVision Camera

Post by bb99 »

Are you using ffmpeg as the source?
squaquerone
Posts: 4
Joined: Sun Nov 17, 2013 5:40 pm

Re: HIKVision Camera

Post by squaquerone »

Try this:
rtsp://username:password@ipaddress:554/streaming/channels/1
srcurtis
Posts: 11
Joined: Wed Dec 12, 2007 1:23 am

Re: HIKVision Camera

Post by srcurtis »

Hi

I am also having a problem with the HikVision camera, in my case I am working with the DS-2CD2132-I 3Mp IP Camera. I cannot configure Zoneminder using the Remote/RTSP method. I have upgraded the firmware in the camera to the current release V5.0.5 but still no luck. I found some comments on this post http://www.cctvforum.com/viewtopic.php?f=19&t=37034 which suggests that there is a conflict between the stream identifier sent out by the HikVision cameras and what ZoneMinder expects. It says that the camera sends the ONVIF identifier with a description of 'application' but the RTSP handler in ZoneMinder expects 'video' or 'audio'. I have not captured any packets to see if this is still true of the current firmware.

I have disabled RTSP authentication within the camera for the purposes of testing.

I am running V1.25.0 of ZoneMinder, which is in the Debian wheezy stable package. If at all possible I would like to keep with the packaged version for simplicity of maintenance and am therefore trying to resist trying 1.26.0.

I can get some results configuring it using the FFMPEG method, but the stream is unreliable. On the 'General' tab I select Ffmpeg and incase memory is an issue I have reduced the FPS settings to 10. On the 'Source' tab I set the Path to rtsp://<IP>:554//Streaming/Channels/1 and the capture size to 1920x1080. I have also tried reducing the buffers slightly (once incase in case memory is the cause, I have 4GB installed in the Debian box), these are set to 40/25/10/10/700/1.

In case it helps, I have found that all of these URL's work fine in VLC:

rtsp://192.168.85.89:554//Streaming/Channels/1
rtsp://192.168.85.89/h264/ch1/main/av_stream
rtsp://192.168.85.89:554/h264/ch1/main/av_stream
rtsp://192.168.85.89/MPEG-4/ch1/main/av_stream
rtsp://192.168.85.89:554/MPEG-4/ch1/main/av_stream

The problem that I am facing is an unreliable FFMPEG stream in ZoneMinder and I would appreciate any help that anyone has to offer. I will post my help request separately.

Hope this helps.

If you do find a solution, please let me know.

Thanks

Steve
squaquerone
Posts: 4
Joined: Sun Nov 17, 2013 5:40 pm

Re: HIKVision Camera

Post by squaquerone »

Steve I am having a very similar problem.

I'm using the same Hikvision camera. The stream works fine in VLC.
I too am getting an unreliable ffmpeg stream in zoneminder. The error in the log is "Unable to read packet from stream 0: error -541478725"

Can anyone suggest a solution? I'm using v1.26.4

Thanks
srcurtis
Posts: 11
Joined: Wed Dec 12, 2007 1:23 am

Re: HIKVision Camera

Post by srcurtis »

Hi

Yep, thats the exact same error that I am seeing. I have posted my log here: http://www.zoneminder.com/forums/viewto ... 29&t=21656

It's such as shame as these cameras seem perfect in every other way and are great value for money.

At least I now know that V1.26 does not solve the problem.

Keep me posted if you get anywhere.

Thanks

Steve
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: HIKVision Camera

Post by bbunge »

Likely with the camera settings. Looking at the manual for the DS-2CD2132-I:

Under Video
Stream Type Main Stream
Video Type Video only
Resolution 1289x720
Bitrate Type Constant
Video Quality Medium
Frame Rate 5 (increase this after you get a good connection)
Max Bitrate 512
Video Encoding H.264
I Frame Interval 10

I did not get a good read on the Source entry for RTSP but try putting a ?tcp at the end to force the stream to use TCP. I have had success using this with Vivotek cameras but Foscam does not like ?tcp.

Good Luck!

bb
srcurtis
Posts: 11
Joined: Wed Dec 12, 2007 1:23 am

Re: HIKVision Camera

Post by srcurtis »

Hi

These setting do not help, same problems. I had to set the frame rate on the camera to 4fps as 5 is not an option for selection.

Any other ideas?

Thanks

Steve
ralph179
Posts: 11
Joined: Tue Oct 22, 2013 11:55 pm

Re: HIKVision Camera

Post by ralph179 »

I have tried ffmpeg and the urls in the other post but can not get an image with zm. I have a HikVision DS-2CD2112-I.
sogood007
Posts: 25
Joined: Tue Oct 26, 2004 6:53 pm

Re: HIKVision Camera

Post by sogood007 »

I had a swann IP camera which is supposed to be HIKVision clone. I am able to use it with 1.26.4 using ffmpeg (instead of remote) and with this setting

rtsp://admin:12345@192.168.0.135:554/Streaming/Channels/1?tcp
Capture Width (pixels) 1920
Capture Height (pixels) 1080

I need to use ?tcp so there won't be any corrupted frame
NOTE: the admin is the default username and 12345 is the default password, please change to match your setup.
Last edited by sogood007 on Tue Nov 19, 2013 6:30 pm, edited 1 time in total.
srcurtis
Posts: 11
Joined: Wed Dec 12, 2007 1:23 am

Re: HIKVision Camera

Post by srcurtis »

Hi

I'll confirm tomorrow, but I have to say that it looks as if that may have fixed the problem.

Thanks

Steve
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: HIKVision Camera

Post by mastertheknife »

Hi,

FFMPEG has issues with RTSP\RTP over UDP (the way it should be), so you all need to add ?tcp to the end of path to force it to use TCP
http://ffmpeg.org/pipermail/libav-user/ ... 00405.html

If building ffmpeg from source, you can fix it like described here (by undefining HAVE_PTHREADS):
http://ffmpeg.org/pipermail/libav-user/ ... 00431.html
Last edited by mastertheknife on Tue Nov 19, 2013 2:55 pm, edited 1 time in total.
Kfir Itzhak.
ralph179
Posts: 11
Joined: Tue Oct 22, 2013 11:55 pm

Re: HIKVision Camera

Post by ralph179 »

Thank you sogood007 that url worked for my HIK camera. :D :D :D
c128
Posts: 88
Joined: Sat Sep 14, 2013 3:36 pm

Re: HIKVision Camera

Post by c128 »

mastertheknife wrote:Hi,

FFMPEG has issues with RTSP\RTP over UDP (the way it should be), so you all need to add ?tcp to the end of path to force it to use TCP
http://ffmpeg.org/pipermail/libav-user/ ... 00405.html

If building ffmpeg from source, you can fix it like described here (by undefining HAVE_PTHREADS):
http://ffmpeg.org/pipermail/libav-user/ ... 00431.html
Out of interest...does the version of ffmpeg supplied with Kyle's ZM Puppet install already include this fix?
I seem to remember seeing a commit comment (or a comment somewhere else) about the supplied ffmpeg including some of your changes, and was wondering whether it was worth rebuilding a version of ffmpeg of my own for use my Puppet-based ZM install or not.
squaquerone
Posts: 4
Joined: Sun Nov 17, 2013 5:40 pm

Re: HIKVision Camera

Post by squaquerone »

Thanks to everyone who suggested adding ?tcp to the end of the Hikvision camera feed url.

I've now managed to get my cameras to work :)
Locked