How can I access my Hikvision IP-cam over VLC?

25,324

You must "known" kamera ip address. Try with arp-scan

$ sudo apt-get install arp-scan

Quick example

$ sudo arp-scan --interface=eth0 --localnet
Interface: eth0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.8.1 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
192.168.1.1     00:21:2c:82:08:87       SemIndia System Private Limited
192.168.1.2     6c:f0:49:69:c1:25       GIGA-BYTE TECHNOLOGY CO.,LTD.

Replace eth0 with your interface.

When you scan your local network you will see all host on lan. Some of host is your camera.

Now when you know camera ip you can connect them to vlc player or simple try from browser.

Edit 1

Based on your answer, camera is on 192.0.0.64. Solution is to add virtual network interface that will be in the same network with camera.

Exsample:

Output before adding a virtual interface

xxxx@xxx ~/xxx $ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:22:64:4e:6f:70  
          inet addr:xxx.xxx.47.5  Bcast:xxx.xxx.47.255  Mask:255.255.255.0
          inet6 addr: fe80::222:64ff:fe4e:6f70/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8688174 errors:56 dropped:0 overruns:0 frame:35
          TX packets:4093505 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:9559910554 (9.5 GB)  TX bytes:625071156 (625.0 MB)
          Interrupt:22 Memory:e4600000-e4620000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:265240 errors:0 dropped:0 overruns:0 frame:0
          TX packets:265240 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:25016825 (25.0 MB)  TX bytes:25016825 (25.0 MB)

Output from route

xxx@xxx ~/xxx $ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         xxx.xxx.47.254  0.0.0.0         UG    0      0        0 eth0
xxx.xxx.47.0    *               255.255.255.0   U     1      0        0 eth0

Because I don't have interface in 192.0.0.xxx range I can not access camera on default ip address.

I add virtual intefrace

sudo ifconfig eth0:1 192.0.0.66 netmask 255.255.255.0

Output after adding

xxx@xxx ~/xxx $ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:22:64:4e:6f:70  
          inet addr:xxx.xxx.47.5  Bcast:xxx.xxx.47.255  Mask:255.255.255.0
          inet6 addr: fe80::222:64ff:fe4e:6f70/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8690659 errors:56 dropped:0 overruns:0 frame:35
          TX packets:4095226 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:9561584734 (9.5 GB)  TX bytes:625397315 (625.3 MB)
          Interrupt:22 Memory:e4600000-e4620000 

eth0:1    Link encap:Ethernet  HWaddr 00:22:64:4e:6f:70  
          inet addr:192.0.0.66  Bcast:192.0.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:22 Memory:e4600000-e4620000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:265413 errors:0 dropped:0 overruns:0 frame:0
          TX packets:265413 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:25030884 (25.0 MB)  TX bytes:25030884 (25.0 MB)

xxx@xxx ~/xxx $ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         xxx.xxx.47.254  0.0.0.0         UG    0      0        0 eth0
192.0.0.0       *               255.255.255.0   U     0      0        0 eth0
xxx.xxx.47.0    *               255.255.255.0   U     1      0        0 eth0

Well, now we can access the camera on 192.0.0.64 because is in the same network range with our virtual interface.

Probably, now you can access you ip camera using browser. When you log on camera change ip address to ip address from 192.168.24.xxx / 24 range.

To kill virtual interface simple do

sudo ifconfig eth0:1 down

After that you will be able to access you camera using VLC

In VLC go to the Media->Open Network Stream menu and add url rtsp://IPADDRESS:554/

Share:
25,324

Related videos on Youtube

empedokles
Author by

empedokles

Updated on September 18, 2022

Comments

  • empedokles
    empedokles over 1 year

    My setup is as following: My IP-cam (Hikvision DS-2CD2632F-IS) is connected to my router. My notebook is connected to the same router. The router is set to DHCP. The factory default IP of the ip-cam is 192.0.0.64. I have changed that IP successfully to 192.168.1.34 (with the Hikvision software on a Windows PC). How can I connect to my IP-camera by using VLC Media Player?

    enter image description here

        sudo arp-scan --interface=eth0 --localnet
    [sudo] password for empedokles: 
    Interface: eth0, datalink type: EN10MB (Ethernet)
    Starting arp-scan 1.8.1 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
    192.168.1.1 00:22:10:82:61:40   Motorola Mobility, Inc.
    192.168.1.33    00:80:3f:3a:d6:79   TATUNG COMPANY
    192.168.1.34    44:19:b7:27:c2:fa   (Unknown)
    192.168.1.200   00:18:fe:6d:cb:3e   Hewlett Packard
    
    4 packets received by filter, 0 packets dropped by kernel
    Ending arp-scan 1.8.1: 256 hosts scanned in 1.451 seconds (176.43 hosts/sec). 4 responded
    

    Tatung Company is my digital TV-Box and not the IP-Cam. 192.168.1.34 (Unknown) should be the IP-Cam.

    lan statistics from router

    empedokles@empedokles:~$ ifconfig
    eth0      Link encap:Ethernet  Hardware Adresse 08:9e:01:35:86:e8  
              inet Adresse:192.168.1.40  Bcast:192.168.1.255  Maske:255.255.255.0
              inet6-Adresse: fe80::a9e:1ff:fe35:86e8/64 Gültigkeitsbereich:Verbindung
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
              RX-Pakete:106463 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
              TX-Pakete:73674 Fehler:0 Verloren:0 Überläufe:0 Träger:0
              Kollisionen:0 Sendewarteschlangenlänge:1000 
              RX-Bytes:90962221 (90.9 MB)  TX-Bytes:16044389 (16.0 MB)
    
    lo        Link encap:Lokale Schleife  
              inet Adresse:127.0.0.1  Maske:255.0.0.0
              inet6-Adresse: ::1/128 Gültigkeitsbereich:Maschine
              UP LOOPBACK RUNNING  MTU:65536  Metrik:1
              RX-Pakete:16876 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
              TX-Pakete:16876 Fehler:0 Verloren:0 Überläufe:0 Träger:0
              Kollisionen:0 Sendewarteschlangenlänge:0 
              RX-Bytes:1428659 (1.4 MB)  TX-Bytes:1428659 (1.4 MB)
    
  • empedokles
    empedokles about 10 years
    The router sits on IP 192.168.1.1. I've attached some screenshots in my above posts. I don't think that IP 192.168.1.33 is the cam. Currrently I have 4 devices in the router. The notebook (empedokles), a Windows PC, a TV box and the IP-Camera with it's port injector. The camera is on (I can see the infrared LEDs).
  • empedokles
    empedokles about 10 years
    @2707924 I did: sudo arp-scan --localhost and postet the code I received in my posting above. I dunno what hawlett-packard is. There seems no hawlett-packard device in my router.
  • Emmanuel
    Emmanuel about 10 years
    @user272441 aren't there any pages showing the ip that have been attributed ? Second it is not clear if you want to connect from your lan or from the Internet.
  • empedokles
    empedokles about 10 years
    I only can see the information of above screenshots. I want to connect from lan. 192.168.1.33 Tatung is my digital TV-box.
  • 2707974
    2707974 about 10 years
    HP is manufacturer of nic device. On your lan you have 1. router 2. camera and 3. your laptop.
  • empedokles
    empedokles about 10 years
    @2707924 You mean the Network card of my notebook? 1. Motorola is the Router 2. Tatung is the digital media TV-Box. I can't find my camera.
  • 2707974
    2707974 about 10 years
    Try to fing on net default ip address for you camera. Maybe is default ip on different network 192.168.0.1 / 24 and do not ask dhcp server for ip.
  • empedokles
    empedokles about 10 years
    I don't understand your comment. The default IP of the cam is 192.0.0.64 by factory defaults. I can't access the camera with this IP though. Maybe it get's a differnt IP by the router.
  • empedokles
    empedokles about 10 years
    Before I do that. What do I have to do to revert it?
  • empedokles
    empedokles about 10 years
    192.168.1.34 or 35 in firefox will produce nothing. Where is upnp discovery in vlc located?
  • empedokles
    empedokles about 10 years
    I also updated my posting with the statistics -> lan page from my router.
  • 2707974
    2707974 about 10 years
    Hello, I add some stuff in edited answer.
  • empedokles
    empedokles about 10 years
    I could alter the cameras IP to 192.168.1.34 over the hikvision software on a Windows PC. I still can't access it though.
  • empedokles
    empedokles about 10 years
    I did update my posting again. I seem to have changed the IP of the cam on a Windows PC over the camerasoftware to 192.168.1.34
  • empedokles
    empedokles about 10 years
    You wrote in Edit 3: I don't receive anything under Universal Plug n' Play on VLC. "As you now have its IP it should be feasible with a browser." - Unfortunately I can't access my cam over firefox.
  • Emmanuel
    Emmanuel about 10 years
    @empedokles How do you configure the Cam ? What says the doc
  • empedokles
    empedokles almost 10 years
    I did set the IP over hikvisions "SADP" (software) on a windows computer. Unfortunately I can't access it over the browser.