3

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)
1
  • For what it's worth, Debian has now disabled rtsp in vlc in Bullseye, which they say uses a lib which is not free. So I guess if you want to uses vlc for rtsp you'll need another distro now. Nov 9, 2022 at 4:49

2 Answers 2

1

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/

10
  • @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.
    – empedokles
    May 12, 2014 at 10:03
  • HP is manufacturer of nic device. On your lan you have 1. router 2. camera and 3. your laptop.
    – 2707974
    May 12, 2014 at 13:24
  • @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.
    – empedokles
    May 12, 2014 at 13:28
  • 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.
    – 2707974
    May 13, 2014 at 6:31
  • 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
    May 13, 2014 at 11:38
0

Your router has the webcam IP information in its DHCP information interface.
Most of the time home routers has an html management interface that you can access with your browser. Refers to your router documentation.

If you don't have that document, try to connect with a browser to the default gateway ip, try http and https protocols. You can get your defalt gateway IP with the route -n command. For the passwords there are lot of routers default passwords lists available on the net.

Did you try to use the upnp discovery in the vlc inteface ?

EDIT:

The DHCP addresses are in the range 192.168.1.33 to 192.168.1.64. As you got the 192.168.1.33 chances are that your webcam has the next IP 192.168.1.34 or the next one.

Try Statistics->Lan menu the docs says that it shows the attributes IPs

EDIT 2:

Ok then there are 3 IPs on your network: 192.168.1.40 (which is your latops IP), 192.168.1.33 and 192.168.1.240

Try the 192.168.1.33 first as 192.168.1.240 is out of the DHCP range and may be used by your tv box.

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

The url depends on the camera model, you have a long list made for vlc and ffmpeg on the Ispy site : Connecting to your Hikvision IP camera.
Note that this Ispy tool may helps you to manage your cam.

EDIT 3

If your camera has not a fixed IP the best is to use UPnP.

On VLC go to the menu:
View -> Playlist -> Local Network -> Universal Plug'n Play Your camera should be in the right panel.

You may have to enable the UPnP server on your camera. As you now have its IP it should be feasible with a browser.

Another option is to fix the IP of your camera in the DHCP interface of your router. It's a bit too much here but you will have to do this if you want to access you camera from the Internet.

9
  • 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
    May 12, 2014 at 9:55
  • @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.
    – Emmanuel
    May 12, 2014 at 10:49
  • 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.
    – empedokles
    May 12, 2014 at 12:49
  • 192.168.1.34 or 35 in firefox will produce nothing. Where is upnp discovery in vlc located?
    – empedokles
    May 13, 2014 at 12:10
  • I also updated my posting with the statistics -> lan page from my router.
    – empedokles
    May 13, 2014 at 12:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .