Implementation of a Network Streaming Media Player ... - IEEE Xplore

1 downloads 0 Views 335KB Size Report
Abstract—This paper presents a design of embedded streaming media player. It utilizes the ARM processor S3C6410 and embedded Linux operating system as ...
2012 International Conference on Control Engineering and Communication Technology

Implementation of a Network Streaming Media Player Based on ARM Processor Weitao Xu School of Information Science and Engineering Shandong University Jinan, China [email protected]

Dongfeng Yuan School of Information Science and Engineering Shandong University Jinan, China [email protected] II.

Abstract—This paper presents a design of embedded streaming media player. It utilizes the ARM processor S3C6410 and embedded Linux operating system as platform, and develops an embedded network streaming media player which broadcasts streaming media on the ARM through the transplantation of RTSP protocol and Mplayer. In addition, it selects QT to design the network streaming media player graphical interface. With a real-time streaming transmission technology, some basic functions of streaming media are implemented in this paper. What’s more, the authors design test plans to validate the performance of the media player. After tests, this player proves to play MPEG-4/H.264 streaming data smoothly, so we can conclude that this player can be applied in the embedded system very well. Keywords-Streaming media;

I.

RTSP;

ARM;

Jiali Xu School of Information Science and Engineering Shandong University Jinan, China [email protected] THE STRUCTURE OF THE SYSTEM

This is a general embedded system model. We can connect host machine and ARM embedded board through a serial port. Running the super terminal as ARM embedded board display terminals on the host PC, by the serial port, Uboot, Zimage and file system can be downloaded into the board. In this way, the authors can debug ARM embedded board in the host PC through hard drive cross-compiled program. The tests are implemented in the local area network. Streaming media server and embedded development environment diagram is shown in Figure 1.

Mplayer; QT

INTRODUCTION

With the development of Internet and multimedia technologies, there has been an increase proliferation of network streaming applications. The difference between streaming media and traditional media is that the former can acquire smooth data flow directly and needn’t to download the data to the local machine. So we call the transmission of getting smooth date stream from network streaming transmission [1]. Streaming media does not download all the files and store them, it just writes the beginning of the data to memory. The streaming media data is played as the transmission and has only a few seconds delay in the beginning. In this paper, the new player based on ARM processor S3C6410 is achieved by transplanting RTSP protocol and Mplayer. This player is designed to expand portable, efficient features and it solves some shortcomings of other media players such as difficult to operate, poor performance and inefficient. In order to test the performance of the player, the authors also build a video website on a server on which you can watch the specific video by this streaming media player. In addition, the authors design test plans to validate the performance of the media player, the results show that it fully meets the needs of users on embedded systems. The results and practice prove it is an effective application for embedded systems.

Figure

A.

Streaming Media Server Darwin Streaming Server (DSS) is an open source project intended for developers who need to stream QuickTime and MPEG-4 media on alternative platforms such as Windows, Linux, and Solaris, or those developers who need to extend and/or modify the existing streaming server code to fit their needs [2]. It allows you to send streaming media to clients across the Internet through the streaming media protocols. The following steps introduce the installation and configuration of the Darwin server [3]. #cd

DarwinStreamingSrvrlinux-Linux

#sudo addgroup –system qtss #sudo adduser –system –no-create-home –ingroup qtss qtss #sudo ./Install After the success of installation, we build a video website by PHP on which you can play the video by clicking play button. The video website is shown in Figure 2.

Foundation: Special Funding Project for Independent Innovation Achievements Transform of Shandong Province under Grant No.2009ZHZX1A0108, No.2010ZHZX1A1001 978-0-7695-4881-4/12 $26.00 © 2012 IEEE DOI 10.1109/ICCECT.2012.71

1. System Diagram

719

for the purposes of session announcement, session invitation, and parameter negotiation [7]. It describes the initialization parameters for the media session. This protocol does not deliver media itself but it is normally used to setup the session and facilitate the playback of the streaming data. SDP is intended to be feasible to support new video and audio formats. III. THE REALIZATION OF STREAMING PROTOCOLS

Figure

In order to realize the RTSP function of Mplayer, it is necessary for us to cross-compile and install Live555 library on the host. LIVE555 is an open source (LGPL) C++ library for multimedia streaming. It supports open standards such as RTP/RTCP, RTSP and SIP for streaming [8]. The libraries are well-suited for use within embedded systems. It is designed to support many video and audio formats we usually use such as MPEG/H.264 video.

2. Video Website

B.

ARM Processor ARM is the world's most advanced semiconductor intellectual property (IP) provider, and its core technology is in the development of digital electronic products. ARM processor has been widely used in a lot of systems such as electronic, communication, network and wireless systems. It has accounted for 75% market rates of the 32-bit microprocessor. The ARM technology is infiltrating into every aspect of our lives gradually [4].

A. The Schedule of Live555 Get SDP description from RTSP or SIP, and then call media Session of Live555 to build streaming Session. After that the SDP description can be analyzed by initialize SDP. Open RTSP: 1) Create TaskScheduler and BasicUsag class; 2) Get access to streaming media address, and create RTSPClient object; 3) RTSPClient object sends option commands and parse the response of the server side, accesses the command set that can be used. 4) RTSPClient object sends the DESCRIBE commands, and accesses streaming media to describe the SDP string in the server-side when feedback is received. 5) Create MediaSession object to parse the SDP string, RTP and RTCP are used for communication during this process including the choice of protocol and port; 6) Create specific instance of the Source and Sink object according to the different types of streaming media; 7) RTSPClient object sends SETUP and PLAY commands, after that the server begins to transfer streaming data; 8) TaskScheduler starts event processing loop, process the streaming data by monitoring data packets and calling the registered function.

The ARM chips have the general characteristics of the RISC systems; moreover, some special advanced technologies are adopted in the processor by engineers to ensure the high performance with the minimized chip size and reduced power consumption. Samsung S3C6410 ARM board is used as the development platform in this paper. C.

Streaming Protocols The main protocols used to perform real-time data stream are usually based on the following three protocols: Real-Timing Stream Protocol (RTSP), Real-time Transport Protocol (RTP) and the Session Description Protocol (SDP). RTSP˖The Real-Timing Streaming Protocol (RTSP) acts a control protocol to media streaming servers. RTSP provides an extensible frame to enable controlled, on-demand delivery of real-time data [5]. It establishes connection between two end points of the system and manages the streaming media data. This protocol is intended to control multiple data delivery sessions, provide a means for choosing delivery channels such as UDP, multicast UDP and TCP, and provide a method for choosing delivery mechanisms based on RTP. RTP˖The Real-timing Transport Protocol (RTP) defines a standardized packet format for delivering audio and video over IP networks [6]. It also manages compensation and detection of wrong data sequence, which could occur occasionally during transmission over TCP network. RTP is applied extensively in embedded systems and intelligent terminals, such as PDA, television applications and video services. In addition, RTP also supports multicast transmission of streaming data.

B. The Compilation of Live555 1) Getting into the directory and setting path˖ #cd /usr/src/live555 #export PATH=/usr/local/arm/4.3.2/bin:$PATH 2) Modifying the configuration file˖ #vi config.armlinux a) CROSS_COMPILE=arm-elfCROSS_COMPILE=arm-linux-

SDP ˖ The Session Description Protocol (SDP) is intended for describing multimedia communication sessions

720

b) LINK= $( CROSS_COMPILE)gcc -o LINK= $(CROSS_COMPILE) g++ -o c) LIBRARY_LINK=$(CROSS_COMPILE)ar cr LIBRARY_LINK= $(CROSS_COMPILE)ld -o d) LIBRARY_LINK_OPTS=$(LINK_OPTS) LIBRARY_LINK_OPTS=$(LINK_OPTS) -r CBstatic 3) # ./genMakefiles armlinux 4) # make After the steps stated above, Live555 libraries are successfully installed and when we transplant mplayer as the following parts of the paper it will check Live555 libraries and embody libraries if they are installed.

After the successful compilation, we can get the executable codes of mplayer which can run in the ARM board. When we download this player into the ARM board through a serial port and start it, a sophisticated and practical network streaming media player is implemented. The interface of Mplayer is shown in Figure 3.

IV. THE TRANSPLANTATION OF MPLAYER A.

The Preparation for Compilation MPlayer is a free and open source media player which supports a wide variety of media formats. The program can be used in most of the operating systems such as Linux, Microsoft Windows, UNIX and Mac OS X. We download MPlayer-1.0rc2.tar.bz2 which is the latest version as the source code of transplanting Mplayer. We can enter the directory after decompressing the source code and the steps are shown as follows: 1) 2) 3) 4)

Figure 3.

V.

The Interface of Mplayer

TEST RESULTS OF THE SYSTEM

Test procedures: 1) Start streaming media server. 2) Start the ARM board and connect it to internet. 3) Open the application of browser on the board and visit the video website. 4) Play the video on the website and test the performance. Playing effect of the network streaming media is shown in Figure 4.

# cp MPlayer-1.0rc2.tar.bz2 /usr/mplayer # cd /usr/mplayer # tar - jxvf MPlayer-1.0rc2.tar.bz2 # cd MPlayer-1.0rc2

B.

Compiling Mplayer Files configuration is the first step of cross-compiling Mplayer. We can use “./configure –help” command to check the specific options of configuration. The codes used in this configuration are listed as follows: . /configure --enable-cross-compile --host-cc=gcc --cc=arm-linux-gcc --as=arm-linux-as --ar=arm-linux-ar --ranlib=arm-linux-ranlib --disable-mp3lib --disable-armv5te --disable-armv6 --target=armv4l-linux --enable-static--with-extraincdir=/usr/local/arm/4.3.2/lib/in clude --prefix=/tmp/mplayer --disable-dvdread --disable-mencoder --enable-fbdev --enable-mad --language=en --disable-win32dll --with-extralibdir=/usr/local/arm/4.3.2/lib/lib C.

GUI Design QT is developed by Nokia Company; it is a comprehensive C++ application framework for developing graphical user interface (GUI) that is widely used for embedded Linux devices by using a “write once, compile anywhere” approach. It provides the user with a set of core applications that are expected on major embedded platform and some of the mobile platforms.

Figure 4.

Playing Effect of the Network Streaming Media Player

We devise a form to test some important parameters of the network streaming media player. The test results are shown in TABLEĉ. TABLEĉ. THE PERFORMANCE TEST RESULTS Requirements of performance Streaming media Command of Play and Suspension Network delay Resolution Audio and video synchronization

The graphical interface of this player runs in the embedded Linux system and uses the QT-4.8.0 as embedded graphics library. We design some buttons to realize the play, pause, stop and other functions of streaming media.

721

Test results Hold out Hold out Small 320*240 Synchronous

VI. CONCLUSION This paper describes the implementation of a network streaming media player based on the ARM processor S3C6410 of SAMSUNG, and the system makes use of the Darwin streaming server, open-source RTSP protocol, the Live555 library and transplantation of Mplayer, in addition, it selects QT to design the graphic interface of the player, with a real-timing streaming transmission technology, the play, pause, stop and other functions of streaming media are implemented in this paper. At last the authors design test plans to validate the performance of the media player, the test results show that it completely satisfies the embedded system user’s demand and performs well. REFERENCES [1]

[2] [3]

[4]

[5] [6]

[7] [8]

Xu Peng, “The design and implementation of embedded streaming media player,” a master's degree thesis of Electronic Science and Technology University, pp.14 ,April 2008. http://dss.macosforge.org/ Westerink P, Amini L, Veliah S.A live intranet distance learning system using MPEG24 over RTPPRTSP[A]. IEEE International Conference on Multimedia and Expo[C]. 2002(2). Ci Wenyan, A Building of Streaming Player Client Based on ARM Processor, Biomedical Engineering and Computer Science (ICBECS), 2010 International Conference on. 23-25,April 2010. H. Schulzrinne, A. Rao and R. Lanphier, ̌Real Time Streaming Protocol (RTSP)ā, April 1998. H. Schulzrinne, S. Casner, R. Fredernick, and V. Jacobson, ̌ RFC-1889 RTP: A Transport Proctocol for Real-Time Applicationsā, January 1996. Handley, M. and V. Jacobson, "RFC 2327 SDP: Session Description Protocol", April 1998. http://en.wikipedia.org/wiki/LIVE555

722

Suggest Documents