1 / 31

Implementation of an Android Phone Based Video Streamer

Implementation of an Android Phone Based Video Streamer. N Vun, Y H Ooi School of Computer Engineering Nanyang Technological University. 2010 IEEE/ACM International Conference on Green Computing and Communications

bunny
Download Presentation

Implementation of an Android Phone Based Video Streamer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Implementation of an Android PhoneBased Video Streamer N Vun, Y H Ooi School of Computer Engineering NanyangTechnological University 2010 IEEE/ACM International Conference on Green Computing and Communications 2010 IEEE/ACM International Conference on Cyber, Physical and Social Computing Digital Object Identifier : 10.1109/GreenCom-CPSCom.2010.76  Date of Conference: 18-20 Dec. 2010 Page(s):912 - 915 Adviser : Yih-Ran Sheu Student :Chun-Chang Tu SN:MA120110

  2. Motivation

  3. OUTLINE • ABSTRACT • INTRODUCTION • ANDROID ARCHITECTURE OVERVIEW • DEVELOPMENT TOOLS AND ENVIRONMENT SETUP • VIDEO CAMERA STREAMING SYSTEM • IMPLEMENTATION RESULTS AND DISCUSSION • CONCLUDING REMARKS

  4. Abstract • This paper presents the implemented of the camera on the mobile phone to capture real time video which is then streamed over the WiFi network. Then the video can be viewed on other station connected to the same network using the standard VLC media player.

  5. Introduction 1/3 • Android technology become popular in the consumer electronics market. • They provide very convenient hardware platforms for the developers to implement and test their ideas with much lower cost.

  6. Introduction 2/3 • The main objective of this paper is implement a video streamer on an Android based mobile phone. • The implementation is done completely using open source software tools, software modules and technologies without the need of any special or propriety development tool.

  7. Introduction 3/3 • Figure 1 illustrates the use of an Android phone as the embedded platform, connecting to an IP network using its WiFi interface. • The video can be viewed on LAN PCs using the open-source VLC media player.

  8. Android Architecture Overview

  9. Android Architecture Overview

  10. Android Architecture Overview JVM dx SDK

  11. Development Tools and Environment Setup (1/3) • Development of Android Apps can be conveniently performed using the Eclipse IDE. • For Android App development, extension tools are needed. These extension tools are packaged in the Android Development Tools. • Android SDK starter package contains various development tool chains and libraries are needed by the Eclipse to compile and package the application into the Android Package file.

  12. Development Tools and Environment Setup (2/3)

  13. Development Tools and Environment Setup (3/3) • The emulator cannot support emulation of specific hardware features like camera. • Application that involves networking will also need proper setup of the virtual router. • As such, sometimes it is more convenient, or inevitable, that testing has to be done with the actual phone when the App makes use of the hardware feature.

  14. VIDEO CAMERA STREAMING SYSTEM (1/11) • The application in the Android phone is made up of two modules: a video recorder module and a cross-compiled LIVE555 streamer module.

  15. VIDEO CAMERA STREAMING SYSTEM (2/11) • Implementation of the video recorder module makes use of the Media Libraries provided in the Android SDK. • It involves extending the SurfaceView class, creating a SurfaceHolder class and a MediaRecorder class, and implementing a SurfaceHolder.Callback function.

  16. VIDEO CAMERA STREAMING SYSTEM (3/11)

  17. VIDEO CAMERA STREAMING SYSTEM (4/11) • LIVE555 is used as the engine for streaming the video file in this implementation.

  18. VIDEO CAMERA STREAMING SYSTEM (5/11) • As the source code of the Live 555 is created in C/C++, it cannot be compiled to run as a native Android App. • There are two ways to integrate the package into this system: cross compiled the code and run it as a standalone C program, or modify it and compiled as a shared library package.

  19. VIDEO CAMERA STREAMING SYSTEM (6/11) • LIVE555 uses the glibc for its library, which is not included in the standard Android libraries. • To overcome this, Live 555 has to be linked statically during compilation, i.e. all the library functions needed are included in the executable code.

  20. VIDEO CAMERA STREAMING SYSTEM (7/11) • The compiled LIVE555 program is then transferred to the appropriate file directory in the phone.

  21. VIDEO CAMERA STREAMING SYSTEM (8/11) • Another complication is standard Android phone is set to restrict user with limited access to its lower level functions and features. • To start the LIVE555 server through a shell command, the user needs to have root access in the operating environment. • Hence a further step is needed here, the ‘rooting’ of the Android phone.

  22. VIDEO CAMERA STREAMING SYSTEM (9/11) • Another alternative is integrate the LIVE555 code together with the Video recorder code and package them as an .apk file. • This will involve the modification of the LIVE555 code to make it as a library function, and combination of the C/C++ and Java languages in an application.

  23. VIDEO CAMERA STREAMING SYSTEM (10/11) • This can be achieved by Android’s recent release toolkit, viz. the Android Native Development Kit . • This toolkit allows the programmers to embed native C/C++ code into Android application. • Java Native Interface method is used to bridge the communication between the Java application and the native C/C++ code.

  24. VIDEO CAMERA STREAMING SYSTEM (11/11)

  25. IMPLEMENTATION RESULTS AND DISCUSSION (1/5)

  26. IMPLEMENTATION RESULTS AND DISCUSSION (2/5) • The video of the clock running on the first PC monitor is captured by the Android phone, then streamed through the phone WiFi link to a LAN router, which is then playback in real time by a VLC player running on the second PC. • There is no observable throughput delay in the streaming process under normal network condition.

  27. IMPLEMENTATION RESULTS AND DISCUSSION (3/5) • However, though not clearly noticeable in the photo, there is playback frame delay between the source and the playback image. • The delay will depend on the instance the VLC media player is started. This is due to the use of the file as a buffer between the two software modules running on the Android phone.

  28. IMPLEMENTATION RESULTS AND DISCUSSION (4/5) • While the video recorder module will start recording the video into the file upon launching by the user, the LIVE555 will only start streaming the video upon receiving the request from the VLC player. • As the LIVE555 streamer starts the video from the beginning of the file, it streams the image that was recorded earlier.

  29. IMPLEMENTATION RESULTS AND DISCUSSION (5/5) • Another consequence of using the file buffer is that the system will stop operation once the file size exceeds the maximum limit that the Android platform can support. • To overcome these limitations, the two software modules have to be further modified such that data can be passed directly between them in real time

  30. CONCLUDING REMARKS • This paper describes the successful implementation of a video streamer system using an Android phone as the video capturing device. • As the system was setup as a preliminary investigation and evaluation of using the Android platform for embedded applications, certain limitations remain in the implemented system.

  31. REFERENCES [1] http://www.npd.com/press/releases/press_100804.html [2] http://developer.android.com/guide/basics/what-is-android.html [3] http://developer.android.com/sdk/eclipse-adt.html [4] LIVE555 Media Server, http://www.live555.com/mediaServer/ [5] VLC Media Player, http://www.videolan.org/vlc/ [6] N. Vun and M Ansary, “Implementation of an Embedded H.264 Live Video Streaming System”, IEEE ISCE 2010 [7] http://en.wikipedia.org/wiki/Rooting_(Android_OS)

More Related