encyclopegia.org

Java Media Framework

The Java Media Framework (JMF) is a Java library that enables audio, video and other time-based media to be added to Java applications and applets. This optional package, which can capture, play, stream, and transcode multiple media formats, extends the Java Platform, Standard Edition (Java SE) and allows development of cross-platform multimedia applications.

The Java Media Framework (JMF) is a Java library that enables audio, video and other time-based media to be added to Java applications and applets. This optional package, which can capture, play, stream, and transcode multiple media formats, extends the Java Platform, Standard Edition (Java SE) and allows development of cross-platform multimedia applications. package org.wikipedia.examples; import java.awt.Component; import java.awt.FileDialog; import java.awt.Frame; import java.io.File; import java.io.IOException; import java.net.MalformedURLException; import javax.media.Manager; import javax.media.Player; import javax.media.MediaException; public class TrivialJMFPlayer extends Frame { public TrivialJMFPlayer() throws IOException, MalformedURLException, MediaException { FileDialog fd = new FileDialog(this, "TrivialJMFPlayer", FileDialog.LOAD); fd.setVisible(true); File f = new File(fd.getDirectory(), fd.getFile()); Player p = Manager.createRealizedPlayer(f.toURI().toURL()); Component c = p.getVisualComponent(); add(c); p.start(); } public static void main(String[] args) { try { Frame f = new TrivialJMFPlayer(); f.pack(); f.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } } Much of the example is involved with the building of the AWT GUI. Only two lines touch JMF. Manager.createRealizedPlayer() implicitly creates a javax.media.protocol.DataSource from a URL representation of the file, creates a Player , and realizes it, meaning that all resources necessary for playback are allocated and initialized. The getVisualComponent() asks the javax.media.Player for a java.awt.Component suitable for use in a GUI. If a control component were desired, it would be obtained with getControlPanelComponent() and added to the GUI separately. Note that the developer is not concerned with the format of the media - this code works equally well for any media format that JMF can import and read. ==References==

References

No reference rows published for this article.

Cite this article

MLA

"Java Media Framework." encyclopegia.org, 2026, https://encyclopegia.org/wiki/java-media-framework. Accessed 24 November 2026.

Chicago

"Java Media Framework." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/java-media-framework.

APA

encyclopegia.org. (2026). Java Media Framework. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/java-media-framework

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Ralph K. Hofer

enwiki · references available

Alexis Vila

enwiki · references available

Alicia Bay Laurel

enwiki · references available

Kim Il (wrestler)

enwiki · references available

Clive Everton

enwiki · references available

Gwen Thompson

enwiki · references available

Audichron

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1363122959 · 0.5 · snapshot enwiki-001363122959

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.