Java Glossary : JMF

CMP home Java glossary home Menu no menu Last updated 2004-06-28 by Roedy Green ©1996-2004 Canadian Mind Products

Java definitions: 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

You are here : home : Java Glossary : J words : JMF.

JMF
Java Media Framework. This is the main way Java handles streaming video and audio. It is implemented as a set of native classes to play and capture sound and video files in many formats including Microsoft's wav and Sun's AU. Supports MIDI, MP1, MP2, RTP streaming JPEG, RTP H.261, RTP H.263 among other formats. New versions support MP3 (Napster). Both JavaSoft and Intel developed packages. Intel called their package Intel Media Framework, Java Edition, though they seem to have erased all trace of it from their website. There is no sign of MP4 yet.

It is quite an elaborate scheme, capable of simultaneously controlling many channels of audio and video, and synchronising them. I imagine was designed for professional digital movie making. The hard part comes using it for something simple since there are so many bells and whistles.

The JMF classes live in the javax.media package. Unfortunately is is not part of the standard JDK/JRE. You have to download the jar files separately. This means any of your clients must also download and install JMF separately from your application. You also have to download the documentation separately.

Beware installing JMF. It will destroy your classpath. You will have to manually repair the classpath after it has installed.

To use JMF you have to decide on a format. Differing audio and visual formats give different amounts of compression and take differing amounts of computing oomph to encode (compress them to prepare for transmission) and decode (decompress them to prepare for playback at the receiving end) them. There is special purpose DSP hardware available to help, and there is the MMX DSP-like features of the Pentium class chips that can accelerate the process, if the JMF codec sofware is smart enough to use it. Encoding takes more resources that decoding. Video takes more resources than audio. The more you compress, the more detailed an image stream you can send over the net. The more you compress, the more expensive the hardware you will need to do it in real time.

You want to avoid having to translate formats if you can. Don't just assume everything will be able to plug seamlessly into everything else. There are many fine variations to the various protocols.

Simpler options include :

book_coverJava How To Program: Object-Oriented Design with the UML and Design Patterns.
0-13-034151-7
Deitel & Deitel
covers JMF 2 and sound.
amazon.com Barnes and Noble
amazon.ca chapters
amazon.co.uk amazon.de
book_coverEssential JMF - Java Media Framework
0-13-080104-6
Rob Gordon, Stephen Talley
amazon.com Barnes and Noble
amazon.ca chapters
amazon.co.uk amazon.de
book_coverProgramming With the Java Media Framework
0-471-25169-0
Sean Sullivan (Editor), Loren Winzeler, Jeannie Deagen, Deanna Brown
Covers JMF 1.0.
amazon.com Barnes and Noble
amazon.ca chapters
amazon.co.uk amazon.de
book_coverCore Java media framework
0-13-011519-3
Linden deCarmo
Covers JMF 1.0.
amazon.com Barnes and Noble
amazon.ca chapters
amazon.co.uk amazon.de

Storage & Traffic

For *.wav audio files, you need about 10 MB per minute of audio. For *.MP3 files, you need only 1 MB per minute of audio. When you put audio on a website you have two concerns, storage and traffic. If 1000 people download your 10 minute audio clip, that is equivalent to downloading 1000 * 10 * 1,000,000 = 10,000,000,000 bytes or 10 gigabytes of webpages. That's equivalent to 1.5 million webpage hits. Websites have both a storage and limit on the total downloads. A typical business account might limit you to 100 MB of space and 50 gigabytes of traffic per month.

Video takes up even more space and bandwidth. Low quality, (small size, fuzzy picture, jumpy) takes about 64Kbps. This means one minute of video takes about .5 MB per minute. A better quality 512Kbps stream, that requires a high speed connection for live feeds, requires about 4 MB per minute, four times as much as audio.

So the key is to keep your audio and video clips short. Eventually, the Internet will be converted to fibre optics and there should be no more problem with bandwidth.

MPEG-4

MPEG-4 is an advanced compressed video format that handles movies, graphics, sound, animated talking heads etc. Unfortunately, the creators, after releasing it as a public standard suddenly started demanding royalties. Sun immediately dropped the three optimised MPEG-4 codecs from the JMF distribution. IBM has released a pure Java MPEG-4 codec for JMF. Unfortunately, it too comes with onerous licensing restrictions. Further, it has none of the platform-specific optimisations of the Sun codecs. Were it not for politics, MPEG-4 would be a great format, using special purpose accelerator cards for real-time encoding and relying on the Intel MMX instruction-enhanced Sun codec for decoding.


CMP logo
CMP_home
home
Canadian Mind Products CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[24.87.56.253]
Your IP:[80.134.30.163]
You are visitor number 3612.
Please send errors, omissions and suggestions
to improve this page to Roedy Green.
You can get a fresh copy of this page from: or possibly from your local J: drive mirror:
http://mindprod.com/jgloss/jmf.html J:\mindprod\jgloss\jmf.html