Sunday Dec 07, 2008

One of the big motivations behind JavaFX is the need for media. Today's forward looking applications don't just use graphics and animation, but also video and audio. JavaFX includes media support right out of the box to let you build cool apps with very little code. You can play an mp3 with little more than the line MediaPlayer { media: Media { url: "http://awesome.com/music.mp3" } }. JavaFX supports a wide variety of media formats depending on your platform, including a set of cross-platform codecs that are guaranteed to work anywhere JavaFX is supported. You can see the complete list here in the FAQ.

As I've mentioned before, this is our first release. Our excitement to get you the bits is driving us crazy and if you stress the media stack, you will discover some of the places that need a little more work. We know about these soft spots and are addressing them in our patch release to come out very soon. All of these issues are listed in our release notes, but among them you'll find that playing more than one high-resolution or large WMV movie on Windows can take a long time to load or freeze. This is also true for videos played over a very low bandwidth network connection. There are also some known issues with "Repeat" not being honored. But hey, why would you want to watch the video again anyway? :-) For each of these cases, we have work-arounds for you in the release notes that you may find helpful.

Head over to the Samples section to check out our media demos and see some of the players that we wrote. Then read the Media Browser Tutorial that will show you how to get started writing media apps. It's very easy to work with media in JavaFX. Even our marketing manager can do it!

Comments:

We produce a ton of A/V media, and we've so far stuck to mostly "well known" standards, such as MPEG-4 (simple profile) and AVC/AAC, with MPEG-2 being a more "archival" format. Right now, the best player targets for the browser are QuickTime and Flash (since version 9 included these codecs). Do you have any demos that approximate their functionality? We would need to be able to play both HTTP and RTSP delivered streams.

Posted by Charles Soto on December 08, 2008 at 08:15 AM PST #

Folks interested in Media may want to read our interview with Tony Wyatt, lead engineer on JavaFX Media. Go to <http://java.sun.com/developer/technicalArticles/Interviews/wyant_jfx.html>

Posted by Christine Dorffi on December 08, 2008 at 03:28 PM PST #

Hi Josh,

will we see support for rtsp any time soon?

Posted by Stephan Bardubitzki on December 09, 2008 at 08:27 AM PST #

First off thanks for all the hard work. I did download the SDK and did soemthing you may have suspected might happen and created an small swing app using the swing api I heard was in the release. I could not find anything in the docs about it but I did find references to a few swing classes to support view movies. I found the MediaPlayer class and another and tried them both on various movies.

I discovered mov and flv and avi worked but they had to be small resolution. If I tried say Iron Man medium resolution trailer it did not work something about unsupported media. I also got the same response while trying mms protocol and not sure if you support rtsp or true streaming protocols.

There is a Java Based swing heavy/lightweight component mixed Rich Client with Web Services back end that supports all the protocols. It will play any video plus mms and rtsp and is free download. Uses VLC native libraries and JNI for codecs. This has been available for over a year.

So when do you think you will be able to support all the videos/cams that uses? Can ON2 codecs support that many video formats?

Again a very good start but for fuller range of media it would be great if you can do what MyUniPortal did.

Many Thanks,
-Tony

Posted by Tony Anecito on December 09, 2008 at 12:00 PM PST #

By making available differing media codecs on the host platforms, you’re driving a wedge between any attempts to have a true cross-platform. What on Earth were you thinking? I suggest you remove the ability for JavaFX to decode anything that’s locked to one platform.

Would also be good if you noticed: Ogg (Vorbis and Theora) in the last year has had a large boost, with two out of four major web browsers committing to support it, and well known hosts wikipedia.org and archive.org (converting their archive) have support, what’s JavaFXs take on the formats?

Posted by John Drinkwater on December 09, 2008 at 04:30 PM PST #

Hi Josh,

Are there plans to support pure Java/JavaFX media encoding in the near future? Or APIs for filtering and applying effects on the videos being played?

Cheers,
MK

Posted by Masood Karimi on December 09, 2008 at 08:39 PM PST #

thank you.Good aticle.

Posted by Air Jordan on December 10, 2008 at 12:55 AM PST #

Christine:

The link you have provided is either outdated or wrong: Page not found!

Posted by Stephan Bardubitzki on December 10, 2008 at 08:37 AM PST #

Hi Josh,

In response to multiple OS's and decoders I suspect there is not such a thing as a truely cross-platform set of decoders so Sun is probably doing the only thing possible by having decoders for Windows and eventually Linux and the Mac.

I used VLC and JVLC open source project for supplying my decoders/encoders for MyUniPortal. Took a year with some help from me in getting the windows/java code to work but was worth the effort. The wide range of video/cams was well worth the endless nights and weekends. I have not setup Linux and Mac yet only because of some other open source projects such as JDICPlus that I use that only works with Windows. Thus my hope JavaFX would provide the evolutionary path I wanted for MyUniPortal.

Again please push forward in all areas of JavaFX for multimedia support.

Best Regards,
Tony Anecito
Founder,
MyUniPortal
http://www.myuniportal.com

Posted by Tony Anecito on December 10, 2008 at 12:16 PM PST #

The link you have provided is either outdated or wrong: Page not found!

Posted by Tiffany Earrings on October 20, 2009 at 01:12 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed