Mul$media Support in Android

Similar documents
Mul$media Techniques in Android. Some of the informa$on in this sec$on is adapted from WiseAndroid.com

Introduction to Mobile Application Development Using Android Week Four Video Lectures

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL II)

Mul$media Streaming. Digital Audio and Video Data. Digital Audio Sampling the analog signal. Challenges for Media Streaming.

CS 528 Mobile and Ubiquitous Computing Lecture 4a: Playing Sound and Video Emmanuel Agu

Multimedia Support Classes Playing Audio Watching Video Recording Audio

Completing the Multimedia Architecture

CS 457 Multimedia Applications. Fall 2014

UNDERSTANDING MUSIC & VIDEO FORMATS

CS378 -Mobile Computing. Audio

Contents. Player Camera AudioIn, AudioOut Image & ImageUtil AudioRecorder VideoRecorder AudioDecoder/Encoder, VideoDecoder/Encoder

Chapter 28. Multimedia

Streaming Media. Advanced Audio. Erik Noreke Standardization Consultant Chair, OpenSL ES. Copyright Khronos Group, Page 1

Digital Audio Basics

Networking Applications

Noisy Androids Mastering the Android Media Framework

Introduction to LAN/WAN. Application Layer 4

TRIBHUVAN UNIVERSITY Institute of Engineering Pulchowk Campus Department of Electronics and Computer Engineering

Product information C: Installation

ES E 3 3 L a L b 5 Android development

OpenMAX AL, OpenSL ES

Chapter 20: Multimedia Systems

Chapter 20: Multimedia Systems. Operating System Concepts 8 th Edition,

Chapter 5.5 Audio Programming

the gamedesigninitiative at cornell university Lecture 15 Game Audio

Introduction into Game Programming (CSC329)

Multimedia Networking

5: Music Compression. Music Coding. Mark Handley

Android Overview. Most of the material in this section comes from

3.01C Multimedia Elements and Guidelines Explore multimedia systems, elements and presentations.

CS 218 F Nov 3 lecture: Streaming video/audio Adaptive encoding (eg, layered encoding) TCP friendliness. References:

ITP 342 Mobile App Dev. Audio

TX G1

Integrated Kickstand

PN ITEM UPC ARCHOS 70d Titanium 8GB - EU

Android Native Audio Music

PN ITEM UPC ARCHOS 70c Neon 8GB - EU ARCHOS 70c Neon 16GB - EU

Chapter 7 Multimedia Networking

Gecata by Movavi 5. Recording desktop. Recording with webcam Capture videos of the games you play. Record video of your full desktop.

ARM MPEG-4 AAC LC Decoder Technical Specification

Multimedia Networking Introduction

Designing the ideal video streaming QoE analysis tool

Helix DNA Framework. Yann Cadic Quentin Désert. Multimedia Programming Helsinki University of Technology

Directory. Product overview. Connecting your media player. Specification. Interface. Explanation of the remote control. Connector Indication

Core Audio. MSDOSX : Lecture 20

Image and video processing

History of Audio in Unity

About sounds and Animate CC

HTML 5 and CSS 3, Illustrated Complete. Unit K: Incorporating Video and Audio

Tararira. version 0.1 USER'S MANUAL

Smart Pianist FAQ. Availability of certain functions differs depending on the connected instrument.

Smart Pianist FAQ. Availability of certain functions differs depending on the connected instrument.

CSCD 433/533 Advanced Networks Fall Lecture 14 RTSP and Transport Protocols/ RTP

Remote Health Monitoring for an Embedded System

Video Conference Recording Solution

Embedding Audio into your RX Application

Video compression software

Technologies Web Côté client

Ultimate Video Capture v1.8 User Manual

EP7209 Development Kit. Quick Start User s Guide

PN & UPC codes PN Item UPC ARCHOS 50 Power 16GB EU ARCHOS 50 Power 16GB UK

Level Editor. Should be stable (as of Sunday) Will be updating the source code if you want to make tweaks to it for your final

Perceptual Coding. Lossless vs. lossy compression Perceptual models Selecting info to eliminate Quantization and entropy encoding

Multimedia on the Web

HIGH PERFORMANCE VIDEO CODECS

Network Coding: Theory and Applica7ons

Tema 0: Transmisión de Datos Multimedia

Ardour3 Video Integration

Manual Windows Media Player 11 Codec Xp Mp4 Video

CS640: Introduction to Computer Networks. Application Classes. Application Classes (more) 11/20/2007

Windows Media Player Manual Update Xp Dvd Decoder

Window Media Player Manual Update Xp Dvd Decoder

DbsEditor v1.8 (Database Editor) QUICK REFERENCE

DVS-200 Configuration Guide

Description: Features: WTR010-SD module

Multimedia Systems Giorgio Leonardi A.A Lecture 1: General information and Introduction

STAROS user manual. Headquarter Flat D, 5/F, Excelsior Building, 364 Nathan Rd., Kowloon, H.K TEL: (852) FAX: (852)

Quality Audio Software Pipeline. Presenters Subhranil Choudhury, Rajendra C Turakani

Installing the driver software USB Audio Driver Installation Manual (Mac)

KEY FEATURES PN & UPC CODES. PN ITEM UPC ARCHOS Access 70 3G - 8GB EU

Streaming (Multi)media

Multi Analog Video To HDMI UHD. 4Kx2K Scaler. With USB Media Player

Optimizing Audio for Mobile Development. Ben Houge Berklee College of Music Music Technology Innovation Valencia, Spain

CS519: Computer Networks. Lecture 9: May 03, 2004 Media over Internet

MEDIA RELATED FILE TYPES

HD Streaming Box CL3BS USER MANUAL

NID- 7006A. Memory Powered by Android TM OS 4.1

Announcements. Today s Topics

PN ITEM UPC ARCHOS 55b Platinum 8GB EU ARCHOS 55b Platinum 16GB EU

PN ITEM UPC ARCHOS 101c Helium - 16GB EU

USB2.0 USER S GUIDE V1.1

Microcontroller Compatible Audio File Conversion

VSPlayer Software User Manual

Squeeze Play: The State of Ady0 Cmprshn. Scott Selfon Senior Development Lead Xbox Advanced Technology Group Microsoft

Android Multimedia Framework Overview. Li Li, Solution and Service Wind River

Our Technology Expertise for Software Engineering Services. AceThought Services Your Partner in Innovation

VLSI Solution. VS10XX - Plugins. Plugins, Applications. Plugins. Description. Applications. Patches. In Development. Public Document.

Key features: PN & UPC Codes: PN ITEM UPC

Welcome to MainConcept AAC Encoder - Plug-In for Adobe Flash Media Live Encoder -

Audio Compression. Audio Compression. Absolute Threshold. CD quality audio:

Transcription:

Mul$media Support in Android

Mul$media Support Android provides comprehensive mul$media func$onality: Audio: all standard formats including MP3, Ogg, Midi, Video: MPEG- 4, H.263, H.264, Images: PNG (preferred), JPEG, GIF (not recommended) Several different media formats and codecs are supported You can play audio or video from: Media files stored in the applica$on's resources (raw resources) Media files in the filesystem (e.g., SD Card) Data stream arriving over a network connec$on. COMP 107x (Muppala) Mul$media in Android 2

Mul$media Support MediaPlayer class Long sustained playing of audio/video Primary API for sound and video SoundPool class Short bursts of sound AudioManager Managing audio output and audio sources COMP 107x (Muppala) Mul$media in Android 3

2D Graphics with SurfaceView Exercise Off to the next exercise: Using SurfaceView instead of a View Background thread COMP 107x (Muppala) Mul$media in Android 4

The MediaPlayer Class

Media Playback and Recording Standard method to manipulate audio/video: Media playback supported through the MediaPlayer class Media recording supported through the MediaRecorder class Creates its own thread for processing Requires audio as file or stream based data COMP 107x (Muppala) Mul$media in Android 6

MediaPlayer Methods Crea$ng a media player: MediaPlayer player = new MediaPlayer(); Specifying the source of the media: If file in the resource directory raw: player = MediaPlayer.create(context, R.raw.music_file); If file or stream: player.setdatasource(path); player.prepare(); or player.prepareasync(); Use prepareasync() when media needs to be prepared or buffered offline Will return when media is ready Requires the implementa$on of OnPreparedListener() interface: onprepared() method needs to be implemented COMP 107x (Muppala) Mul$media in Android 7

Start playback player.start(); Pause playback player.pause(); Stop playback player.stop(); player.release(); MediaPlayer Methods COMP 107x (Muppala) Mul$media in Android 8

MediaPlayer Rich API designed for long playing media streams, such as voice audio recordings, music and videos seeking opera$ons supported Source buffering Heavyweight resource- wise Slow to ini$alize Not suitable for low- latency scenarios like playing short audio samples for sound effects, such as in games. Designed for situa$ons with no more than one or two MediaPlayers working at the same $me COMP 107x (Muppala) Mul$media in Android 9

Shoo$ng Game with Sounds Exercise Off to the next exercise Adding explosion sound when the AndroidGuy is hit by a bullet Using SoundPool class COMP 107x (Muppala) Mul$media in Android 10

Genera$ng Sounds using SoundPool

SoundPool Class The SoundPool class manages and plays audio resources for applica$ons. A SoundPool is a collec$on of samples that can be loaded into memory from a resource inside the APK or from a file in the file system The SoundPool library uses the MediaPlayer service to decode the audio into a raw 16- bit PCM mono or stereo stream This allows applica$ons to ship with compressed streams without having to suffer the CPU load and latency of decompressing during playback Typical usage scenario includes games with sound where several sounds are used in a level and may have to be played with overlap some$mes COMP 107x (Muppala) Mul$media in Android 12

SoundPool Class Features Sekng the maximum number of sounds to play at the same $me Priori$zing the sounds so that the low- priority ones will be dropped when the maximum threshold is reached Pausing and stopping sounds before they finish playing Looping sounds Changing the playback rate (effec$vely, the pitch of each sound) Sekng stereo volume (separate for lel and right channels) COMP 107x (Muppala) Mul$media in Android 13

Android Audio Comparison Audio Requirements Require low latency, such as in games or sound effects SoundPool Audio Class Choice Need to play video that has an audio track MediaPlayer Play a set of short sounds many $mes SoundPool Stream audio from an external source, e.g. HTTP or TCP stream MediaPlayer Play background music MediaPlayer COMP 107x (Muppala) Mul$media in Android 14

Shoo$ng Game with More Sounds Assignment: Add more sounds to the Shoo$ng Game Android Guy falling off the screen Bullets going off the screen at the top COMP 107x (Muppala) Mul$media in Android 15