Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Java + Jmf + Ubuntu

  1. #1
    Join Date
    Jun 2007
    Beans
    7

    Java + Jmf(Webcam) + Ubuntu HELP

    hello ..

    i have a problem.. i already search on forum a lot..but i couldnt find the solution or something exactly like that..so..i'd like to ask some help over here..

    i already installed jdk..jmf.. jmfregistry detects my webcam without problems.. i can use jmstudio to record some video and at kopete i could use my webcam..

    the great problem is... i have a JAVA program that needs to connect to my webcam and take a picture.. but everytime i run my application i never can detect any device..
    i tryed the device path like.. v4l://0... v4l2://0.. and a lot of others..
    if someone is not familiar with code..
    thats it:
    this.mediaLocator = new MediaLocator("v4l://0");

    somebody can help me?
    Last edited by fcsa; March 7th, 2008 at 02:08 AM. Reason: changin topic title

  2. #2
    Join Date
    Jun 2007
    Beans
    7

    Re: Java + Jmf + Ubuntu

    any help?
    im desperate..

  3. #3
    Join Date
    Oct 2005
    Location
    Naugatuck CT
    Beans
    89
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Java + Jmf(Webcam) + Ubuntu HELP

    Quote Originally Posted by fcsa View Post
    hello ..

    i have a problem.. i already search on forum a lot..but i couldnt find the solution or something exactly like that..so..i'd like to ask some help over here..

    i already installed jdk..jmf.. jmfregistry detects my webcam without problems.. i can use jmstudio to record some video and at kopete i could use my webcam..

    the great problem is... i have a JAVA program that needs to connect to my webcam and take a picture.. but everytime i run my application i never can detect any device..
    i tryed the device path like.. v4l://0... v4l2://0.. and a lot of others..
    if someone is not familiar with code..
    thats it:
    this.mediaLocator = new MediaLocator("v4l://0");

    somebody can help me?
    Hello,

    Have you done the tutorials and sample applications at the Sun site? It sounds like you are not really sure about how the JMF works.

    Also, how are you writing the code? I see that there is a JMF plugin template for NetBeans. It's for a movie player, but it may provide you with the code pattern you need to see how to modify it for your own purposes.

    Thanks.

    mp
    If you have to ask what jazz is, you'll never know. -- Louis Armstrong

  4. #4
    Join Date
    Jun 2007
    Beans
    7

    Re: Java + Jmf + Ubuntu

    hello there..
    first..thanks for ur reply..

    now.. i saw the samples and tutorials from the sun.. and i guess i followed everything like they said..
    its true i could fully comprehend how jmf works.. but i guess for this case i could understand...

    here is my code to start a mediaLocator and a player..

    CaptureDeviceInfo di = CaptureDeviceManager.getDevice(Configuracoes.getIn stacia().getCaminhoDriverCamera());
    Vector device = CaptureDeviceManager.getDeviceList(new VideoFormat(VideoFormat.YUV));
    System.out.println("devices::"+device.size());
    Iterator ite = device.iterator();
    while(ite.hasNext()){
    di = (CaptureDeviceInfo) ite.next();
    System.out.println("device name:"+di.getName());
    }
    this.mediaLocator = new MediaLocator("v4l://0");
    Manager.setHint(Manager.LIGHTWEIGHT_RENDERER, new Boolean(true));
    player = Manager.createRealizedPlayer(mediaLocator);
    player.start();
    if ((this.componentVideo = player.getVisualComponent()) != null) {
    getVideoPanel().add(componentVideo, BorderLayout.CENTER);
    getVideoPanel().setSize(componentVideo.getSize());
    }
    else {
    labelMessageCam.setText("No Images.");
    getVideoPanel().add(labelMessageCam,BorderLayout.C ENTER);
    }

    i hope it could be helpful.
    thanks

  5. #5
    Join Date
    Jun 2007
    Beans
    7

    Re: Java + Jmf + Ubuntu

    i finally got this to work...
    i had to copy all *.so files from jmf/lib to /usr/lib..
    after that.. i did.. "ldconfig"..
    after that.. i could detect my devices from my java application..

    i hope its could help someone else..

    see u

  6. #6
    Join Date
    Feb 2007
    Location
    Heaven
    Beans
    486
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Java + Jmf + Ubuntu

    From my experience Java is a great language and technology, especially on the servers with heavy loads. But when you enter the Media Realm, IMHO Java should be your choice unless you don't have another. Last time I tried using it (about half a year ago) the JMF libraries were very buggy and moving slowly forward, they didn't even have support for MP3 because of legal issues, and a few other issues that when all put together let you ask yourself if you really wanna do it in Java. OTOH things might have changed since then (?)
    Just a thought, flash 9 having roughly a 2.5MB installer has built in support for webcams, mp3 and video, even for H.264!! Java having a 16MB installer only supports aif and wav files (doesn't even support all of types of .wav) formats and no video.
    Just my 0.02$

  7. #7
    Join Date
    Jan 2009
    Beans
    1

    Re: Java + Jmf + Ubuntu

    fcsa: can I have a great question? Can you tell me what camera do you use?
    I tried two camera under ubuntu. One is not v4l camera so it didn't work, the second is a genius, I don't know the type, it's working under ubuntu, I tried it with cheese, but it doesn't work with jmstudio, I can only see flashing horizontal lines. If you could tell me what camera you are using, it would be a great help for me, or if you or anyone could help me.
    thx.

  8. #8
    Join Date
    Jun 2005
    Beans
    208

    Re: Java + Jmf + Ubuntu

    Quote Originally Posted by afarkas View Post
    fcsa: can I have a great question? Can you tell me what camera do you use?
    I tried two camera under ubuntu. One is not v4l camera so it didn't work, the second is a genius, I don't know the type, it's working under ubuntu, I tried it with cheese, but it doesn't work with jmstudio, I can only see flashing horizontal lines. If you could tell me what camera you are using, it would be a great help for me, or if you or anyone could help me.
    thx.
    Try webcamstudio: http://webcamstudio.wiki.sourceforge.net
    It's a great program. You can connect multiple sources plus effects to one virtual webcam that is represented as a vloopback-device. It helped me to get my Philips SPC900NC webcam to work with the terrible camera implementation on Flash Player 10.

  9. #9
    Join Date
    Apr 2009
    Beans
    4

    Unhappy Re: Java + Jmf + Ubuntu

    I have similar kind of problem.
    My wecam got detected by JMFINIT and JMFREGISTRY
    but when I tried to capture the video using JMSTUDIO, noting is diaplayed.
    can somebody help me on this please??

  10. #10
    Join Date
    Nov 2009
    Beans
    2

    Re: Java + Jmf + Ubuntu

    Quote Originally Posted by fcsa View Post
    i finally got this to work...
    i had to copy all *.so files from jmf/lib to /usr/lib..
    after that.. i did.. "ldconfig"..
    after that.. i could detect my devices from my java application..

    i hope its could help someone else..

    see u
    This didn't work for me, but it is encouraging that someone got jmf to work with ubuntu - has anyone else got it to work?

    P

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •