Difference between revisions of "Java Media Framework"

From ArchWiki
Jump to: navigation, search
Line 1: Line 1:
From Sun's JMF site:
+
From Sun's JMF site [http://java.sun.com/products/java-media/jmf/]:
 
"The Java Media Framework API (JMF) enables audio, video and other time-based media to be added to applications and applets built on Java technology. This optional package, which can capture, playback, stream, and transcode multiple media formats, extends the Java 2 Platform, Standard Edition (J2SE) for multimedia developers by providing a powerful toolkit to develop scalable, cross-platform technology."
 
"The Java Media Framework API (JMF) enables audio, video and other time-based media to be added to applications and applets built on Java technology. This optional package, which can capture, playback, stream, and transcode multiple media formats, extends the Java 2 Platform, Standard Edition (J2SE) for multimedia developers by providing a powerful toolkit to develop scalable, cross-platform technology."
  
Line 9: Line 9:
 
== Configuration ==
 
== Configuration ==
  
In order to setup JMF for the first time (to recognize audio and capture devices) you'll need to run as root:
+
In order to setup JMF for the first time (to recognize audio and capture devices) you'll need to '''run as root''':
 
  jmfinit
 
  jmfinit
  
Running jmfinit with sudo '''may fail because Java bug''' [http://bugs.archlinux.org/task/8566]. So run it as ROOT , patch your Java Installation like: [http://bugs.archlinux.org/task/8521#comment20623] or run it as:
+
=== Bypassing Java libxcb-xlib Bug ===
 +
 
 +
Running '''jmfinit''' with sudo '''may fail because Java libxcb-xlib bug''' [http://bugs.archlinux.org/task/8566].Run it as ROOT , patch your Java Installation like: [http://bugs.archlinux.org/task/8521#comment20623] or run it as:
 
  sudo LIBXCB_ALLOW_SLOPPY_LOCK=true jmfinit
 
  sudo LIBXCB_ALLOW_SLOPPY_LOCK=true jmfinit
  
Line 20: Line 22:
 
  jmfregistry
 
  jmfregistry
  
JMFRegistry User Guide: [http://java.sun.com/products/java-media/jmf/2.1.1/jmfregistry/jmfregistry.html]
+
JMFRegistry User's Guide: [http://java.sun.com/products/java-media/jmf/2.1.1/jmfregistry/jmfregistry.html]
  
 
== Adding audio/video codecs support to JMF ==
 
== Adding audio/video codecs support to JMF ==
Line 26: Line 28:
 
=== Sun MP3 Plugin ===
 
=== Sun MP3 Plugin ===
  
In order to add the Mp3Plugin to the JMF Plugin System , you'll have to run as root:
+
Sun MP3 Plugin is included in the JMF package.
 +
 
 +
In order to add the Mp3Plugin to the JMF Plugin System , you'll have to '''run as root''':
 
  jmfRegisterMp3Plugin
 
  jmfRegisterMp3Plugin
  

Revision as of 14:33, 28 April 2008

From Sun's JMF site [1]: "The Java Media Framework API (JMF) enables audio, video and other time-based media to be added to applications and applets built on Java technology. This optional package, which can capture, playback, stream, and transcode multiple media formats, extends the Java 2 Platform, Standard Edition (J2SE) for multimedia developers by providing a powerful toolkit to develop scalable, cross-platform technology."

Installation

The JMF PKGBUILD can be downloaded from AUR [2] Run makepkg and install the package

Configuration

In order to setup JMF for the first time (to recognize audio and capture devices) you'll need to run as root:

jmfinit

Bypassing Java libxcb-xlib Bug

Running jmfinit with sudo may fail because Java libxcb-xlib bug [3].Run it as ROOT , patch your Java Installation like: [4] or run it as:

sudo LIBXCB_ALLOW_SLOPPY_LOCK=true jmfinit

JMFRegistry

You can manually setup JMF running as root:

jmfregistry

JMFRegistry User's Guide: [5]

Adding audio/video codecs support to JMF

Sun MP3 Plugin

Sun MP3 Plugin is included in the JMF package.

In order to add the Mp3Plugin to the JMF Plugin System , you'll have to run as root:

jmfRegisterMp3Plugin

JFFMpeg

"Jffmpeg[6] is a plugin that allows the playback of a number of common audio and video formats. It is based around a Java port of parts of the FFMPEG project, supporting a number of codecs in pure Java code. Where codecs have not yet been ported, a JNI wrapper allows calls directly into the full FFMPEG code."

The JFFMpeg PKGBUILD can be downloaded form AUR [7]

Run makepkg and install the package. The install script will register the plugins and associate the mimetypes in the JMF registry

Testing JMF capabilities

A demo player is available to test JMF audio/video playback capabilities.

java JMStudio