How to play avi files in a java application
Hi,
I have a java desktop application which is actually a kiosk application. I have to run some promotion videos in my application when no user is using the kiosk.
videos can be any avi or neother which can easily be played in java applications.
What is the best way for me to play video files in a java application?
...
> I have a java desktop application which is actually a
> kiosk application. I have to run some promotion
> videos in my application when no user is using the
> kiosk.
Will the kiosks all be running the same OS?
The reason I ask is that JMF is available in both
standard and performance pack versions. The PP
provides a wider variety of formats, but runs only
on Win. and *nix.
> videos can be any avi or neother which can easily be
> played in java applications.
That is handy. The JMF standard pack provides
support for a number of flavors of AVI, but not all.
> What is the best way for me to play video files in a
> java application?
I would suggest checking if the 'standard' version
of the JMF can play* the current AVI's. If it can, use
the standard JMF for the project, if not, look to
converting the AVI's to something the JMF can
deal with, this might involve storing the video or
audio of the AVI's in a different format - you
might have to experiment to get the right
combination, but the JMF 'supported formats'
is a good guide.
http://java.sun.com/products/java-media/jmf/2.1.1/formats.html
* To check if JMF can play them, install it and
try loading the AVI's in JMStudio - the default
player.
> Yes all kiosks will be running on windows OS
OK - in that case I'd recommend that if the standard
pack can play the current AVI's - use it, else try the PP.
If neither supports the particular AVI codecs - convert
them to a format that the standard JMF can load.
Is that all it reported?
I tried to load an AVI here that was recorded
using codecs not understood by JMF, and got
a message..
Controller Error
Failed to realize: input media not supported: DIV3 video,
mpeglayer3 audio
Note the second part of that message that quite
specifically states the 'input media not supported'
and tells the type of media 'DIV3 video, mpeglayer3
audio'.
This is one flavor of AVI that would need to be
converted (to audio/video codecs that JMF
understands) before JMF could load it.
Perhaps more importantly, have you checked the
page that lists filetype and codec support offered
by JMF?
When i try to run .avi files its gives error:
Controller Error:
Failed to realize: failed to parse the input media
Yea i checked the supported formats and it has avi in it.
http://java.sun.com/products/java-media/jmf/2.1.1/formats.html
i downloaded and installed this JMF: jmf-2_1_1e-windows-i586.exe
Any ideas?