Teach you to set up a network video surveillance server with Spcaserv

1. Description of the network monitoring server;

How to use the camera to make a system for monitoring from time to time? That is to say, there is a dedicated network control server, and other clients use the network video monitoring software or browser to monitor the location of the camera and everything that happens. I haven't got any professional video surveillance, nor do I know what professional equipment they use, nor what function they have. I understand the application of network monitoring server as follows:

* Constant monitoring function: the range monitored by the continuous monitoring camera;

* Data stream collection function: collect monitoring data stream from time to time to prepare for future search for relevant image data;

* Photo capture function: For example, capture a photo every 5 minutes;

* Time stamp function;

* Data backup function (additional);

2. Linux uses a webcam (WebCam) as a network monitoring server required conditions and purposes;

We first define the conditions and purposes we need to use the WebCam to do the network temporary control system;

2.1 The required software environment and hardware equipment;

First of all: there must be a camera (WebCam), and a camera that can be supported by Linux, please refer to: "Drive Method of WebCam in Linux Operating System"

Second: software environment, we use Spcaserv to set up;

Third: network environment, we have to have a network environment, for example, I will test whether the network monitoring system I made is successful, at least there are two machines in the LAN, although one can do it, but as for other computers on the network Whether it can be seen, if there are too few machines, we have no way of knowing;

2.2 The purpose to be achieved;

* Time monitoring: can cross-platform, all systems are barrier-free viewing and monitoring;

* Data collection: It can be performed on the server side, but it must be run in the desktop environment; it is performed in the Linux client; due to software limitations, this can only be said;

3. Driving method of WebCam for Linux;

Please refer to: "Drive Method of WebCam in Linux Operating System"

4. Use Spcaserv to set up a network monitoring server in Linux;

4.1 Download software Spcaview;

Download address: http://mxhaard.free.fr/spca50x/Download>, I downloaded the current version: spcaview-20051212.tar.gz

The spcaview-20051212.tar.gz package contains a set of tools;

* The Spcaview tool is used to record data streams and can also be used to play data; it can also be used as a network monitoring client;

* Spcaserv is a streaming media server, we use this tool as a monitoring server;

* Spcacat simple picture capture tool, can not be used for network monitoring client;

4.2 Installation of Spcaview software package;

Dependencies

This software depends on libsdl, you need to install it first, download address: http: //, I downloaded: SDL-1.2.10.tar.gz

http: //

[root @ localhost ~] # tar zxvf SDL-1.2.10.tar.gz

[root @ localhost ~] # cd SDL-1.2.10

[root @ localhost SDL-1.2.10] # ./configure; make; make install

Install the SpcaView software package:

[root @ localhost ~] # tar zxvf spcaview-20051212.tar.gz

[root @ localhost ~] # cd spcaview-20051212

[root @ localhost spcaview-20051212] # make; make install

Configure the path of the executable program:

The executable tools are installed in the / usr / local / bin directory, so we also need to configure the user's environment variable PATH. Configure the command execution path and add the following line to the .bashrc file in the current user's home directory;

export PATH = ".: / bin: / sbin: / usr / sbin: / usr / bin: / usr / local / bin: / usr / X11R6 / bin"

Then run the following command;

[root @ localhost spcaview-20051212] # source .bashrc

For the configuration of the path, please refer to: "Linux Commands and Executable Program Path Settings"; "About the Understanding of Paths in the Linux File System"

4.3 Configuration and operation of Spcaserv server;

4.31 The operation of Spcaserv server;

Spcaserv operation method is as follows;

spcaserv [-h -d -g -f -s] [-w Port]

Parameter Description:

-h View help;

-d / dev / videoX specifies the camera device, such as / dev / video0

-g use read method for grab instead mmap

-f image format, default is YUV420P, fourcc I420

jpg JPEG fourcc MJPG

yuv YUV420P fourcc I420

r16 RGB565 16bits fourcc RGB2

r24 RGB 24bits fourcc RGB3

r32 RGB 32bits fourcc RGB4

-v RAW data fourcc RAWD

-s Set the resolution, width x height, such as 320x240, or 640x480, or 160x120;

-w specifies the server's network address or port, such as 192.168.1.3:8888

4.32 Spcaserv running example;

I use this machine at 192.168.1.3 as the network monitoring server, and specify the server to run on port 8888; and the screen displayed when the client monitors is 320x240 resolution;

[root @ localhost spcaview-20051212] # spcaserv -s 320x240 -w 192.168.1.3:8888&

4.33 Configure the HTTPD server so that the client can view it in the browser;

First: install and configure the HTTPD server;

As for the HTTPD server, the Apache server is commonly used in Linux. You can install it through the software package provided by the distribution you use, or you can compile and install it yourself. There are many such posts in the top posts of the LinuxSir.Org network discussion forum; After installing the HTTPD server, start the server.

In Fedora or Redhat, if it is installed with the RPM package provided by it, it needs to be started as follows;

[root @ localhost spcaview-20051212] # /etc/init.d/httpd start

Second: copy the http-java-applet directory under the decompressed directory of the SpcaView software package to the home directory of the WEB server;

For example, the default home directory of Fedora's HTTPD server is / var /, I explained it with my machine, so I will do the following work;

[root @ localhost spcaview-20051212] # cp -R http-java-applet / var /

[root @ localhost spcaview-20051212] # chmod -R 755 / var /

Third: Enter the / var / directory to make the video homepage;

[root @ localhost spcaview-20051212] # cd / var /

[root @ localhost webcam] # cp index-sample.html index.htm

You can view the content of the index.htm file, you can change it yourself, that is, change the foreign language into Chinese; according to your own situation, do it yourself;

Evaporative Air Cooler is a new kind of cooling machine which can save more energy but also has strong cooling ability. With ice box and cooling pad, the air cooler can make your room temperature lower and lower. It is widely used in hotels, restaurants, supermarkets and factories. 

Our well-equipped facilities and excellent quality control throughout all stages of production enable us to guarantee total customer satisfaction. Besides, we have received CE, CB, RoHS and CCC certifications.

As a result of our high quality products and outstanding customer service, we have gained a global sales network reaching America, Asia, Europe, Africa, the Middle East and other countries and regions.

If you are interested in any of our products or would like to discuss a custom order, please feel free to contact us. We are looking forward to forming successful business relationships with new clients around the world in the near future.



Evaporative Air Cooler

Room Air Cooler,Water Air Cooler,Arctic Air Cooler,Air Water Cooler

Ningbo Banshen Electric Appliance Co., Ltd , https://www.banshendq.com