Results 1 to 3 of 3
- 01-16-2011, 08:43 PM #1
Member
- Join Date
- Dec 2010
- Posts
- 57
- Rep Power
- 0
How to go about playing video in a Java Application
I've looked around on Google, and I found that I can play video through the JavaFX API and the JMF API, but I have a few questions that I haven't been able to find answers to:
Which API should I use to play back either a .wmv or .avi file that will be read into the program by some sort of InputStream, maybe FileInputStream..
Is there a way to play a video with audio using the public API? The video would need to be played as a transition between levels in my game, so I'd really prefer a public API answer to this (if there is one) rather than use one of these APIs which may not work on other machines that only have the regular JRE.
Is it possible to do inside a JFrame? (I'd certainly hope so, because the game is inside a JFrame, so it would make it easier for people playing if everything was contained inside one window)
Thank you to anyone who is able to help me answer my questions.
- 01-17-2011, 04:31 AM #2
Remember that .avi and .wmv are not codecs but rather containers. An AVI can contain anything from xvid, h.264, divx, uncompressed, etc... Same for WMV. You would need decoding support of these underlying codecs in order to play the files - I'm not sure JMF or JavaFX support the codecs.Which API should I use to play back either a .wmv or .avi file that will be read into the program by some sort of InputStream, maybe FileInputStream..
I suggest looking at the documented formats supported by the frameworks and converting your source video to one of those - Java's media support is kind of lack-luster, especially the cross platform versions.
- 02-03-2011, 03:07 AM #3
Member
- Join Date
- Dec 2010
- Posts
- 57
- Rep Power
- 0
Similar Threads
-
Bug Tracker System with integrated Java Video Capture application
By AndyZwer in forum Java SoftwareReplies: 0Last Post: 09-17-2010, 09:48 AM -
problem with playing video in javafx application
By kiranblighty in forum JavaFXReplies: 1Last Post: 02-27-2010, 12:09 AM -
Video Conference application in J2ME
By srikant_ in forum CLDC and MIDPReplies: 1Last Post: 03-10-2009, 06:22 AM -
Embed video on web page - Application to Applet
By ConvoyTh in forum Java AppletsReplies: 1Last Post: 11-27-2008, 07:05 AM -
Video Tutorial Eclipse 3.3 Create Web Application with Tomcat
By irnbru in forum EclipseReplies: 1Last Post: 10-05-2008, 11:09 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks