Search code examples
javavideojmf

Java JMF won't play any video files


I try to play a video file (such as .avi) using the fabulous JMF 2.1.1, but I get the same error message:

Unable to handle format: XVID, 624x352, FrameRate=23.9, Length=1317888 0 extra bytes Unable to handle format: mpeglayer3, 48000.0 Hz, 0-bit, Stereo, Unsigned, 18627.0 frame rate, FrameSize=9216 bits Failed to realize: com.sun.media.PlaybackEngine@e53108 Error: Unable to realize com.sun.media.PlaybackEngine@e53108 .

The program does play audio files. I am using a program I downloaded:

http://www.cs.odu.edu/~cs778/spring04/lectures/jmfsolutions/MDIApp.java

and also tried the demo app from the Oracle interweb site. Codec problem seems likely, but I can't find any internet resources with specific instructions to remedy this. I am in dire need of help here. Any suggestions? Thank you.


Solution

  • Linking from a previous question How to create a media player in Java without JMF?. To be specific, there is a platform specific performance pack from Sun with some added codecs that might be useful. A list of supported formats is on the oracle site. But I don't think XVID will be supported