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 › Video lib to application issue! (SOLVED!)
Page Index Toggle Pages: 1
Video lib to application issue! (SOLVED!) (Read 1991 times)
Video lib to application issue! (SOLVED!)
Jul 24th, 2009, 2:52am
 
Hello All!

Been using GSVIDEO and JMCVIDEO loads lately and been trying to export to application on windows (XP and 7) with no success....

I'm aware of the problems inherent to both libraries and have read (i think) everything that both angus and andres have written about their libraries.

Here's my experience with these libraries:

GSVIDEO + GLGRAPHICS

Amazing libraries in every way! I can run multiple videos at high res + many images with no problems at all (apart from a OpenGL memory leak which i have been unable to fix, but only occurs very seldom).
All is good, until i leave the IDE..... as Andres has said before, there is a problem with the way the app imports external libraries (i think) and there currently is no solution i'm aware of... I've managed to compile a video capture app, using this hack (change 'application.windows' folder name to 'library' and copy the 'win' folder within the GSVideo library into the newly named 'library' folder), but absolutely no luck playing a simple OpenGL accelerated video.....

JMCVIDEO

Very good effort from Angus, but still a young library and i have encountered many bugs/problems which I'm aware he's looking into and will solve, as long as JavaFX allows it... Namely: the loop bug; sometimes a first video launches, but the second and following videos don't even show (i.e. texture has 0 width, 0 height); problems with codecs, currently only playing well FLV, which has bad compression.
What's excellent about this library is that u can reference the video in relation to the data path as an absolute URI and therefore this library CAN LOAD video files, even when the sketch is exported to an app. But, due to its instability at the moment it's not really an option for critical applications.

CONCLUSION/TOUGHTS

I use processing professionally. I prefer it over any other language/programming environment, and i ditched flash a long time ago... BUT i've been suffering a lot with these video issues... and running apps form the IDE really doesn't work for me... I need to do permanent, stable, installations for public institutions/corporate clients, and this kind of flaky solutions really doesn't work for me....

Fast and fluid video (i.e. OpenGL accelerated video) plays a HUGE part in modern day installations/interactive pieces and i feel this is a major hinderance towards using processing professionaly...

If anyone knows, or has info on how to solve this issue, i think we should discuss it here, and try to collaborate to solve this problem once and for all!

Special thanks to andres and angus for their amazing effort, and thanks to anyone who cares to give their input on this matter!


Pedro.
Re: Let's try to solve video lib to application issue!
Reply #1 - Jul 26th, 2009, 11:49am
 
Hello Pedro,

Thanks for your feedback about video playback in Processing. I think both JMCVideo and GSVideo are both good alternatives for replacing/complementing the default video library, and as you said both have their advantages and weaknesses.

I think that JMCVideo, by virtue of being based on JavaFX, can be more easily integrated and deployed with other Java apps and has better applet support, as well as OSX support out of the box.  So I think it is a great option in many scenarios, specially for video playback on OSX and from online applets.

GSVideo, on the other hand, inherits some of the amazing features of GStreamer (high performance, modularity, support of many codecs, video capture and movie creation functionality), but at the same time, some of its drawbacks (mostly its byzantine complexity). GStreamer has a slow development pace, and this has translated into GSVideo, although the project has moved forward steadily since I released the first version. The other problem is that almost everything has to be done by hand: compiling gstreamer from source on Linux, Windows and OSX (!), writing and maintaining the gstreamer-java bindings, etc. So it is a LOT of work. The good thing: the entire platform is open source, community developed and supported. In fact, other developers became involved in the cross-platform compilation of gstreamer as well as in the maintenance of the java bindings. So, further progress with GSVideo/GStreamer will speed-up more people become interested in the project (testing/debugging is of course very important, but submitting patches would also help enormously  Wink)

Anyway, with regards to the more immediate limitations of GSVideo (exporting applications and proper OSX support), I'd say that those are the most relevant issues that need to be solved right now, and my goal is to release a version 0.6 that runs acceptably from the PDE and can generate valid exported apps on the three platforms . I just uploaded to sourceforge a 0.6 "pre" release that should solve the exported application problem on windows, although it still needs a manual step in order to copy the gstreamer dlls to the application folder. See the details here:

http://codeanticode.wordpress.com/2009/07/26/fresh-releases-of-gsvideo-and-glgraphics/

GStreamer support on OSX has never been very good, but it is possible to compile it using different methods (directly from the tarballs, with macports, etc). I'll try to generate new binaries using the build mechanism of OSSBuild:

http://code.google.com/p/ossbuild/

and we will see how things move on from there on the OSX front.
Re: Let's try to solve video lib to application issue!
Reply #2 - Jul 27th, 2009, 1:09am
 
Wow! Thanks Andres, i realize how much work and dedication you've put into this project! I didn't know it was such a complex thing, and i'm even more thankful now Smiley

I'll give the 0.6 pre release a try right now and will keep you posted of any issues (or not!) that i encounter.

Cheers,
Pedro.
Re: Let's try to solve video lib to application issue!
Reply #3 - Jul 27th, 2009, 1:58am
 
Hi Andres,

Downloaded the gsvideo 0.6-pre, compiled and used the hack you mentioned on your blog and.... IT WORKS! Amazing...

The only thing i encountered and that you said before (maybe you should state it on on your blog too) is that on windows this only works when using the full path/URI of the movie file... otherwise it's fine! Cheesy

Thanks a million!
Pedro.
Re: Video lib to application issue! (SOLVED!)
Reply #4 - Jul 28th, 2009, 6:45am
 
Thanks. The exported application problem, at least on windows, was actually the result of a silly bug in the construction of the library path.

In terms of the path/URI issue, what other ways of loading a file from an application would be useful? Specifying a file location relative to the application?
Re: Video lib to application issue! (SOLVED!)
Reply #5 - Jul 29th, 2009, 6:58am
 
Hey Andres,

Well, since i'm retrieving full paths for the video files from a MySQL database, this actually isn't a problem to me. But, since the examples you packed with the library (loop, scratch, etc) work with movies within the 'data' folder, this could be problematic to inexperienced users who want an "out of the box" app export solution. In my experience you can use the dataPath() function but u still need to do a String.replaceAll() to change the '\' into '/' and copy the 'data' folder into the 'application.windows' folder.

Does this make sense?

Cheers,
Pedro.

Re: Video lib to application issue! (SOLVED!)
Reply #6 - Jul 29th, 2009, 8:58am
 
I don't think that the dataPath(filename) method will solve the problem, because all it does is to return:
sketchPath + File.separator + "data" + File.separator + filename;

The issue here is to find a way with gstreamer-java to open videos stored inside jar files. I guess it shouldn't be very hard to figure out...
Re: Video lib to application issue! (SOLVED!)
Reply #7 - Aug 12th, 2009, 3:25pm
 
Processing 1.0.6 now recursively copies subdirectories inside the library folder to the exported application folder. This, in particular, removes the need of manually copying the gstreamer folder.
Page Index Toggle Pages: 1