150 likes | 467 Views
Java Media Framework. Speaker :陳家煌. Outline. Java Media Framework (JMF) Real-time Transport Protocol (RTP) Program demo. Introduction. The Java Media Framework API (JMF) specify a simple, unified architecture
E N D
Java Media Framework Speaker:陳家煌 Multimedia and Communications
Outline • Java Media Framework(JMF) • Real-time Transport Protocol (RTP) • Program demo Multimedia and Communications
Introduction • The Java Media Framework API (JMF) • specify a simple, unified architecture • synchronize and control audio, video and other time-based data within Java applications and applets • The JMF 1.0 API • specify playback • developed by Sun Microsystems, Inc., Silicon Graphics Inc., and Intel Corporation • The JMF 2.0 API • specify playback, capture, transmission and transcode • developed Sun Microsystems, Inc., and IBM Figure 1: JMF architecture. Multimedia and Communications
Design Goals for the JMF API • Easy to program • Capturing media data • Develop media streaming and conferencing applications in Java • Implement custom solutions and easily integrate with the existing framework • Access to raw media data • Enable the development of custom (JMF plug-ins ) Multimedia and Communications
Criticism • Support few codecs and formats • Need a plug-in to play MP3 • Sun’s seeming abandonment of it • There are few third-party extensions Multimedia and Communications
Working with Time-Based Media Figure 2: Recording, processing, and presenting time-based media. Multimedia and Communications
Real-time Transport Protocol (RTP) • Is an application-layer protocol • To receive and transmit media stream • Often used over UDP • Use RTCP to monitor the quality of the data distribution Figure 3: RTP architecture. Multimedia and Communications
RTP Formats R indicates that the format can be decoded and presented. T indicates that media streams can be encoded and transmitted in the format. Multimedia and Communications
RTP reception RTP transmission Working with Real-Time Media Stream Multimedia and Communications
Solutions Demo • Frame seeking inside a movie • Simple applet • Playing Movies in a Java 3D World • Using JMF with JFC/Swing components • Transmitting and receiving media over RTP • Exporting media received over RTP • Accessing individual video frames from a processor [custom codec] Multimedia and Communications
Reference Links • Java API Specifications • http://java.sun.com/reference/api/ • JMF 2.1.1 Software Documentation • http://java.sun.com/products/java-media/jmf/2.1.1/documentation.html • JMF 2.1.1 Solutions • http://java.sun.com/products/java-media/jmf/2.1.1/solutions/index.html • JavaWorld@TW – Java IDE • http://www.javaworld.com.tw/jute/post/page?bid=10&sty=1&age=-1&tpg=1 • Eclipse doc. • http://www.javaworld.com.tw/jute/upload/Eclipse_Doc.pdf • Others • http://en.wikipedia.org/wiki/Java_Media_Framework • http://www.cs.uccs.edu/~cs525/jmf/jmf.html • http://www.cs.columbia.edu/~hgs/rtp/ • http://www.csie.ncue.edu.tw/~icchang/project/89-n2/JMF/index.html Multimedia and Communications
JMF 2.1.1e Set up • Download • JMF 2.1.1e : http://java.sun.com/products/java-edia/jmf/2.1.1download.html • JDK 6 Update 2 : http://java.sun.com/javase/downloads/index.jsp • Environment set up • set path= C:\Program Files\Java\jdk1.6.0_02\bin • set classpath= C:\PROGRA~1\JMF21~1.1E\lib;C:\PROGRA~1\JMF21~1.1E\lib\jmf.jar;C:\PROGRA~1\JMF21~1.1E\lib\sound.jar; Multimedia and Communications
Eclipse setup • Download • eclipse-java-europa-fall2-win32.zip http://www.eclipse.org/downloads/ Multimedia and Communications
New Java Project Multimedia and Communications
Add JMF Library 2. 1. 3. From C:\Program Files\JMF2.1.1e\lib Multimedia and Communications