0
votes

I am having trouble with the JMF and getting the CaptureDeviceManager.getDeviceList() to list any capture devices.

I am running on Ubuntu 3.11.0-20-generic x86_64 GNU/Linux. I am running this in Netbeans 7.4 where I have added /usr/lib/JMF-2.1.1e/lib/jmf.jar to the project library.

I always get "No Devices Found". I read that I should copy jmf.properties from /usr/lib/JMF-2.1.1e/lib/ to my SRC directory so I tried that also and it made no difference.

Any ideas ?

    public static void main(String[] args) {
    Vector devices = devices = CaptureDeviceManager.getDeviceList(null);  

    if (devices.size() == 0) {
        System.out.println("No devices found");
        System.exit(0);
    }
}

Product Version: NetBeans IDE 7.4 (Build 201310111528) Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 3 Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Linux version 3.11.0-20-generic running on amd64; UTF-8; en_GB (nb)

1

1 Answers

1
votes

If like me you had a horrible time installing JMF I hope this answer will give you some help.

Download JMF from here

Change the file extension from .bin to .zip and extract (JMF-2.1.1e)

I then put the folder in /usr/lib to get /usr/lib/JMF-2.1.1e

I then ran the following:

export JMFHOME=/usr/lib/JMF-2.1.1e export CLASSPATH=.:$CLASSPATH:$JMFHOME/lib/jmf.jar export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JMFHOME/lib

Then if you are not getting anything listed when you call:

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

Run the following to get the JMF to auto detect what is available:

/usr/lib/JMF-2.1.1e/bin$ ./jmfinit

Then add /usr/lib/JMF-2.1.1e/lib/jmf.jar to your project and all should be ok.

Good luck.

Some good resources for people starting off: http://www.cs.odu.edu/~cs778/jmflects/lect5Capturing.html http://www.ee.iitm.ac.in/~tgvenky/JMFBook/Tutorial.pdf