Connecting an outdoor video camera to a video recorder in the cloud


Hello! Aleksey Kholodaev, Junior System Administrator of Cloud4Y, is back in touch.

I have a cozy personal lair outside the city, in which I periodically take a break from the hustle and bustle. And at one point, I realized that it would not hurt to organize video surveillance of the site. Not something monumental and all-seeing, but just for peace of mind. I decided to allocate 6,000 rubles for this business.

So, I was faced with the task of organizing surveillance of the site, provided that there is no wired Internet. And I started looking for options. The camera had to meet several criteria:

  • WiFi. The presence of a Wi-Fi module in the camera.

  • 4G modem. Built-in LTE modem into which a SIM card is inserted, and which allows the camera to access the Internet without third-party Wi-Fi routers with a modem.

  • PTZ. This is a rotary mechanism that allows you to rotate the camera.

  • IR sensors. They allow the camera to shoot in the dark.

  • ONVIF protocol is a standard protocol that allows you to connect the camera to any DVR and control its PTZ mechanism and not only, in particular, to the SecurOS Lite DVR in Cloud4Y cloud. The ONVIF protocol is supported by a wide range of DVRs. Therefore, its presence in the chamber is very good.

  • street model. The camera must withstand outdoor temperatures (from -35 degrees to +55 degrees).

  • P2P. The technology allows you to connect to a camera without an IP address using a unique identification number (UID).

  • Viewing angle. The space that the camera can cover.

I chose a device from many Chinese brands and models. The table below shows the characteristics of the four cameras that turned out to be better than the rest after studying many options.

Brand

WI-FI yes/no

4g modem

Not really

PTZ yes/no

IR yes/no

ONVIF yes/no

Outdoor yes/no

P2P yes/no

Horizontal Angle

(degrees)

TZNCAMERATZN

Yes

Not

Yes

Yes

Not

Yes

Yes

270

INQMEGA

Yes

Not

Yes

Yes

Not

Yes

Yes

355

USAFEQLO

Not

Yes

Yes

Yes

Not

Yes

Yes

320

MAMICAM

Yes

Yes

Yes

Yes

Yes

Yes

Yes

355

Camera TZNCAMERATZN pretty good. It is outdoor, supports P2P technology, which allows you to connect and manage it without a static IP address, using a unique identification number (UID), from a mobile phone or PC. But for this camera, you need to buy an additional Wi-Fi router with a modem to access the Internet. And it also does not support the ONVIF protocol, which prevents it from connecting to many cameras. The swivel mechanism does not have enough horizontal rotation angle for me, that is, there is no desired viewing angle. Price cameras in the region of 6000 rubles, if taken with a 32Gb memory card.

Camera INQMEGA gives much greater freedom of vision compared to the first. Price cameras around 6000 rubles with a 32Gb flash drive. But it has the same disadvantages as the previous model. And it’s upsetting.

At the third camera USAFEQLO, there is a built-in 4G modem, so you don’t have to buy a router. But there are disadvantages: a small freedom of vision and the absence of the ONVIF protocol, which again reduces the number of DVRs available for connection to the camera. I have not come across DVRs to which this camera can be connected. But USAFEQLO has P2P technology, which is also good. Price cameras around 8000 rubles without a memory card.

My choice fell on the fourth model, MAMICAM KB-X3because it met all the criteria I needed. It has a modem and a 360-degree viewing angle, and it supports ONVIF, PTZ, smart detection (SMART), etc. Price cameras – 11,000 rubles with a 32Gb memory card.

I took the camera at a discount, and in the end it cost me 6,000 rubles. Here she is:

Now let’s move on to the question of connecting the camera to the SecurOS Lite DVR located in the Cloud4Y cloud. The camera’s rotary mechanism will be controlled via the ONVIF protocol, and the video stream will be transmitted via the RTSP protocol.

First, let’s go into the camera and see which port is used by default for the ONVIF and RSTP protocol. The camera is a device that consists of a Wi-Fi router with a 4G modem and the camera itself connected to this router. The router is configured with a DHCP server from which the camera obtains an IP address. The presence of a Wi-Fi router in the camera will allow you to later, if desired, connect a second camera to this router via WI-FI, and then to the DVR.

To connect to the camera at the initial stage, you need to connect to the router via Wi-Fi. The Wi-Fi network is called mifi. We connect with it (the default password is 1234567890). We go in the browser to the address 192.168.100.100 (the default IP address that the camera catches). Default login, admin password is empty. Click PC view.

Next, go to Settings.

Open the Network tab

Click ONVIF. We need to remember (or write down) the value of the Server Port item. You can change it to any suitable one or leave it by default (8080). This port is used by the ONVIF protocol on this camera. In the future, we will forward this port on the router to our camera.

In the Network tab, remember the number in the RTSP port field. You can leave it as default (554) or change it. I left it as is. We will also forward this port on the router.

Next, we connect to the router in the camera through a browser. By default, its local address is 192.168.100.1. We enter it in the address bar of the browser, we will be asked to enter the password. Enter and press Login or Enter.

Now select Advanced Settings

Go to the Firewall tab, where we are interested in Port Mapping and Port Forwarding. The Port Forwarding rule will not work without the Port Mapping rule. Perhaps this is a feature of this camera.

Let’s start forwarding ports for the ONVIF protocol. Let’s write the Port Mapping rule first. In the Src field. Port we specify the number of the ONVIF TCP port, through which we will connect to the camera from the outside. In the field Dest. Port we prescribe the TCP port number of the ONVIF protocol of the camera itself, which we watched and learned earlier (these ports are the same in my case). In the Dest IP Address field, enter the local IP address of the camera (by default, 192.168.100.100). We write a comment to identify the rule in the future. After that, click Apply.

Next, we write the Port Forwarding rule. In the IP Address field, enter the local IP address of the camera (by default, 192.168.100.100). In the Port Range field, write the range of ports that need to be forwarded. In my case, this is not a range, but one port. Therefore, we write the number of this port in both fields. We write a comment to identify the rule in the future.

Let’s do the same port forwarding procedure for the RTSP protocol. I’m using the default RTSP TCP port: 554.

Port forwarding on the built-in router of the camera is finished. Let’s move on to setting up the SecurOS Lite video recorder.

We connect via the RDP protocol to our video recorder in the Cloud4Y cloud. We press the gear.

Let’s add a new video capture device, as shown in the screenshot below.

Enter the name of the device. ONVIF device type. default model. Click OK

Then add a camera

Since my camera is rotary, I put the switch “Use rotary mechanism”

Next, click on the gear next to our video capture device to open the network settings needed to connect to the camera. In the IP address field, enter the white IP address of the router built into the camera and through “:” – the TCP port of the ONVIF protocol, which was forwarded above. The input format is:

IP address: TCP port ONVIF

We also enter the account login on the camera and the password of this account. Click Apply

The camera image appears in the lower left corner. The camera control interface appears on the right. You can control it as you like, as far as the rotary mechanism of the camera will allow. Please note that SecurOS Lite does not support tours, it starts with commercial versions. You can also access the DVR via the SecurOS WebView Web client. Support for the SecurOS Mobile application also starts with commercial versions.

The application is quite functional and allows you to make the following settings:

  • draw a motion detection area to eliminate false positives,

  • arm/disarm,

  • to record in the archive on motion detection,

  • choose the quality of the recorded video stream to reduce the occupied space,

  • scheduled recording,

  • sending emails on motion detection and much more.

Connecting via a mobile application to the DVR (only starting from commercial versions) will allow you to receive notifications on your phone about motion detection at the facility.

Here is a simple and inexpensive solution. What do you have?


What else is interesting in the Cloud4Y blog

→ Little-known computer SWTPC 6800

→ Make Linux look like Windows 95

→ How not to let technical debt get the better of you

→ WD-40: a tool that can do almost everything

→ Open source MS-DOS games

Subscribe to our Telegram-channel, so as not to miss the next article. We only write about business.