Keywords

1 Introduction

Since the twentieth century, the computer network technology, modern communications technology and the artificial intelligence technology have developed greatly. The range of applications of real-time video transmission are increasingly widespread, not only requires the adaption to a known environment and the more important work environment of the future such as military reconnaissance, rescue and relief, but also requires the detection of high pollution of the environment, anti-terrorism blasting, mine safety accident rescue in many areas.

But remote monitoring, remote education, remote medical diagnosis, remote shopping, remote access, television and telephone conference, etc. applications urgently need a network video transmission. Therefore, the research and design of a reliable wireless video transmission system is an urgent task.

Wireless video transmission based on the IEEE802.11 protocol [1], transmission control use the TCP and UDP protocols, but to some extent, it cannot meet the requirements of the wireless video transmission. So the system uses the RTP protocol [24] based on the application layer extended in this paper, the RTP protocol is a transmission control protocol used for real-time audio, video and other multimedia data which includes RTP and RTCP two sub-protocols: RTP is used for end-to-end transmission of real-time data, RTCP for quality of service monitoring and network diagnostics. RTP runs on top of UDP generally, both of them works together to accomplish the functions of the transport layer protocol. Its upper layer is the application layer, which mainly includes sound, video and data. RTP receives multimedia information streams (such as H.264 video) from the application layer, encapsulated into RTP packets, and then sends to the underlying UDP. In addition, RTP is an open application protocol, and the characteristic is that the basic functions can be clearly reflected in the user’s program.

When the application starts the RTP session, the sender will use two adjacent UDP port number, even-numbered is used to send RTP packets, and odd numbers is used to send RTCP packets, during RTP session, participants periodically send packets, shown in Fig. 4.1. RTP itself neither provides a reliable delivery mechanism for RTP packets in order, nor provides flow control or congestion control; it relies on supporting the use of RTCP to provide these services. RTCP packets contain the number of data packets that have been sent, the situation of the missing data packets, etc. RTCP packets sent in the receive direction, which is responsible for monitoring network quality of service, communication bandwidth and transmission over the Internet, and send the information to the sender. Transmit end can use the information provided by RTCP dynamically to change the transmission rate, and even change the payload type. Use RTP and RTCP together can provide flow control and congestion control service, and it can optimize the transmission efficiency by effective feedback and minimal spending, so they are particularly suitable for real-time data transfer.

2 Wireless Video Transmission System Design

2.1 Wireless Video Transmission System

In order to meet the video transmission requirements that the occasion is not fixed or unknown environment, it is necessary to consider from two aspects: one aspect is to design a wireless video transmission link and another aspect is video capture and encoding transmission. Wireless video transmission link comprises three categories of nodes, the first is a video capture terminal which is ended by a mobile terminal, embedded the WIFI modules and video capture encoding module with the node which is responsible for video capture, encoding compression and subcontracting transfer; the second is a wireless AP points with embedded WIFI module, which is responsible for the wireless link repeaters and packet forwarding, the node requires several according to the actual situation; the third one is a remote control center which can be a wireless network PC, which is responsible for receiving the video data packets, sort reorganization, video decoding and display, and the control of the wireless transmission network.

In an unknown environment, in order to meet the needs of wireless network video transmission by setting wireless AP point in advance, or setting the AP point on the way according to the needs by a mobile device to set up the wireless transmission link. The structure of the wireless video transmission system is shown in Fig. 85.1.

Fig. 85.1
figure 1figure 1

Wireless video transmission system structure

The wireless video transmission system captures video through the video capture terminal site while doing the H.264 video compression coding, and then do the RTP sub-transmission through AP point, the control terminal receiving the video packets transmitted and decoded to restore an image display.

2.2 Wireless Video Transmission Scheme Analysis

Wireless video transmission is different from the wire environment, the bandwidth is stability in wire network, and change of the signal is very small, loss or disorder of data packets occur rarely, transmitting a video sequence uses I frames, B frames and P frames,as IBBBPIBBBPIBBBP… or IPPPIPPPIPPP… sequence. For each I-frame or P-frame can be carried out in accordance with the fixed-size the RTP subcontractors transmission. In the wireless network environment, the design requirement of real-time video transmission system is strict, while transmitting a video sequence with a sequence of I frames and P frames can be ok by using the RTP/RTCP protocol based on application layer extension. For each I-frame or p-frame can be transported according to a fixed RTP packets size, and also need to adjust the quantization parameter or other network-oriented video coding techniques to adapt to changes of the wireless network bandwidth and flow through the “frame skip”. This may cause the out-of-order packet loss and the emergence of the “chaotic” situation, and therefore need shuffle rearrangement and RTCP feedback control messages dynamically adjust the flow and timely recovery of a frame video data, then decode and display.

2.3 Wireless Video Transmission System Structure

The video transmission system in this article is designed for wireless network environment, and is oriented towards the application., which can be designed for different structural forms facing different needs and different occasions in the practical application and development process, Here are the structure of the point-to-point video transmission system, shown in Fig. 85.2.

Fig. 85.2
figure 2figure 2

Diagram of Transmission system

3 The Key Technologies of Wireless Video Transmission

3.1 RTP Packet and Its Package

Wireless real-time video transmission system uses H.264 compression coding [58]. The transmission control subsystem is constructed based on the RTP/RTCP protocol, completed by the UDP used by the transport layer communication. The compressed video stream does the RTP subcontract package, and then transmits to the remote through the network, separates the received RTP packet at the receiving end and remove valid data, then decodes and displays, and Receiving end sends RTCP control packet to the sender, feedbacks the situation that the network is sent, the sender end analyses and adjust send hairdo according to the network conditions. A video stream RTP packet generally consists of a fixed head of RTP, RTP payload header and RTP payload.

The RTP data packet format has some differences for the different systems under normal circumstances, for a particular system, the RTP data packet format need only two parts, namely the RTP fixed header and the payload of two parts.

Payload that is, to form the video source collected to the stream by compression coding, encapsulate the stream into RTP data packets by a cyclic process, and then transmit to the remote. The video payload of the RTP packets can be differentiated according to the different network subcontract. The system uses IPPP4 frame loop stream format to send video sequence, a simple and effective subcontracting is to divide a frame data (I and P frames) separately into several RTP packets. A commonly divided data packets method is to divide an image of good coding compression into two packets in accordance with the parity number of the macro-block, the first packet includes all of the odd macro-block, the second packet includes all of the even macro-block, and each RTP packet must contain the header information. Complex subcontracting and stream structure combined with each other.

3.2 Wireless Video Transmission Control Method

In order to meet the quality requirement of real-time transmission system, uses one kind of 2 levels comprehensive control methods, video coding is divided to basic layer and expand layer in level 1, when network load is large only transmits the basic level, the basic level may meet the basic display of video, in level 2, through the feedback of RTCP and appraising the network load situations, carries on the dynamic flows control, includes several methods of “the selective sending”, “adjusts the sizes of RTP data packets automatically”,“realigning disordered data packages”.

A transmission control model is established on the second level in order to improve the stabilities of the wireless video transmission system, as shows in Fig. 85.3.

Fig. 85.3
figure 3figure 3

Model diagram of the control of transmission

The sampling frequency is amounts of collected images of camera each second, here, presumes camera collects 25 images each second. There is not enough time to encode and transport each image in the actual transmission process, which leads to the occurring of the delay and instability as transporting images, therefore, we must associate actual situations of the network to decide the sampling frequency (i.e. jump frames processing). The control method is that: suppose gathering the image frames each second is F(x, y), the network situation weight is Q(x, y), F(x, y) initialization of F is 25, as follows:

$$ F(x,y) = \left\{ {\begin{array}{*{20}c} {\frac{25}{{1 + {\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 {Q(x,y)}}}\right.\kern-0pt} \!\lower0.7ex\hbox{${Q(x,y)}$}}}}} & {} & {x \ne 0} \\ {25} & {} & {x = 0} \\ \end{array} } \right. $$
(85.1)

where x represents the transmission delay of the network condition, x = 0 indicates that the network transmission delay is small. x = 1 represents the transmission delay and x = 2 indicates that the network propagation delays large. Where y represents disorder and packet loss, y = 0 represents that the network transmission disorder or packet loss did not occur or little.

Q (x, y) > 0, F (x, y) ∈ [10, 25], the network real-time effect is poor if it is less than 10, the transmission quality is low, you can stop the transfer, and perform maintenance or re-commissioning solve.

So we can adjust the sampling frequency timely to adapt to the current network transmission requirements through the feedback network conditions.

The system encapsulates individually each I-frame or P-frame into RTP packets in accordance with a predetermined size; Set the initial value for each RTP payload to 1024 K, and then change flexible according to the effect of the actual network transmission when the network is inefficient. If it is found that there is a serious disorder and frequent packet loss occurring at receiving end, need to control the sampling frequency (skip frames), at the same time change the packet size of the RTP data packet to achieve good implementation of real-time transmission by adjusting. Set RTP data packet size as S, then:

$$ S(x) = \left\{ {\begin{array}{*{20}c} {\frac{2048}{{1 - {\raise0.7ex\hbox{${F(x,y)}$} \!\mathord{\left/ {\vphantom {{F(x,y)} {Q(x,y)}}}\right.\kern-0pt} \!\lower0.7ex\hbox{${Q(x,y)}$}}}}} & {} & {x \ne 0} \\ {2048} & {} & {x = 0} \\ \end{array} } \right. $$
(85.2)

where Q(x, y) reflects the degree of congestion in the network. S(x) ∈ [2048, 4096].

The general single RTP packet does not exceed 4096 K according to the experimental analysis, so you can have a better quality of transmission in different network environments.

The key of the problem is how to identify a suitable network transmission quality reference weight by analyzing the receiver situation at the receiving end. And then fed back the reception conditions and analytical results to the transmitting side by the RTCP packet of the sending and receiving end to adjust the way of the sending end. This process is a dynamic equilibrium process is also the quality control process of the entire transmission system.

$$ \begin{gathered} Q(x,y) = \sum\limits_{c = 1}^{n} {\frac{{\sqrt {x + y} }}{{\sqrt {\begin{array}{*{20}c} {x2} + y2 \\ \end{array} }}}}\quad x = 0,1,2, \ldots \hfill \\ y = packet\,loss\,or\,the\,number\,of\,out\,of\,order \hfill \\ \end{gathered} $$
(85.3)

where n may have different values according to the different requirements, the meaning is to examine the receiving condition of n times of the receiving end n times, the present system n = 5.

4 The Experimental Results and Analysis

When the wireless video transmission starts, the collection terminal and the control center connect through the wireless AP link firstly. After connection, the transmission side starts the video capture, while compressing encoding the video, outputting the I frame eligible for a P-frame image, RTP sub-packaging the compressed image information, and is formed to the RTCP sender report, transmitted to the receiving end, and then send RTP subcontractors one by one until an information transmission is completed, and then proceed to the next cycle.

The control terminal receipts that the RTP packets are transmitted by the collection side and stores to the corresponding location of the cache according to the rearrangement algorithm, calculates the situation of the disorder and the packet loss combined with analysis of previously-received RTCP sender report, and then on one hand deals with the missing data packet through interpolation treatment methods,recoveries to form a code stream, and decodes the output and displays; on the other hand, forming a receiving side report and feedback so that it is easy to control the traffic or other measures for the sender.

The rearrangement algorithm as follows:

Firstly, the smallest serial number minsequence of an image subcontracted is obtained by the formula:

(Current packet sequence number - the smallest serial number) * the length of the packet;

receivestru [i]. sequ- minsequence.

For (i = 0; i < jjj; i + +).

{memcpy (cc + (1024 * (receivestru [i]. sequ-minsequence)), receivestru [i]. receivedata, eceivestru [i]. length);} receivestru[i].sequ is the current serial number.

Determine the address, the receiving data would be write into the corresponding memory space, and be decoded to restore an image data, and then display. Control the transmission quality timely, such as frame skipping and control packet-divided size according to the RTCP packets feedback by the wireless network receiving terminal. The achievement of skipping is: when initialization, F (0,0) = 25, corresponding sleep (0); control skipping by the changes of the parameter t of sleep (t). When the network changes, it gets the control parameters Q through the feedback, and dynamically adjust skipping based on network conditions Q in the receiver. In addition, a simple control is fault-tolerant can skip and receive another I frame again from the next cycle if an error occurs when the receiver receives I frames, this fault-tolerance is very convenient, and also very practical.

Wireless video real-time transmission system interface as shown in Fig.  85.4, through wireless network in the experiment many times, some conclusion shown in Table 85.1, jump frame phenomenon is obvious in the wireless network environment, transmission frame rates generally keeps in 10 ~ 15 frame/s. The effect is very good when the video background fast moving, operation complexity increases, the transmission frame rates need be reduced, and adjusts frame rates in time to ensure the stable quality of transmission.

Fig. 85.4
figure 4figure 4

The interface of real time transmission system

Table 85.1 Comparsion of real time transmission system

5 Conclusion

This paper presents a model of real time video transmission system based on WIFI. It is concluded that the demand of the transmission performance is higher and transmission quality control is important in wireless network environment by several experiments,. It is very difficult to guarantee the quality of the transmission if there is no flexible control method. RTP packets size divided method can adapt to the dynamic changes of the wireless network. This system has practical applications mean, such as in unknown environment detection, pollution of the environment live video transmission, etc., and can be developed and applied under DSP environment, such as ROV and exploration robot. In a word, the design of the system adopted some new methods: (1) the fault-tolerant; (2) the two levels treatment structure; (3) comprehensive control system, including the “frame skipping”, RTP packets size appropriate adjustment, etc. These can meet requirements of the wireless video transmission based on WIFI basically.