5. Simulation of Packet Based Smoothing Algorithm
5.4 Implementation Result
In this section, we demonstrate the network utilization phenomenon of the video streaming system with and without smoothing algorithm. We insert the Packet Mapped smoothing algorithm into our video streaming algorithm with the method described in Section 4.3, and use the external program, winpcap, to record each packet size and its corresponding transmitted(received) time in server(client). The record method is as following. In the server terminal, when the first packet is send to the network, winpcap will record its size and mark the time as 0. Then when the following packets are transmitted, winpcap will record their size and the time that how long this packet is transmitted later than the departure of the first packet. In the client terminal, the method is similar, when the first packet arrival, winpcap records its size and the arrival time is 0. Then the arrival time of the following packets are the time difference between each packets and the first packet.
We use the video file, cindy.mp4, which is compressed with MPEG4, and the frame rate is 25 frames per second, for experiment. Fig. 51 is the example of the transmission record. The server transmits data according to the schedule generated by Packet Mapped smoothing algorithm with 1024 byte maximum packet size and 128K byte client buffer. Fig. 51(a) is the record transmitted packet in server from 9.9 sec to 10.1 sec. Fig. 51(b) is the record of arrival packet in client. Each stems represent a packet, the position of horizontal axis represents the recorded time, and the length of each stems is the packet sizes. This figure shows that the packet will transmitted group by group with an interval of about 40 ms, and the packet groups will arrival at almost the same time interval.
Figure 51: The record of the packet size and time. (a) is the transmitted packets in server. (b) is the received packets in client.
In Fig. 51, we only can see that each packet groups is transmitted and received in a very short period of about 1 ms. Fig. 52 is the record from 9.941 sec to 9.945 sec.
There is only one packet group in this time interval. The server transmits 8 packets in about 1 ms, the packet interval is about 150 micro sec. The client receives these packets also in about 1 ms, but the packet interval is different to the interval in server.
The transmission network jitter results in this variation. The group position is not the same, because of the error in our experiment. The time recorded in server will be
Figure 52: The record of the packet size and time observed in detail. (a) is the transmitted packets in server. (b) is the received packets in client.
We experiment on different client buffer, different maximum packet size and different transmission distance, and then gather the statistics of the packet interval and group interval to observe what smoothing algorithm can do in video streaming system.
Fig. 53 is the record from the server in NCTU to the client in CCU. The transmission schedule is generated by Packet Mapped smoothing algorithm with 1024 bytes maximum packet size and 128K bytes client buffer. (a) is the record in server, and (b) is the record in client. This record shows that the packet group will arrive in a longer period, the time interval of each packet in a group is with more
variation, and some of the time interval is elongated because the network jitter results in the different transmission delay. We show this phenomenon in detail in Fig. 54, which is the same record in detail.
Fig. 55 and Fig. 56 is the transmission record of an unsmoothed schedule. The server transmits all of the frame data at each corresponding frame slot. We can see that when the server transmits with an unsmoothed schedule, the number of packets in each group is with more variation. The server accesses the network for a longer period, and the network jitter is more critical.
Fig. 57 and Fig. 58 is the transmission record of an unsmoothed schedule and from NCTU to CCU. As we mention above, the server may transmits too many packet in a frame slot and the time interval of each packet may be elongated for long distance transmission. These may result in some packet arrive the client too late to be played on time.
According to the record of time and packet size, we can see that the server with smoothing algorithm can transmit data in a more stable state; the number of packet in each group and the network access time is almost constant. Therefore, even for long distance transmission the network jitter won’t result in critical effect.
Figure 53: The record of the packet size and time form NCTU to CCU. (a) is the transmitted packets in server. (b) is the received packets in client.
Figure 54: The record of the packet size and time form NCTU to CCU in detail. (a) is the transmitted packets in server. (b) is the received packets in client.
Figure 55: The record of the packet size and time with unsmoothed schedule. (a) is the transmitted packets in server. (b) is the received packets in client.
Figure 57: The record of the packet size and time with unsmoothed schedule from NCTU to CCU. (a) is the transmitted packets in server. (b) is the received packets in client.
Figure 58: The record of the packet size and time with unsmoothed schedule from NCTU to CCU in detail. (a) is the transmitted packets in server. (b) is the received packets in client.
Next, we show the histogram of the group interval and packet interval to observe the transmission jitter and network jitter.
Fig. 59 to Fig. 62 are the histograms of group interval. Fig. 59 is with smoothed schedule from NCTU to NCTU, Fig. 60 is with smoothed schedule from NCTU to CCU, Fig. 61 is with unsmoothed schedule form NCTU to NCTU and Fig. 62 is with unsmoothed schedule from NCTU to CCU. In our algorithm, we expect that the server transmits data once every 40 ms. However, these histogram in shows that there are errors of about 5 ms to 8 ms in transmission time. Thus a large part of group interval is about 32 ms and 45 ms. Then, we see the histogram in client will spread at the around the peak in server. For long distance transmission, the spread range is larger. The schedule with or without smoothing won’t influence the transmission jitter for one client.
Figure 60: Histogram of group interval with smoothed schedule form NCTU to CCU.
Figure 61: Histogram of group interval with unsmoothed schedule form NCTU to NCTU
Figure 62: Histogram of group interval with unsmoothed schedule form NCTU to CCU
Fig. 63 to Fig. 66 are the histograms of packet interval. Fig. 63 is with smoothed schedule from NCTU to NCTU, Fig. 64 is with smoothed schedule from NCTU to CCU, Fig. 65 is with unsmoothed schedule form NCTU to NCTU and Fig. 66 is with unsmoothed schedule from NCTU to CCU. According to these histograms, we can see that when the maximum packet size is 1024 bytes, the time interval of each packet in server is about 150 micro sec. Through the network, the time interval in client will be divided into two parts, one part is greater than 150 micro sec, the other is smaller than 150 micro sec, and greater than 0, because when a packet is a little bit late to arrive the client, the time interval between this packet and prior packet elongate,
Figure 63: Histogram of packet interval with smoothed schedule form NCTU to NCTU.
Figure 64: Histogram of packet interval with smoothed schedule form NCTU to CCU.
Figure 65: Histogram of packet interval with unsmoothed schedule form NCTU to NCTU.
According to these experiments, it shows that the smoothing algorithm won’t improve the network jitter, but a server with smoothing algorithm can transmit data at a stable rate and average the transmitted number of packets at each frame slots.
Therefore, the transmission period of each packet group shortens, and the effects of network jitter will be reduced.