Cosc 5/4730 Multimedia Part 1: Audio media. PLAYING AUDIO Android android.media.

Slides:



Advertisements
Similar presentations
Android Application Development Tutorial. Topics Lecture 4 Overview Overview of Sensors Programming Tutorial 1: Tracking location with GPS and Google.
Advertisements

While you are waiting for this session to begin please make sure your audio is working. Go to the Tools menu, select Audio and then Audio setup wizard.
© 2013 Microsoft Corporation. All rights reserved. Schedule a Lync Meeting You can simply schedule an Lync Meeting by using the Outlook add-in for Lync.
Audio/Video Capture, Edit, and Export Bruce Reeves University of Minnesota Duluth Information Technology Systems and Services.
10.2. Audio with SD Card Prof. Oum Saokosal Master of Engineering in Information Systems, South Korea
Simple Audio Recording from your iPhone, PC or Mac.
Unit no. 3 Digitizing Sound and Video Adolf Knoll National Library of the Czech Republic
                      Digital Audio 1.
Using Audacity Audacity is a free, easy-to- use audio editor and recorder for a variety of operating systems.
An intro to Presenter: Jodie Johnston “Education no longer comes in rows and textbooks, but from a combination of sources.” Audio Tools.
Cosc 5/4730 Android: “Dynamic” data.. Saving Dynamic data. While there are a lot of ways to save data – Via the filesystem, database, etc. You can also.
Cosc 5/4730 Android Maps v2. Maps V1 and V2 In March 2013 google removed the ability to get a map key for version 1. Version 2 had been introduced in.
Programming with Android: SDK install and initial setup Luca Bedogni Marco Di Felice Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna.
Group 8: Dylan Lentini (AE), Mandy Minuti (WSE), Jean Paul Galea (TL)
Multimedia.  Android provides built-in encoding/decoding for a variety of common media types  Allows you to play & record audio, still images & video.
Cosc 5/4730 Android media Part 2: Pictures and Video.
Recording and playing audio. App Make app AudioFun with 4 buttons – Start recording (id=StartRecording) – Stop recording (id=StopRecording) – Start playback.
INF Web Design Using Multimedia on the Web Video - Part 1.
John Meilak Reuben Sant Jason Farrugia Media API Web Science APT 2007/2008.
Get android development environment running. Install – Get and install JDK 5 or 6 (see link in the.
ANDROID OPERATING SYSTEM Guided By,Presented By, Ajay B.N Somashekar B.T Asst Professor MTech 2 nd Sem (CE)Dept of CS & E.
Copyright 2002 Multimedia – Images, Sounds, and Motion Professor Robert Sandberg Charter College of Education California State University - Los Angeles.
Video upload and streaming
CS371m - Mobile Computing Audio.
Agnieszka Grant Yvonne. Camera used by T.V. reporters This is the best quality picture of all the cameras looked at.
© 2012 Microsoft Corporation. All rights reserved. Schedule a Lync meeting You can schedule a Lync Meeting by using the Outlook add-in for Lync, if you.
Basic Audio and Video. Audio Primary components – Audio file stored in ‘raw’ folder within ‘res’ folder ‘raw’ directory must be created while many formats.
Multimedia.
Audio and Video on the Web Sec 5-12 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
Let’s Make a Movie How to Create a Movie from a flipcam video (Adapted and Shared with permission from Erin Mayer)
© 2009 Research In Motion Limited Advanced Java Application Development for the BlackBerry Smartphone Trainer name Date.
Creating Mobile Apps with App Inventor! Day 5 Google search Kris Gordon Ludlow for links.
Using HTML 5.  HTML 5 uses a standard method to embed audio into Web pages.  Prior to HTML 5, browser plug-ins or separate applications such as Windows.
KS3 – Grade8, Yew Wah. Main controls at the left top. It’s a standard media player.
Available Technology  MP3 Players – 25 – Oral Testing, Audio Texts / Books  Presenter Mice – 3 – Oral Presentations  Head Phone Extension Kits – 2 –
RFID Editing and setup. Collect your content and organise it how you want it to be viewed and save it somewhere so you can find it easily. (Media formats.
Copyright© Jeffrey Jongko, Ateneo de Manila University Android.
VoiceThread:. With VoiceThread, group conversations are collected and shared in one place from anywhere in the world. All with no software to install.
Creating Multimedia Interaction with Windows Media Technologies 7.
ProsCons Android OS is open source POOR download interface Available on lots of devices Each device requires its own app market If you go to provider,
Outline Overview Video Format Conversion Connection with An authentication Streaming media Transferring media.
HTML Use of Multimedia on web page. HTML Media Q. How to call Image file in our web page ? A. That is the easy syntax for defining an image. 2.
There are two main types of CD that you can create with CD burning software; it is important to burn an Audio CD (Music CD) and not a Data CD. In order.
Playing an MP3 Music File in Conjunction With a PowerPoint 2010 Presentation Victoria Ricciardiello December 2012.
Back to the Basics - Video Nick Kwiatkowski Michigan Flex Users Group.
Sound and the Web. Transferring sound Download Progressive Download Stream.
The Complete Training/Knowledge Guide. Session 8: Camera and Multimedia  Taking Pictures with Camera  Recording Videos with Camcorder  Adjusting the.
Multimedia Capture & storage. Introduction A rich set of API for recording of audio & video. A developer has two choices  launch the built-in app using.
CS378 - Mobile Computing Audio.
Cosc 4735 Primer: Marshmallow Changes and new APIs in android 6.0 (api 23)
Multimedia. Audio,vedio and Images End user typically refer to vedio/audio using the respective file format MP4 or AVI(audio vedio interleave) Developer.
Adobe AuditionProject 4 guide © 2012 Adobe Systems IncorporatedHow to record narration1 You can record narration for your video directly into Adobe Audition.
Chapter 8 Adding Multimedia Content to Web Pages HTML5 & CSS 7 th Edition.
Lecture 7: Media Player Topics: Media Player, Async prepare Date: Mar 3, 2016.
Mobile SMIL Jason Daniels Ben Bedinghaus Ryan Ware.
CS371m - Mobile Computing Audio. Audio on Device Devices have multiple audio streams: – music, alarms, notifications, incoming call ringer, in call volume,
Audio and Haptic Feedback
Android Application Audio 1.
Multimedia.
Insert Voice over PowerPoints
Lecture 7: Service Topics: Services, Playing Media.
Android Boot Camp for Developers Using Java, 3E
Lecture 7: Media Player Topics: Media Player, Async prepare
Lync Meetings Join a Lync meeting Schedule a Lync meeting
Who am I? Davy Van Deursen post-doctoral researcher
                      Digital Audio 1.
Recap: Android Components
Welcome to UKSG webinars
Lecture 7: Service Topics: Services, Broadcast Receiver, Playing Media.
Welcome to UKSG webinars
Presentation transcript:

Cosc 5/4730 Multimedia Part 1: Audio media

PLAYING AUDIO Android android.media

Playing audio android.media can be very simple or really complex Get a MediaPlayer use the MediaPlayer class, with the create() method to get a "player". – States: prepare()  start() You can pause(), then start() without calling prepare() – Also seekTo() without needed prepare() again. with stop() and reset(), then you must prepare() again See next slide for states and where to go… – supported media formats CN/guide/appendix/media-formats.html

mediaplayer states

Example When it is stored as a Resource (res/raw directory) MediaPlayer mp = new MediaPlayer.create(getBaseContext(), R.raw.laser); mp.start(); //create calls prepare For media store somewhere else MediaPlayer mp = new MediaPlayer(); mp.setDataSource(" 30/example/MEEPMEEP.WAV"); OR on filesystem, “/sdcard/file.mp3” mp.prepare(); mp.start();

As a note. You can also play the audio from video files with the method as well. – There just won’t be any picture, just the audio.

Audio Capture May not be able test with the android simulators – Android simulators may through errors, saying device doesn’t exist. You have to test all the code on the phone. – All code examples on the website were tested and worked on the phones. From eclipse, plugin the phone with USB. Click Debug AS – Android: eclipse will ask you if you want to use the phone or emulator.

CAPTURING AUDIO Android android.media

Recording Audio Get a new instance of the MediaRecorder() – Configure it for recording the mic, set the audio type – And configure the output FILE. (there is no outputStream) – Like playing, you prepare() and start(). No thread needed. – Stop() when done recording and then release(). – The audio is now located in the file.

Recording Audio (2) You need to set the following permissions in the AndroidManifest.xml file – android.permission.WRITE_EXTERNAL_STORAGE – android.permission.RECORD_AUDIO

Example Code private void startRecording() { get MediaRecorder mRecorder = new MediaRecorder(); configure it mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); mRecorder.setOutputFile(mFileName); mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); Prepare to record try { mRecorder.prepare(); } catch (IOException e) {} start recording mRecorder.start(); } private void stopRecording() { mRecorder.stop(); mRecorder.release(); mRecorder = null; }

Audio settings mRecorder.setAudioSource(); – MediaRecorder.AudioSource.MIC – MediaRecorder.AudioSource.CAMCORDER Audio source with same orientation as camera, otherwise mic. – MediaRecorder.AudioSource.VOICE_CALL Voice call uplink + downlink audio source – mRecorder.setOutputFormat(); – MediaRecorder.OutputFormat.THREE_GPP Recommended setting by Andriod. – Also, AMR_NB, AMR_WB, RAW_AMR – MediaRecorder.OutputFormat.MPEG_4 Using an MPEG-4 container format may confuse some desktop players. mRecorder.setAudioEncoder(); – MediaRecorder.AudioEncoder.AAC AAC audio codec – MediaRecorder.AudioEncoder.AMR_NB AMR (Narrowband) audio codec – MediaRecorder.AudioEncoder.AMR_WB AMR (Wideband) audio codec

Recording incoming phone calls As of the current time (2010) – It doesn't appear to be possible via Android to record the audio "from the other end" of the conversation. – Some phones allow you record the mic during a phone call "headset speaker“ But Android has a setting for recording, so it may work (as of 2011)

References Android – CN/guide/topics/media/index.html CN/guide/topics/media/index.html – /index.html /index.html

Q A &