We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpVideo Capture,  Movie Playback,  Vision Libraries › New Cross-platfrom JMC Video Library Available
Pages: 1 2 3 ... 5
New Cross-platfrom JMC Video Library Available (Read 24260 times)
New Cross-platfrom JMC Video Library Available
Jan 5th, 2009, 9:51am
 
Hi, I have made a wrapper for the Java Media Components library that is shipping with JavaFX. I've had good results so far and am posting it in case other people are interested in using it. I've mostly just tested it on OS X, but it should work equally well under windows and linux.

http://www.mat.ucsb.edu/~a.forbes/PROCESSING/jmcvideo/jmcvideo.html

There are a few issues with certain codecs, but it plays flv, mov, avi, mp4, 3gp files etc at very high frame rates. Seeking, changing speed, backward playback, etc are all supported. It handles streaming media as well.

There are two seperate renderers. One mimics the quicktime Movie library API, extending from PImage. The other writes the video data directly onto an openGL texture.

There are some simple demos as well which explain how to use the library. I'll be updating the website, adding more demos, javadocs, etc, as well as putting the source into a subversion repo in the near future.

Thanks,

Angus
Re: New Cross-platfrom JMC Video Library Available
Reply #1 - Jan 5th, 2009, 12:18pm
 
nice! examples work fine here on 10.4.
Re: New Cross-platfrom JMC Video Library Available
Reply #2 - Jan 5th, 2009, 12:23pm
 
nice indeed! thanks!
Re: New Cross-platfrom JMC Video Library Available
Reply #3 - Jan 8th, 2009, 1:20pm
 
anyone test it under xp? i got this error:

Exception in thread "Animation Thread" com.sun.media.jmc.MediaUnsupportedException: Unsupported media:

Re: New Cross-platfrom JMC Video Library Available
Reply #4 - Jan 9th, 2009, 12:25am
 
Thank you very much!

The ability to seek in a video (and not .mov) is something I have been trying to find/accomplish in Java for some time.

For those of us with download limits, could you please provide the examples without the video files? (assuming they have videos included :] )
Re: New Cross-platfrom JMC Video Library Available
Reply #5 - Jan 15th, 2009, 10:54pm
 
Hi,

I've updated the jmcvideo website to include the source code and javadocs.

Website:
http://www.mat.ucsb.edu/~a.forbes/PROCESSING/jmcvideo/jmcvideo.html

Javadocs:
http://www.mat.ucsb.edu/~a.forbes/PROCESSING/jmcvideo/javadoc/

Zip of source code:
http://www.mat.ucsb.edu/~a.forbes/PROCESSING/jmcvideo/src.zip

Someone pointed out that when running on Windows you may get an UnsupportedMediaException. I have done most of my testing on OS X, but will find time to do some more testing on Windows and Linux this weekend.

Also, I'll post some more examples with and without video files soon, including some examples that stream videos over http.

-Angus
Re: New Cross-platfrom JMC Video Library Available
Reply #6 - Jan 16th, 2009, 5:39pm
 
thank you for the update,here's the result under the windows xp,i installed the javafx sdk and then copy the .dll and jmc.jar to the library folder(I manually replaced the jmc.jar over yours),finally its working.

it is really depends on wmp,so i also installed the klcodec445f package and check every codec for the wmp which enables wmp play as much media type as it could be,
testing with avi,mpg,flv,mov....etc,the .mov media type got bit slowin performance,others really good.

thank you indeed!  btw,forgive me my english if something confused Happy
Re: New Cross-platfrom JMC Video Library Available
Reply #7 - Jan 25th, 2009, 9:16pm
 
I just wanted to report that I have been able to install the library and run almost all the examples successfully on Windows Vista Business 32 bits. I'll try Linux soon. As liquid pointed out, I had to replace the default jmc.jar with the one that comes with the latest JavaFX SDK (1.0.1), as well as to copy jmc.dll into the library folder. I also had to install the K-lite Codec Pack 4.53 to get support for the flv and 3gp formats.

The only problem I found so far is with the VideoGrains example, the videos seem to load fine, but then it gives an ArrayIndexOutOfBounds error, I think from this line:

cxpos = vx + i + ((vx2 - vx) * percX[i][j]);

Congratulations! Nice work!
Re: New Cross-platfrom JMC Video Library Available
Reply #8 - Jan 26th, 2009, 7:20am
 
liquid and ac, thanks for the feedback and testing on Windows. You're right, I'm only including the osx native .jnilib with the library right now. I'm going to bundle the windows .dll and linux .so the next time I make an update.

I'm not able to play that many formats on Linux (Ubuntu 8.04) for some reason. If anyone has time to test out the library on Linux or knows about the best codec pack to install for Linux let me know.

Thanks, Angus
Re: New Cross-platfrom JMC Video Library Available
Reply #9 - Jan 26th, 2009, 11:28pm
 
I did some testing on Ubuntu 8.10: The flv and 3gb formats seem to be unsupported. I wonder what libraries javafx tries to load under linux to decode the video. I was able to play flv and 3gb files with gstreamer, for example.

Another note, I didn't need to install javafx at all, the files included with the library seemed to be enough. On the other hand, there are still no packages of javafx 1.0 available for linux, only windows and mac. But someone found out a way of using the mac dmg under linux:
http://www.weiqigao.com/blog/2008/12/04/using_javafx_1_0_on_linux.html
Re: New Cross-platfrom JMC Video Library Available
Reply #10 - Jan 27th, 2009, 1:44am
 
JMC uses GStreamer under the hood for linux (and CoreVideo for osx and DirectShow for windows). So it should support the "native" linux ogg-vorbis format. It should also support .flv playback via the On2 codecs that Sun is including with javafx. But since Linux isn't officially supported by javafx yet it may take some futzing around to get other formats working.

Here is a link to the linux libs (gstreamer and on2). Try unpacking the jar and putting them in the same directory as the .jnilibs or .dlls and see if you get any results. Or maybe just try including the jar without unpacking it.

http://www.mat.ucsb.edu/~a.forbes/PROCESSING/jmcvideo/jmc-natives-linux-i586__V1.0.1.jar.gz

-Angus
Re: New Cross-platfrom JMC Video Library Available
Reply #11 - Jan 27th, 2009, 2:09am
 
I just came across some good news in this recent posting by the lead javafx developer (Joshua Marinacci):

"I can't commit to any dates, but our goal is to support Linux and Solaris for the update release planned for Q1."

So there should be something that works within a few weeks. In the meantime, I'll mess around with those libs I posted and see if I can come up with a workable temporary solution.





Re: New Cross-platfrom JMC Video Library Available
Reply #12 - Feb 2nd, 2009, 1:43am
 
I'm on XP, I did copy the jmc.jar and jmc.dll at sketchbook/libraries/jmcvideo/library, and when I try to run the examples, I get a "java.lang.UnsatisfiedLinkError: com.sun.media.jmcimpl.plugins.directshow.DShowEngine.ndsInit()Z"
The only result I found by googling was at the sun forum, where they say about the java library path (at http://forums.sun.com/thread.jspa?threadID=5362353&tstart=0 ), but I think this should be ok.

any ideas???

(I also made a full installation of K-lite Codec Pack 4.53, like ac said before)
Re: New Cross-platfrom JMC Video Library Available
Reply #13 - Feb 2nd, 2009, 4:34am
 
Hmm, that sounds like it should work. How are you referring to the file within the sketch and which format are you trying to play?

the "-Djava.library.path" flag should already point to the MY_SKETCH_FOLDER/libraries/jmcvideo/library folder automatically, so you don't need to worry about setting it.

-Angus
Re: New Cross-platfrom JMC Video Library Available
Reply #14 - Feb 2nd, 2009, 1:18pm
 
I'm trying two of the examples, "VideoJMC" and "VideoTexture". Same error for both of them..
The default files are .flv, but I also tried with no luck .avi, .mov and .mpg.

I'm afraid that something might be wrong with my system maybe? I have problems with another video library too (gsvideo) - the default video library of processing is working though..

Thanks for the support!
Pages: 1 2 3 ... 5