Sunday, January 18, 2009

Using Fobs4JMF in your Application!!

Again i am posting after a long time..however i have been busy in studies and exams so got just no time. i said in my last post that i was working in a media application and i am still working on it.

 In my last post, i wrote about Fobs4JMF..and i cant believe so many people came to read it though it did not give any info regarding how to use it. As there is a large interest among people to know how to use Fobs4JMF, i want to share what i learnt in order to use Fobs4JMF practically in your Application.

Practically!! Yes, the reason is that in the webpage of Fobs4JMF, the approach to use and install it is correct but did not seem so easy and also the step regarding registering plugin is a bit complicated.

I used Fobs4JMF in my application purely in terms of classpath and i never registered my plugin and still it worked.

The steps for Windows are:

1. Make a "lib" directory in the directory where you have your Main class which you run to start your application.

2. Download Fobs4JMF binaries from their website.

3. Copy jmf.jar, fobs4jmf.jar, fobs4jmf.dll and from the Fobs4JMF downloaded package and paste them in the "lib" directory.

4. Type in command line: java -cp "lib/jmf.jar";"lib/fobs4jmf.jar";"lib/fobs4jmf.dll";"." YourApplication

5. Your application can now play various formats, however there may be problems in some formats.

As i developed Fobs4JMF based application, i realized its good for audio purposes however when playing video files, the quality of picture was not so good and some video files were not played at all.

The most obvious advantage of using Fobs4JMF is that the code that worked for jmf works here as well.

Though there are some problems, however i still believe that people behind the Fobs4JMF project have done a great job and i am sure that the Fobs4JMF will only improve with time.



  1. Hi!

    I made it like you.
    It works fine!

    There's just one problem:
    When I export my project as a jar-archive.
    It doesn't work any more.
    Do you know why?



  2. Congrats that it worked for you!!
    Well as far your query is concerned, it may not be working because of classpath issues from a jar perspective. This means there is a problem in packaging of jar. I recommend you to package it from commandline using a user-written manifest file(not the default one)..using the "jar cvf Yourmanifest Yourjarname.jar Includedfiles"
    Definetly This assumes that You know how to create a manifest file. I would have written a post on it, but currently i am busy in my studies till monday!!
    So in case you still face problem, comment here or mail me..i will be happy to help you after monday..

  3. I made it!

    But there is new problem and perhaps you can help me.
    What I want to do is a stream of mpeg4/h.264 of my ip camara display with java (or any technology but I think java works best).
    jmf is not really helpful and so I camte to FOBS4JMF. I already watched a mpeg4/h.264 video with it, but streaming seems net to be possible or I didn't made it yet.
    Can you eventually help?

  4. As far as other technology,
    You can use mplayer and give it as input the url of your ip camera stream..
    See mplayer documentation on how to use can help you.
    however this would be a totally different field..You can use mplayer as backend and Java as frontend for that!! But yes it would take a long time before you make a stable application using this concept as it creates its own problems.
    I dont have an ip camera so i cant really test it as well.
    Also i believe jmf+fobs4jmf combination should solve your problem in first place..Good luck!!

  5. I seem to have gotten it up and going as well, but would I be right in saying a lot of VOB dvd formats are failing? Seems to play the video but not the audio when you load in a vob

  6. Sorry for replying late...yes, you are right regarding that!! I guess that the project is also a bit dormant these days by looking at their website.

  7. hey Manas,

    i have too tried fobs4jmf but i m unable to play mp4 or avi which are very common formats.

    is there any way.....
    can u please help


  8. hi this is anup ..
    it works fine

    but it cannot find native library (fobs4jmf.dll) )when executing with java -jar .jar

    please give me the solution

  9. hello i also tried setting for fobs4jmf but it couldn't work please help me? for creating media player using fobs4jmf please reply manas.


  10. hello i also tried setting for fobs4jmf but it couldn't work please help me? for creating media player using fobs4jmf please reply manas.



Write Your Comments..

Share this Page:-