Media Formats and Content Types Supported by JMF
The JMF provides support for a number of the most important and popular content types and formats in both the audio and video arenas. In the area of content types, that includes names such as QuickTime, AVI, Wave, and MPEG. In the area of formats or codecs, that includes MPEG (for example, MP3), U-law, Cinepak, MJPG, and H.263. Further, as witnessed by the history of the various versions of JMF, that support has continued to increase (for example, H.263 added in the most recent version).The two most important formats currently absent from the JMF
are MPEG-2 and MPEG-4. These are significant omissions! However the JMF development team at Sun has set support for these two formats as its highest priority. As such, it is expected that support for MPEG-2 and MPEG-4 will be found in the next major release of the JMF.
That broad coverage of content types and formats allows the JMF not only to claim platform and format independence, but also to provide new opportunities to programmers. Programmers can select the appropriate format for the task at hand and even transcode between formats as needed.
In the area of protocols, the JMF supports the file, http, ftp, and rtp protocols.
Tables 7.3 and 7.4 show the media format and content type support of the current version (v2.1.1) of the JMF. Table 7.3 shows support for audio content types, and Table 7.4 shows support for video content types. There are three implementations of JMF2.1.1: the cross-platform (Cross) pure Java version, the Solaris (Sol) performance version, and the Windows (Win) performance version. They differ slightly in their support of formats. Most formats supported by the JMF can be both read (decoded) and write (encoded); however, in some cases that isn't true. Hence these tables have entries that list content type, format, which implementations can decode that format, and which implementations can encode it.
Table 7.3. Audio Content Types and Formats (Codecs) Supported by the JMF 2.1.1 ImplementationsContent Type
| Format
| Decode/Read
| Encode/Write
|
---|
AIFF (.aiff)
| 8-bit mono/stereo linear
| Cross, Sol, Win
| Cross, Sol, Win
|
| 16-bit mono/stereo linear
| Cross, Sol, Win
| Cross, Sol, Win
|
| G.711 (U-law)
| Cross, Sol, Win
| Cross, Sol, Win
|
| A-law
| Cross, Sol, Win
| |
| IMA4 ADPCM
| Cross, Sol, Win
| Cross, Sol, Win
|
GSM (.gsm)
| GSM mono audio
| Cross, Sol, Win
| Cross, Sol, Win
|
MIDI (.mid)
| Type 1 & 2 MIDI
| Sol, Win
| |
MPEG Layer II Audio (.mp2)
| MPEG layer 1,2 audio
| Cross, Sol, Win
| Sol, Win
|
MPEG Layer III Audio (.mp3)
| MPEG layer 1, 2 or 3 audio
| Cross, Sol, Win
| Sol, Win
|
Sun Audio (.au)
| 8-bit mono/stereo linear
| Cross, Sol, Win
| Cross, Sol, Win
|
| 16-bit mono/stereo linear
| Cross, Sol, Win
| Cross, Sol, Win
|
| G.711 (U-law)
| Cross, Sol, Win
| Cross, Sol, Win
|
| A-law
| Cross, Sol, Win
| |
Wave (.wav)
| 8-bit mono/stereo linear
| Cross, Sol, Win
| Cross, Sol, Win
|
| 16-bit mono/stereo linear
| Cross, Sol, Win
| Cross, Sol, Win
|
| G.711 (U-law)
| Cross, Sol, Win
| Cross, Sol, Win
|
| A-law
| Cross, Sol, Win
| |
| GSM mono
| Cross, Sol, Win
| Cross, Sol, Win
|
| DVI ADPCM
| Cross, Sol, Win
| Cross, Sol, Win
|
| MS ADPCM
| Cross, Sol, Win
| |
| ACM
| Win
| Win
|
Table 7.4. Video Content Types and Formats (Codecs) Supported by the JMF 2.1.1 ImplementationsContent Type
| Format
| Decode/Read
| Encode/Write
|
---|
AVI (.avi)
| Audio: 8-bit mono/stereo linear
| Cross, Sol, Win
| Cross, Sol, Win
|
| Audio: 16-bit mono/stereo linear
| Cross, Sol, Win
| Cross, Sol, Win
|
| Audio: DVI ADPCM compressed
| Cross, Sol, Win
| Cross, Sol, Win
|
| Audio: G711 (U-law)
| Cross, Sol, Win
| Cross, Sol, Win
|
| Audio: A-law
| Cross, Sol, Win
| |
| Audio: GSM mono
| Cross, Sol, Win
| Cross, Sol, Win
|
| Audio: ACM
| Win
| Win
|
| Video: Cinepak
| Cross, Sol, Win
| Sol
|
| Video: JPEG (411, 422, 111)
| | |
| Cross, Sol, Win
| Sol, Win
| |
| Video: RGB
| Cross, Sol, Win
| Cross, Sol, Win
|
| Video: YUV
| Cross, Sol, Win
| Cross, Sol, Win
|
| Video: VCM
| Win
| Win
|
Flash (.swf, .spl)
| Macromedia Flash 2
| Cross, Sol, Win
| |
HotMedia (.mvr)
| IBM HotMedia
| Cross, Sol, Win
| |
MPEG-1 Video (.mpg)
| Multiplexed System stream
| Sol, Win
| |
| Video-only stream
| Sol, Win
| |
MPEG-4 Video
| | IBM
| IBM
|
QuickTime (.mov)
| Audio: 8-bit mono/stereo linear
| Cross, Sol, Win
| Cross, Sol, Win
|
| Audio:16-bit mono/stereo linear
| Cross, Sol, Win
| Cross, Sol, Win
|
| Audio: G711 (U-law)
| Cross, Sol, Win
| Cross, Sol, Win
|
| Audio: A-law
| Cross, Sol, Win
| |
| Audio: GSM mono
| Cross, Sol, Win
| Cross, Sol, Win
|
| Audio: IMA4 ADPCM
| Cross, Sol, Win
| Cross, Sol, Win
|
| Video: Cinepak
| Cross, Sol, Win
| Sol
|
| Video: H.261
| Sol, Win
| |
| Video: H.263
| Cross, Sol, Win
| Sol, Win
|
| Video: JPEG (411, 422, 111)
| Cross, Sol, Win
| Sol, Win
|
| Video: RGB
| Cross, Sol, Win
| Cross, Sol, Win
|
An additional feature of JMF 2.0 and later is that it is user extensible in the area of protocols, content type, and formats supported. A number of Interfaces are supplied, which users can implement with their own classes. The multiformat support of JMF should continue to grow, not only through the releases of Sun, but also through third party and individual development.
Chapter 8 includes a sample class that queries the JMF Manager class in order to determine the types of media supported for the particular version of JMF and the platform it is running on. That and Sun's JMF site can be used to determine the level of support for various media offered by the JMF.