Java Media Framework - JMF and Linux Performance Pack

Following the Install Docs on

http://java.sun.com/products/java-media/jmf/2.1.1/setup-linux.html

i am trying to install the linux performance pack of the JMF.

However it exits without any response :(

Why could that be?

Installed: Sun JDK 1.6.0

System: Linux 2.6.20-gentoo-r3 SMP i686

EDIT: The Installer now starts. Maybe the file was corrupt, I used a newly downloaded one. BUT:

Now i have another problem:

Extracting...

./install.sfx.21428: /lib/libc.so.6: version `GLIBC_2.1' not found (required by ./install.sfx.21428)

./install.sfx.21428: /lib/libc.so.6: version `GLIBC_2.0' not found (required by ./install.sfx.21428)

Installed:

sys-libs/glibc-2.5-r1

Message was edited by:

pholthau

[789 byte] By [pholthaua] at [2007-11-26 23:06:34]
# 1

I post the same question one month ago, but it seems nobody knows the answer. I can't even find the instructions for install the cross plataform release. My system is fedora Core 6.

I tried to recompile glibc2.1 but it's makefile detect my new release of glibc and don't make the update. I think we should contact Sun

RaulHuertasa at 2007-7-10 14:00:13 > top of Java-index,Security,Cryptography...
# 2
In Gentoo there is a "glibc-compat20" USE-flag for installing glibc. I thought maybe this would solve the problem but it still persists. Maybe contacting sun would be a solution... If you write an E-Mail to them, it would be kind if you cc me: patrick.holthaus[aeht]uni-bielefeld.de
pholthaua at 2007-7-10 14:00:13 > top of Java-index,Security,Cryptography...
# 3
Installed: Sun JDK 1.6.0System: Linux 2.6.20-gentoo-r3 SMP i686Wild guess - try removing JDK 1.6.0 and insatll JDK.1.4.xJMF has NOT been supported by SUN for a long time
Stefan_Marica at 2007-7-10 14:00:13 > top of Java-index,Security,Cryptography...
# 4
Although I don't think that this could be the reason(because obviously it has something to do with the glibc,which is not java dependent) i will give it a try and report back.
pholthaua at 2007-7-10 14:00:13 > top of Java-index,Security,Cryptography...
# 5

I ran the binary on another computer (with older libraries) and it just worked there.

Now jmfinit can find various video4linux webcams. But trying to create a processor will result in an IOException:

The code:

public static void main(String[] args) {

try{

Vector devices = CaptureDeviceManager.getDeviceList(new VideoFormat(null));

//MediaLocator ml = new MediaLocator("v4l://0");

CaptureDeviceInfo dev = (CaptureDeviceInfo) devices.iterator().next();

Processor p = Manager.createProcessor(dev.getLocator());

} catch(ArrayIndexOutOfBoundsException e){

System.err.println("Please add a valid media file as a parameter!"); //$NON-NLS-1$

e.printStackTrace();

} catch (MalformedURLException e) {

System.err.println("URL not valid!"); //$NON-NLS-1$

e.printStackTrace();

} catch (NoPlayerException e) {

System.err.println("No Player found!"); //$NON-NLS-1$

e.printStackTrace();

} catch (IOException e) {

System.err.println("Could not read file!"); //$NON-NLS-1$

e.printStackTrace();

}

}

}

The Exception:

java.io.IOException: java.lang.Error: Couldn't initialize capture device

java.io.IOException: java.lang.Error: Couldn't initialize capture device

No Player found!

javax.media.NoProcessorException: Error instantiating class: com.sun.media.protocol.v4l.DataSource : java.io.IOException: java.lang.Error: Couldn't initialize capture device

at javax.media.Manager.createProcessorForContent(Manager.java:1614)

at javax.media.Manager.createProcessor(Manager.java:627)

at hi2r.test.MotionPackageTest.main(MotionPackageTest.java:38)

If someone knows why this could happen, please tell me.

pholthaua at 2007-7-10 14:00:13 > top of Java-index,Security,Cryptography...
# 6

Have you got the WebCams working under Linux already?

With other applications ?

Also, code wise, try replacing

Vector devices = CaptureDeviceManager.getDeviceList(new VideoFormat(null));

with

Vector list = CaptureDeviceManager.getDeviceList ( null );

regards,

Owen

omcgoverna at 2007-7-10 14:00:13 > top of Java-index,Security,Cryptography...
# 7
First of all: Thanks for you suggestions.But other application work just fine with the video4linux devices.And I already used the other syntax you posted.The error occurs with both versions :(
pholthaua at 2007-7-10 14:00:13 > top of Java-index,Security,Cryptography...
# 8
Well, this is a not elegant solutionChange your distro for Ubuntu, It works for me!. Whell, i could do this because my data it's on another partition, not in my linux partition, so I could change it with no much trouble, and I didn't have to edit anything.
RaulHuertasa at 2007-7-10 14:00:13 > top of Java-index,Security,Cryptography...
# 9

Patrick,

the problem occurs when JMF is not installed into the JRE -- apparently,

JMF doesn't pick up its native helper implementations in that case.

This holds even when java.library.path is set, for some odd reason I cannot fathom.

So, copy JMF-2.1.1e/lib/*.so to $JAVA_HOME/jre/lib/i386 and you should be fine.

The reason that the device appears in the list nonetheless is

because the list is generated statically by jmfinit. jmfinit loads

the helper binaries through another mechanism.

Hope this helps,

Ingo

iluetkebohlea at 2007-7-10 14:00:13 > top of Java-index,Security,Cryptography...
# 10

Dear Ingo,

I had the same problem (jmstudio captured well, but my apps couldn't initialize cam). Your solutions worked fine on my machine (Debian, java 1.5.0_10, JMF 2.1.1e). Just an advice to who wants to do the same: write somewhere that you copied jmf libraries directly in jre lib path (exactly wich files, wich version and where); otherwise, if you forget it and you update only jmf or only jre, you're going to have really hard debug time! Maybe we could notify this issue as a bug (the use of different paths of jmstudio and runtime apps).

Now I wonder if the on Linux there's no possbility to use two usb cams, like on WinXp...

Thanks, you saved LOTS of my time!

Regards

Eugenio

kernelpanica at 2007-7-10 14:00:13 > top of Java-index,Security,Cryptography...