Design and implementation of video server based on embedded WEB

Publisher:sunyouz1Latest update time:2011-12-22 Source: 中华电子网 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Introduction

Video server is a special embedded device that compresses, stores and processes audio and video data. It is widely used in remote monitoring and video. Video server uses compression formats such as MPEG4 or MPEG2 to compress and encode video data in accordance with technical indicators to meet storage and transmission requirements. With the continuous development of audio and video encoding technology and the development of broadband network technology, video transmission has become easier and cheaper, making the demand for video transmission increasingly growing. Network video surveillance systems based on embedded WEB have gradually attracted widespread attention.

2. Characteristics and principles of network video surveillance system based on embedded WEB technology

The embedded real-time operating system and dedicated hardware structure are adopted. Both the software and the hardware ensure that the embedded network video server has higher real-time performance, stability and reliability than the PC-based system. This video server uses MPEG-4 video compression technology. Compared with compression methods such as MJPEG and H.263, it has the advantages of high compression ratio, small bit rate, good image quality, etc. It is particularly suitable for real-time monitoring in the Internet environment and can save storage space.

This system consists of a camera, an embedded WEB server, a transmission network, and a monitoring terminal. The camera is used to collect video of the monitoring site. The embedded WEB server is the core of the entire monitoring system, which consists of two parts: hardware and software. The detailed structure will be introduced below. Its main functions include: providing WEB access pages for the monitoring terminal; performing validity and security checks on the access of the monitoring terminal; responding to the request of the monitoring terminal and providing the required video images for the monitoring terminal; receiving the control information of the monitoring terminal and controlling the camera after software and hardware conversion. The schematic diagram of the monitoring system is shown in Figure 1.

Figure 1 Schematic diagram of embedded video surveillance system

3. Hardware structure of embedded WEB server

The hardware structure of the embedded WEB server is shown in Figure 2. It is mainly composed of a CPU chip, an MPEG-4 audio and video encoding chip, a Flash chip, an SDRAM memory, an Ethernet interface, and a large-capacity hard disk. The CPU uses the PowerPC series embedded communication processor MPC8250 of MOTOROLA. The MPEG-4 audio and video encoding chip completes the compression and encoding of the video data transmitted from the camera. According to the network bandwidth, topology, and image quality requirements, this system uses a layered scalable encoding scheme based on the MPEG-4 standard. The compressed video data can be stored in a large-capacity hard disk or transmitted over the Ethernet as needed. In order to realize the video storage function, a large-capacity hard disk is required.

Figure 2 Hardware structure of embedded WEB server

4. Embedded WEB server software system

4.1 Embedded Operating System

An embedded operating system is operating system software that supports embedded system applications. It is a special operating system with outstanding features in terms of system real-time performance, hardware relevance, and software solidification.

4.2 Application Software

The application software structure of the server is shown in Figure 3. It mainly consists of several important parts, including WEB server, CGI program, embedded database mSQL, video scheduling and transmission module, storage management and scheduling module, camera control module, etc.

4.2.1 WEB server and CGI program

The WEB server interacts with the browser software of the monitoring end through the HTTP protocol, providing interfaces for other application modules as well as video data browsing interface and camera control interface. In addition, it also controls the access rights of the monitoring end, filters the requests and control information of the monitoring end, and handles the synchronization and priority issues of requests and controls of multiple monitoring ends. The WEB server interacts with the browser by calling CGI programs, that is, the CGI program receives the information sent by the browser to the WEB server, processes it, and sends the response result back to the WEB server and the browser. In principle, CGI programs can be written in any programming language, but CGI programs written in C language have the characteristics of fast execution speed and high security.

Figure 3 Application software structure of embedded WEB server

4.2.2 Embedded Database mSQL

In this system, the storage of user information, user login and logout, storage and query of video equipment parameters, storage and query of video files, etc. all require an embedded database. After comprehensive consideration, this system uses mSQL (MiniSQL) as the background database of this system. mSQL is an excellent embedded database with a compact architecture and low system resource usage, which is particularly suitable for use in embedded Linux systems.

4.2.3 Video Scheduling and Transmission Module

The transmission of video data generally adopts UDP network communication protocol, and the IP transmission methods using UDP include on-demand, broadcast and multicast. Among them, multicast means that the server only sends a data packet to a specific user group, and each user in the group can share this data packet, but users outside the group cannot receive it. This system adopts IP multicast. The advantages of using multicast technology are as follows: it allows the server to bear the video data broadcasting requirements of a large number of clients; due to the small number of data packet copies and the small number of destination addresses, the total amount of data transmitted in the network is greatly reduced, thereby ensuring a higher service quality; it reduces the bandwidth occupied by video data stream transmission and reduces the burden on the server.

The network transmission protocol used in this system uses the RTP/UDP/IP model. The RTP protocol is a protocol that provides end-to-end real-time media transmission services. It consists of two parts: the real-time transmission protocol RTP and the real-time transmission control protocol RTCP. The RTP/UDP/IP method takes into account both the real-time nature of video transmission and QoS guarantee. At the same time, in response to the uncertainty of the transmission network conditions, certain congestion control and error control strategies can also be adopted.

4.2.4 Storage Management and Scheduling Module

The main function of the storage management module is to store the compressed and encoded video information in a specific area of ​​the disk according to a certain strategy, store the video file information in the embedded database, and respond to the request of the video scheduling and transmission module, read the video data from the disk to the memory buffer according to a certain disk scheduling strategy and priority order. This system adopts an equal-length group storage strategy, that is, the video information is divided into several data units according to the time sequence relationship. These data units are called groups, and each group is stored in a fixed-size storage unit.

4.2.5 Camera Control Module

The camera control module mainly realizes the control of the camera. At the monitoring end, the user sends the camera control command to the WEB server through the browser. After the control command is received and processed by the WEB server, it is sent to the camera control module through the CGI program and then converted into the corresponding hardware operation instructions for the camera control, thereby realizing the remote control of the camera pan/tilt lens.

With the development of society, people are constantly putting forward new requirements for the design of video servers. When the system suddenly faces a large number of customer requests, it must solve the problem of high-speed, continuous, reliable and synchronous playback of image and sound data streams. This requires the video server to adopt certain strategies to improve its performance in this aspect during design. In order to further increase the number of service users of the video server and save the system resources of the video server, multicast can be used to uniformly serve those users who request the same program and have the same (similar) routes.

Reference address:Design and implementation of video server based on embedded WEB

Previous article:Design of dimming system for cold cathode fluorescent film viewer using C8051F350
Next article:Application of a rocket automatic tester based on embedded computer PC/104

Latest Industrial Control Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号