tags:

views:

261

answers:

1

I set up JMF using this tutorial http://www.deitel.com/articles/java_tutorials/20060422/PlayingVideowithJMF/ . I set up the mp3 codec in the jmfregistry like you are suppose to and I am able to play any mp3 I want when I use jmstudio. This means I set up everything correctly but when I execute my code I still get this error message:

Unable to handle format: mpeglayer3, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 16000.0 frame rate, FrameSize=32768 bits Failed to realize: com.sun.media.PlaybackEngine@5c3987 Error: Unable to realize com.sun.media.PlaybackEngine@5c3987

I play the same exact mp3 with the jmstudio and it works fine. What could be wrong? My very simple code below shows what I am doing. Any help is appreciated.

 public class MediaPanel{
 public static void main (String args[]){
  try{
   Player myMp3File = Manager.createPlayer(new File("test2.mp3").toURI().toURL());
   myMp3File.start();

  }catch(Exception e){
   e.printStackTrace();
  }
 }

}

+1  A: 

Forget JMF. It is outdated and hardly supported. Plus it doesn't allow for alot of the video formats I need. I am moving this project to c# instead since it was primarily suppose to be used on windows.

cozmokramer8
I second. I've tried too work with JMF, and it is absolutely *TERRIBLE* to code, terrible to get working, and has almost zero platform portability.
BobMcGee
Ha ha this is exactly what I already did. Your absolutely right it sucks. I did end up using C# but I would still like to have some sort of video playing capability for Java. Oh well I guess
cozmokramer8