A Control Mechanism of Stream Media Based on 3 G Network

In this paper, we use RTP/RTCP over unreliable UDP to realize the transportation of real time streaming. Meanwhile, according to the transmission feedback and network parameters, we analyze and calculate the network delay, packet loss and RTT (round trip time) to determine the network state. Finally, we propose a streaming media transmission control scheme which could sense the network state and quickly adjust the rate of the sending side. It takes congestion, packet loss rate into comprehensive consideration and improves the overall performance of 3G network stream media.


Introduction
With the development of wireless network, a variety of applications based on that come into live.A lot of research has already done on how to improve the performance of the high speed wireless network, including control mechanism.An Explicit Congestion Notification (ECN) [1] based on congestion control mechanism controls sending rate by marking the IP packets but can not control rate properly when a continuous packets loss happens.The end-system based source algorithm detects the nature and discriminate packet loss types to improve network performance by relative one-way trip time (ROTT) [2] or packet inter-arrival times [3].
As the development of the wired network is already quite mature, most of the current wireless applications are built in the IP packet network based on heterogeneous wireless-wired hybrid network in which two main error types may affect the quality of stream media when we transfer media data [4,5].They are congestion error in wired network and burst interference error in wireless channel.Most of the algorithms mentioned above can not deal with the burst interference error.Several approaches have been made to differentiate these two types of error [6][7][8].
In this paper, we distinguish the wired congestion as long time congestion from the wireless congestion as short time congestion.Our focus is to design a rate control mechanism considering the packet loss rate and RTT which can adjust the sender behavior smoothly and when congestion happens we can detect, classify and control it, thus we may get a higher utilization of the networks, improve the throughput and increase the packet successful delivery rate of the wireless networks.

RTP/RTCP
RTP is an IP based application layer protocol which supports real time audio and video data transmission.It encapsulates the stream application data into RTP packet and then transfers through UDP.It meets the needs of high efficiency and real time character in real time stream media transmission since UDP is an unreliable and connectionless oriented protocol which does not contain retransmission mechanism nor waiting for confirmation mechanism.
RTCP is real time control protocol which, in other words, should be used together with RTP.When the program starts an RTP session, it will occupy two ports for both RTP and RTCP.RTP itself does not guarantee the reliability of the data, nor does it analyze and control the network throughput and congestion.All of this should be done with RTCP.Generally speaking, RTCP uses the same distribution mechanism with RTP.It sends control message to all the session members periodically and reports to application about the related information concerning the session member.The information usually includes the quantity sent, quantity received, packet loss rate, network delay, jitter and congestion.The application might make full use of these kinds of information to adjust network state for the sake of media QOS (quality of service).The detailed information of RTP/RTCP is shown in RFC 3550 [9].

System Module
Stream media transmission system is the core of the whole system and its main job is to guarantee a high efficiency stream media transmission.To achieve that, there must be an interactive scheme between server and client which could provide a better QOS under all the circumstances.Figure 1 shows the stream media transmission system module.Front end audio and video data are encapsulated into RTP packet which would be stored and transmitted in the send buffer.This process is regulated through RTCP in order to prevent the network congestion.While the client receives the RTP packets, it puts them into receive buffer for restoring and analyzing.The restored data is sent to decoder for audio and video and the analyzed data is built into an RTCP packet to the sender for feedback.

Network Parameters
Black screen, mosaic, image pause, buffering phenomena often occur in the process of stream media services which strongly reduce the service QOS.Many factors contribute to these cases among which network congestion and packet loss are the main causes.
In order to improve the QOS of stream media, we take network parameters as real time transmission condition and dynamically changing basis.During the transmission, stream server gathers RTCP data periodically and calculates the QOS parameters.Sender receives RR (Receiver Report) and analyzes the current state of the network, then promptly adjusts the rate of media by changing the resolution and frame rate.
The packet loss rate is defined as the ratio of the number of the missing data packet and sending data packet.Define the packet loss rate and the number of packets expected .Before the moment t, the receiver got the maximum and minimum sequence of RTP packet as and , so here we have: (1) Suppose in reality the number we get the RTP packet is and the lost , then: ( From the above, we get the packet loss rate: (3) RTT value calculation: After the SR arriving, receiver sends an RR for feedback.We define the delay between the SR and RR as DLSR (delay since last SR).We get LSR (last SR timestamp) from the NTP of SR and put LSR and DLSR into the corresponding RR field.Suppose at moment A the receiver receives SR, then the one-way delay is (A-LSR).The receiver sends the RR at time B, then DLSR is B-A.Finally the sender receives the RR at time TB, then the RTT value can be calculated: (4)

Stream Media Control Mechanism
The streaming transmission control is mainly reflected in the media sending rate adjustment according to the network conditions.We mainly focus on reducing packet loss rate and the probability of congestion to achieve a higher quality of video.

Image Quality Determination
For long time congestion, packet loss is mainly due to network overload, so packet loss rate can be used as the basis of long time congestion.For short time congestion, large value of RTT is always expected, so we detect RTT value as the basis of short time congestion.
First, let's take long time congestion into consideration.We define the network parameters' threshold according to the image quality requirement.These values include packet loss rate and jitter etc according to which the network status can be classified into three categories.They are under-loading, full-loading and over-loading.Let M and N be the two threshold values for the three states.When packet loss rate is less than M, it indicates that the network is under-loading, so we can increase the sending rate to acquire a higher QOS.When packet loss rate is between M and N, it means the network is full-loading and we don't have to change the sending rate.But when packet loss rate is more than N, we should slow down the sending rate to convert the over-loading network to a normal level.Figure 2 shows the relationship between network status and packet loss rate.
Packet loss rate directly affects the quality of picture which can be determined by PSNR (Peak Signal Noise Ratio) and MOS (Mean Opinion Score) [10].PSNR is defined as follow: The meaning of each part is shown in Table 1: MOS is widely used in audio and video quality measurement.This method uses arithmetic average to get the system running status of quantitative indicators of subjective evaluation.MOS can be divided into 5 grades as grade 5 means the picture is of best quality while grate 1 indicates the picture worst.Table 2 shows the correspondence between PSNR and MOS.

Determine the Threshold
Experiment uses multiple H.264 video streams which have been packaged into RTP packets and under multiple random packet loss condition to determine M and N.According to formula (3) and ( 5) we draw a relationship between packet loss rate and PSNR.Also, we take down the RTT value of each stream.The experiment is recorded in Table 3: According to the table, we get Figure 3. From Figure 3 we can see, when PSNR is less than 20 dB, which means packet loss rate is greater than 3%, MOS value is 2, that is to say, the picture quality is very poor.Generally speaking, when PSNR is greater than 20 dB, the video quality is acceptable.On the basis of Figure 3, we select N 4% and M 2%.

Under-loading
Over-loading Full-loading Packet loss rate    Moreover, for the sake of network stability, a packet loss smoother is used to smooth the packet loss parameter.This is particularly effective when network faces the jitter problem as we shall observe a rather longer period of time to determine the packet loss and send rate.After the smooth procedure, the packet loss rate is: where 0 1 λ < < , the larger λ is, the more influence the new packet loss has.Here we set λ = 0.3.

Rate Control Mechanism
As we have already seen in Table 3, PSNR does not only have relationship with packet loss rate but also RTT value.It is shown that if the current RTT value exceeds a normal too much, the quality sharply goes down, and it's also not proper to have the same control algorithm with those whose RTT value is at a relative normal value.So when short time congestion occurs, we reduce the send rate to half of the current one.When long time congestion happens, we adjust the send rate by AIMD[41] scheme as the following formula.
( ) where α and β are constants for rate adjustment, R (n) is the send rate at n moment, and 2% and 4% is the threshold value.The whole control mechanism flow chart is shown in Figure 4.

Experiment and Result
After we implement the control mechanism, the experiment result is shown in Figure 5. Video server can adjust to network congestion by regulating the send rate through RTCP.The overall QOS is improved.Figure 5(a) is a picture whose RTT value exceeds a normal value too much, which means the network encounters a short time congestion.So we cut the send rate value to half of the former.Figure 5(b) shows the result.Figure 5(c) is a picture whose packet loss rate is 3.2% and PSNR value is 19 dB.It has mosaic effect and MOS grate reaches only 2. Figure 5(d) is a picture whose rate has been regulated and it has a packet loss rate of 1.5%, and its MOS reaches 27.There is no mosaic on the picture and the total quality is acceptable.

Conclusion and Further Work
In this paper, we use RTP/RTCP over unreliable UDP to realize the transportation of real time streaming over 3G network.Several parameters are measured during the transfer as packet loss rate and RTT value to determine the network status.Finally, we propose a stream media transmission control scheme considering the above two parameters to regulate the send rate.Experiments show that this kind of scheme could enhance the network stability by adjusting to network variation.There are several future works in this paper.Since we have already implemented the algorithm considering packet loss rate and RTT, some other parameters such as jitter and bandwith might be under consideration in the future.

Figure 1 .
Figure 1.Stream media transmission system module.

Figure 2 .Table 1 .
Figure 2. Network status and packet loss rate.Table 1. Meanings of symbol in PSNR.Signal Meaning n Picture sequence number

Figure 3 .
Figure 3. Relationship between PSNR and packet loss rate.