JMF error: No such capture device!

Discussion in 'Java' started by Raphael Bauduin, Mar 6, 2004.

  1. Hi,

    I'm discovering JMF, and base my exploration on the example located at
    http://www.uk-dave.com/bytes/java/jmf-framegrab.shtml

    My webcam is recognised and usable with jmstudio.
    However, I can't use it in my code and get "No such capture device!"...
    Excerpts:

    Vector deviceList = CaptureDeviceManager.getDeviceList(null);
    while (!deviceList.isEmpty())
    {
    device = (CaptureDeviceInfo) deviceList.remove(0);
    }
    System.out.println("Working with : " +device.getName() + " -- " +
    device.getLocator() );

    CaptureDeviceInfo deviceInfo = device;
    Player player = Manager.createRealizedPlayer(deviceInfo.getLocator());

    (last line is line 39)
    and I get this output:

    v4l:philips 740 webcam:0
    v4l://0
    Working with : v4l:philips 740 webcam:0 -- v4l://0
    java.io.IOException: java.lang.Error: No such capture device!
    java.io.IOException: java.lang.Error: No such capture device!
    Exception in thread "main" javax.media.NoPlayerException: Error
    instantiating class: com.sun.media.protocol.v4l.DataSource :
    java.io.IOException: java.lang.Error: No such capture device!
    at javax.media.Manager.createPlayerForContent(Manager.java:1362)
    at javax.media.Manager.createPlayer(Manager.java:417)
    at javax.media.Manager.createRealizedPlayer(Manager.java:553)
    at FrameGrab.main(FrameGrab.java:39)

    What am I doing wrong? Starting jmstudio with the same environment lets me
    capture from the webcam....

    Thanks.

    Raph
     
    Raphael Bauduin, Mar 6, 2004
    #1
    1. Advertising

  2. Seems this is not so uncommon as problem:
    http://forum.java.sun.com/thread.jsp?forum=28&thread=333682&start=0&range=15&hilite=false&q=

    No definitive answer though (setting the env variables
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:
    $JMFHOME/lib:/usr/local/java/jre/lib/i386/:/usr/local/java/jre/lib/i386/client/
    export LD_PRELOAD=$LD_PRELOAD:/usr/local/java/jre/lib/i386/libjawt.so
    doesn't help in my case)

    anyone has better experiences?

    Raph



    Raphael Bauduin wrote:

    > Hi,
    >
    > I'm discovering JMF, and base my exploration on the example located at
    > http://www.uk-dave.com/bytes/java/jmf-framegrab.shtml
    >
    > My webcam is recognised and usable with jmstudio.
    > However, I can't use it in my code and get "No such capture device!"...
    > Excerpts:
    >
    > Vector deviceList = CaptureDeviceManager.getDeviceList(null);
    > while (!deviceList.isEmpty())
    > {
    > device = (CaptureDeviceInfo) deviceList.remove(0);
    > }
    > System.out.println("Working with : " +device.getName() + " -- " +
    > device.getLocator() );
    >
    > CaptureDeviceInfo deviceInfo = device;
    > Player player =
    > Manager.createRealizedPlayer(deviceInfo.getLocator());
    >
    > (last line is line 39)
    > and I get this output:
    >
    > v4l:philips 740 webcam:0
    > v4l://0
    > Working with : v4l:philips 740 webcam:0 -- v4l://0
    > java.io.IOException: java.lang.Error: No such capture device!
    > java.io.IOException: java.lang.Error: No such capture device!
    > Exception in thread "main" javax.media.NoPlayerException: Error
    > instantiating class: com.sun.media.protocol.v4l.DataSource :
    > java.io.IOException: java.lang.Error: No such capture device!
    > at javax.media.Manager.createPlayerForContent(Manager.java:1362)
    > at javax.media.Manager.createPlayer(Manager.java:417)
    > at javax.media.Manager.createRealizedPlayer(Manager.java:553)
    > at FrameGrab.main(FrameGrab.java:39)
    >
    > What am I doing wrong? Starting jmstudio with the same environment lets me
    > capture from the webcam....
    >
    > Thanks.
    >
    > Raph
     
    Raphael Bauduin, Mar 6, 2004
    #2
    1. Advertising

  3. Raphael Bauduin wrote:

    > Seems this is not so uncommon as problem:
    > http://forum.java.sun.com/thread.jsp?forum=28&thread=333682&start=0&range=15&hilite=false&q=
    >
    > No definitive answer though (setting the env variables
    > export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:
    > $JMFHOME/lib:/usr/local/java/jre/lib/i386/:/usr/local/java/jre/lib/i386/client/
    > export LD_PRELOAD=$LD_PRELOAD:/usr/local/java/jre/lib/i386/libjawt.so
    > doesn't help in my case)
    >
    > anyone has better experiences?
    >
    > Raph
    >
    >
    >
    > Raphael Bauduin wrote:
    >
    >
    >>Hi,
    >>
    >>I'm discovering JMF, and base my exploration on the example located at
    >>http://www.uk-dave.com/bytes/java/jmf-framegrab.shtml
    >>
    >>My webcam is recognised and usable with jmstudio.
    >>However, I can't use it in my code and get "No such capture device!"...
    >>Excerpts:
    >>
    >> Vector deviceList = CaptureDeviceManager.getDeviceList(null);
    >> while (!deviceList.isEmpty())
    >> {
    >> device = (CaptureDeviceInfo) deviceList.remove(0);
    >> }
    >> System.out.println("Working with : " +device.getName() + " -- " +
    >>device.getLocator() );
    >>
    >> CaptureDeviceInfo deviceInfo = device;
    >> Player player =
    >> Manager.createRealizedPlayer(deviceInfo.getLocator());
    >>
    >>(last line is line 39)
    >>and I get this output:
    >>
    >>v4l:philips 740 webcam:0
    >>v4l://0
    >>Working with : v4l:philips 740 webcam:0 -- v4l://0
    >>java.io.IOException: java.lang.Error: No such capture device!
    >>java.io.IOException: java.lang.Error: No such capture device!
    >>Exception in thread "main" javax.media.NoPlayerException: Error
    >>instantiating class: com.sun.media.protocol.v4l.DataSource :
    >>java.io.IOException: java.lang.Error: No such capture device!
    >> at javax.media.Manager.createPlayerForContent(Manager.java:1362)
    >> at javax.media.Manager.createPlayer(Manager.java:417)
    >> at javax.media.Manager.createRealizedPlayer(Manager.java:553)
    >> at FrameGrab.main(FrameGrab.java:39)
    >>
    >>What am I doing wrong? Starting jmstudio with the same environment lets me
    >>capture from the webcam....
    >>
    >>Thanks.
    >>
    >>Raph

    >
    >


    Raph:

    You've got something messed up in your device/deviceInfo variables
    probably. Post the complete code and I can tell you for sure.

    --

    Knute Johnson
    email s/nospam/knute/
    Molon labe...
     
    Knute Johnson, Mar 7, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tochaotic4u
    Replies:
    2
    Views:
    4,096
    tochaotic4u
    Jul 3, 2003
  2. Scott Preston

    JMF for Linux: No such capture device

    Scott Preston, Jun 27, 2006, in forum: Java
    Replies:
    0
    Views:
    1,028
    Scott Preston
    Jun 27, 2006
  3. Replies:
    1
    Views:
    777
    Andrew Thompson
    Jul 20, 2006
  4. Replies:
    0
    Views:
    2,405
  5. Andre Betz

    Help: JMF doesn't find any device

    Andre Betz, Nov 9, 2008, in forum: Java
    Replies:
    0
    Views:
    597
    Andre Betz
    Nov 9, 2008
Loading...

Share This Page