zaoar
Posts: 2
Joined: Sun Aug 28, 2016 11:00 am

Use raspberry to view Hikvision DVR

Sun Aug 28, 2016 11:22 am

Hallo everyone, i am new here and i want to start my first project on raspberry pi3. i have a Hikvision survillance sytem with 4 cams and a DVR. i am using DDNS on the DVR to have access from my phone(using hikvisions app iVMS) and from any other computer via browser.
I managed to view my cams from a linux pc using the Webcomponents that hikvision is providiong for linux but i can not make it work on a raspberry runing ubuntuMate. I could login to the dvr's home page, but then mozilla was asking for the right plug in. but the architecture is diferrent so the webcomponents dont work.
Is there any way to make it work?
thanks in advance

GreatGallium
Posts: 6
Joined: Wed Dec 25, 2013 4:48 pm
Contact: Website

Re: Use raspberry to view Hikvision DVR

Tue Aug 30, 2016 7:54 am

Hi,
I would also appreciate any advice on this topic.
Thanks
--
http://www.greaterdepth.co.uk

doleksy
Posts: 1
Joined: Wed Aug 31, 2016 5:20 am

Re: Use raspberry to view Hikvision DVR

Wed Aug 31, 2016 5:24 am

You could run Android on your Pi and use the app iVMS-4500 HD to view your Hikvision DVR.

zaoar
Posts: 2
Joined: Sun Aug 28, 2016 11:00 am

Re: Use raspberry to view Hikvision DVR

Wed Aug 31, 2016 12:18 pm

hi.. i tried this.. but it seems that the version i found was android tv wich is diferent than the android.. i manualy installed the iVMS but it failed to start..

fruitoftheloom
Posts: 26881
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Use raspberry to view Hikvision DVR

Wed Aug 31, 2016 12:58 pm

zaoar wrote:hi.. i tried this.. but it seems that the version i found was android tv wich is diferent than the android.. i manualy installed the iVMS but it failed to start..
It may be easier to use Linux DVR Software like Zoneminder installed in Raspbian Jessie if your Cameras are supported:

https://wiki.zoneminder.com/Hardware_Compatibility_List


.
The information is out there....you just have to let it in.

My other Linux machines: ChromeBox
https://www.aliexpress.com/item/32966393971.html
& Stone Desktop Intel CoreDuo circa 2010

fruitoftheloom
Posts: 26881
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Use raspberry to view Hikvision DVR

Wed Aug 31, 2016 2:47 pm

zaoar wrote:hi.. i tried this.. but it seems that the version i found was android tv wich is diferent than the android.. i manualy installed the iVMS but it failed to start..
Android and Android TV are supported by Community Developers if one wants to go that route post in their Forum:

https://groups.google.com/forum/#!forum/android-rpi
The information is out there....you just have to let it in.

My other Linux machines: ChromeBox
https://www.aliexpress.com/item/32966393971.html
& Stone Desktop Intel CoreDuo circa 2010

User avatar
ibshar
Posts: 22
Joined: Sun Jul 31, 2016 3:00 pm

Re: Use raspberry to view Hikvision DVR

Wed Apr 12, 2017 4:34 pm

Sadly I'm also stuck in this topic! Unable to use raspberry pi 3 for live view of my Hikvision DVR using any browser. The linux webcomponents are not available anywhere any more! :(

asavah
Posts: 383
Joined: Thu Aug 14, 2014 12:49 am

Re: Use raspberry to view Hikvision DVR

Wed Apr 12, 2017 11:26 pm

All those hikvision and similar (dahua and etc) DVRs need activex to work in browser, which in turn requires IE and ofcourse windoze.
Their desktop software is windows only, they also have android and ios apps.
But nothing for linux. The funny thing is that DVR firmware _is_ linux based.

The only way to watch streams from linux is to figure out rtsp url (the urls are different for different models and brands) for each cam and use vlc to watch.
You won't be able to watch recordings that way.
The models I have access to have this url:

Code: Select all

rtsp://admin:yourpassword@DVR_IP/cam/realmonitor?channel=1&subtype=0
We have a couple of these at work, to configure them I had to install a qemu-kvm virtual machine with windows 7 on my ubuntu workstation ...

Suggestions:
1) pester dvr vendor support to provide a solution.
2) don't buy their products.

User avatar
ibshar
Posts: 22
Joined: Sun Jul 31, 2016 3:00 pm

Re: Use raspberry to view Hikvision DVR

Sun Apr 16, 2017 12:15 pm

Actually i did find a Linux client for hikvision, called iVMS 4200. But sadly it is not compiled for arm so does not work on Raspbian. :(

bridges86406
Posts: 11
Joined: Mon Apr 04, 2016 7:25 pm

Re: Use raspberry to view Hikvision DVR

Sat Aug 26, 2017 3:25 am

If anyone is still interested I was able to get this to work with a crontab script and omxplayer. It appears to work for up to 8 streams. You'll need to setup a crontab to assure it's running.

Code: Select all

#HikPi Streamer crontab script

#remove cursor from terminal
setterm -cursor off  

#Camera 1
#Pull running processes grep to determine if ipc1 is running
st1=`ps -ef | grep omxplayer | grep ipc1 | cut -d'-' -f2 | cut -d' ' -f2`   
if [ "$st1" = "ipc1" ]; 
 then 
  echo "" > /dev/null;
 else 
 #Screen is used to create multiview run omxplayer with live video flag and refresh with 30 FPS to match stream and set window size | RTSP stream address 
  screen -dmS ipc1 sh -c 'omxplayer --live --refresh --fps 30 --win "0 0 1008 1050" rtsp://(username):(password)@192.168.1.50/h264/ch1/main/av_stream';
fi

#Camera 2
#Pull running processes grep to determine if ipc2 is running
st2=`ps -ef | grep omxplayer | grep ipc2 | cut -d'-' -f2 | cut -d' ' -f2`
if [ "$st2" = "ipc2" ];
 then
  echo "" > /dev/null;
 else
 #Screen is used to create multiview run omxplayer with live video flag and refresh with 15 FPS to match stream and set window size | RTSP stream address 
  screen -dmS ipc2 sh -c 'omxplayer --live --refresh --fps 15 --win "1008 0 1680 350" rtsp://(username):(password)@192.168.1.51/h264/ch1/sub/av_stream';
fi;

#Camera 3
#Pull running processes grep to determine if ipc3 is running
st3=`ps -ef | grep omxplayer | grep ipc3 | cut -d'-' -f2 | cut -d' ' -f2`
if [ "$st3" = "ipc3" ];
 then
  echo "" > /dev/null;
 else
 #Screen is used to create multiview run omxplayer with live video flag and refresh with 15 FPS to match stream and set window size | RTSP stream address 
  screen -dmS ipc3 sh -c 'omxplayer --live --refresh --fps 15 --win "1008 350 1680 700" rtsp://(username):(password)@192.168.1.52/h264/ch1/sub/av_stream';
fi;

#Camera 4
#Pull running processes grep to determine if ipc4 is running
st4=`ps -ef | grep omxplayer | grep ipc4 | cut -d'-' -f2 | cut -d' ' -f2`
if [ "$st4" = "ipc4" ];
 then
  echo "" > /dev/null;
 else
 #Screen is used to create multiview run omxplayer with live video flag and refresh with 15 FPS to match stream and set window size | RTSP stream address 
  screen -dmS ipc4 sh -c 'omxplayer --live --refresh --fps 15 --win "1008 700 1680 1050" rtsp://(username):(password)@192.168.1.55/h264/ch1/sub/av_stream';
Keep in mind my IPC1 is set to 1920x1080 @ 30FPS so that is why that one is so much higher.
The other cameras are using the sub channel and streaming in at 640x480 @ 15fps.
Adjust yours accordingly.

creampie
Posts: 5
Joined: Sat Jan 23, 2016 6:43 am

Re: Use raspberry to view Hikvision DVR

Mon Nov 26, 2018 7:24 pm

You could install motioneyeos, then run nmap over your cameras each to find their RTSP streams; I've done this for other cameras and it works a charm.

Then configure the motion front-end to point to each camera.

Usage:

Code: Select all

nmap --script rtsp-url-brute -p 554 [ip_address]
If that doesn't work, either try on other common RTSP ports, or run

Code: Select all

nmap -p- [ip_address]
To scan all ports for a given camera.

aashitgarodia
Posts: 1
Joined: Fri Jan 22, 2021 5:20 pm

Re: Use raspberry to view Hikvision DVR

Fri Jan 22, 2021 6:00 pm

Guys any compatible software or any easy solution available now?

Ger8264
Posts: 1
Joined: Mon Apr 26, 2021 6:22 am

Re: Use raspberry to view Hikvision DVR

Mon Apr 26, 2021 6:26 am

Hello,
I had the same problem and I found the solution with a couple of videos on Youtube, I leave the Links

https://www.youtube.com/watch?v=0tvX_gsv2ZU
https://www.youtube.com/watch?v=W7T95sjcAvE

Greetings from Chile!

Return to “Networking and servers”