Difference between revisions of "Java Media Framework"

From ArchWiki
Jump to: navigation, search
(Adding media support to OpenOffice.org)
m (l18n)
(17 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 +
[[Category:Development]]
 +
[[de:Java media framework]]
 
From [http://java.sun.com/products/java-media/jmf/ Sun JMF site]:
 
From [http://java.sun.com/products/java-media/jmf/ Sun JMF site]:
 
"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."
  
= Installation =  
+
== Installation ==
  
The JMF PKGBUILD can be downloaded from [[AUR]] [http://aur.archlinux.org/packages.php?ID=11728 JMF Package]
+
Install {{AUR|jmf}} from [[AUR]].
Run '''makepkg''' and '''install the package'''
+
  
= 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 will need to '''run as root''':
 
  jmfinit
 
  jmfinit
 
''(An active X11 session is needed)''
 
''(An active X11 session is needed)''
  
== Bypassing Java libxcb-xlib Bug ==
+
=== JMFRegistry ===
 
+
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
+
 
+
== JMFRegistry ==
+
  
 
You can manually setup JMF (GUI) running as root:
 
You can manually setup JMF (GUI) running as root:
Line 25: Line 21:
 
[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 JMFRegistry User's Guide]
  
= Adding audio/video codecs support to JMF =
+
== Adding audio/video codecs support to JMF ==
  
== Sun MP3 Plugin ==
+
=== Sun MP3 Plugin ===
  
[http://java.sun.com/products/java-media/jmf/mp3/download.html Sun MP3 Plugin] is included in the JMF package.
+
[http://java.sun.com/products/java-media/jmf/mp3/download.html Sun MP3 Plugin] is included in the JMF package and '''installed by default''' with it.
  
In order to add the Mp3Plugin to the JMF Plugin System , you'll have to '''run as root''' ''(only once)'':
+
If there is any trouble you can '''reinstall''' the MP3Plugin '''running as root''':
 
  jmfRegisterMp3Plugin
 
  jmfRegisterMp3Plugin
  
== JFFMpeg ==
+
=== JFFMpeg ===
  
 
"[http://jffmpeg.sourceforge.net/ Jffmpeg] 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."
 
"[http://jffmpeg.sourceforge.net/ Jffmpeg] 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 from [[AUR]] [http://aur.archlinux.org/packages.php?ID=16648 JFFMpeg Package]
+
Install {{AUR|jffmpeg}} from [[AUR]].
  
Run '''makepkg''' and '''install the package'''.
+
The install script will register the plugins and associate the mimetypes in the JMF registry and the uninstall script will unregister the plugins from the JMF registry.
  
The install script will register the plugins and associate the mimetypes in the JMF registry
+
==== Reinstalling JMF and JffMpeg ====
  
= Testing JMF capabilities =
+
If you reinstall JMF you will have to '''run as root''':
 +
jmfRegisterJffmpegPlugin
 +
in order to register again all the jffmpeg plugins in the JMF registry
 +
 
 +
== Testing JMF capabilities ==
  
 
A demo player is available to test JMF audio/video playback capabilities.
 
A demo player is available to test JMF audio/video playback capabilities.
 
  java JMStudio
 
  java JMStudio
  
= Adding media support to OpenOffice.org =
+
You can also check if JMF is properly installed in: [http://ku-prism.org/virtualprism/explorations/JavaTest/javatestpage.html http://ku-prism.org/virtualprism/explorations/JavaTest/javatestpage.html] (it currently works on Firefox2/3 and Opera)
 +
 
 +
If your JMF installation is OK you should get something like:
 +
JMF Version... 2.1.1e
 +
All Java Build
 +
Native Libraries Found
 +
 
 +
== Adding media support to OpenOffice.org ==
  
If you want to be able to use sound and video in [[OpenOffice|OpenOffice.org]] Impress presentations, you must:
+
If you want to be able to use sound and video in [[OpenOffice|OpenOffice.org]] documents and presentations, you must:
  
 
#Start OpenOffice.org
 
#Start OpenOffice.org
Line 64: Line 71:
 
#Restart OpenOffice.org
 
#Restart OpenOffice.org
  
== Testing media capabilities in OpenOffice.org ==
+
=== Testing media capabilities in OpenOffice.org ===
  
 
#Start OpenOffice.org
 
#Start OpenOffice.org

Revision as of 14:23, 1 November 2013

From Sun JMF site: "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

Install jmfAUR from AUR.

Configuration

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

jmfinit

(An active X11 session is needed)

JMFRegistry

You can manually setup JMF (GUI) running as root:

jmfregistry

JMFRegistry User's Guide

Adding audio/video codecs support to JMF

Sun MP3 Plugin

Sun MP3 Plugin is included in the JMF package and installed by default with it.

If there is any trouble you can reinstall the MP3Plugin running as root:

jmfRegisterMp3Plugin

JFFMpeg

"Jffmpeg 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."

Install jffmpegAUR from AUR.

The install script will register the plugins and associate the mimetypes in the JMF registry and the uninstall script will unregister the plugins from the JMF registry.

Reinstalling JMF and JffMpeg

If you reinstall JMF you will have to run as root:

jmfRegisterJffmpegPlugin

in order to register again all the jffmpeg plugins in the JMF registry

Testing JMF capabilities

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

java JMStudio

You can also check if JMF is properly installed in: http://ku-prism.org/virtualprism/explorations/JavaTest/javatestpage.html (it currently works on Firefox2/3 and Opera)

If your JMF installation is OK you should get something like:

JMF Version... 2.1.1e
All Java Build
Native Libraries Found

Adding media support to OpenOffice.org

If you want to be able to use sound and video in OpenOffice.org documents and presentations, you must:

  1. Start OpenOffice.org
  2. Go to Tools/Options - Java Section
    1. Make sure Java support in OpenOffice.org is enabled
  3. Select "Class Path"
  4. Select "Add Folder"
  5. Add "/opt/java/jre/lib/ext/" (without quotes)
  6. Select "Add Folder"
  7. Add "/opt/java/jre/lib/" (without quotes)
  8. Save changes
  9. Restart OpenOffice.org

Testing media capabilities in OpenOffice.org

  1. Start OpenOffice.org
  2. Go to Tools/Gallery
  3. Select "Sounds"
  4. Double click any sound file - A media player will open and the sound will be played