GSVideo is a Processing library I have been working on for almost four years now (!). It improves video support in Processing by using GStreamer as the underlying multimedia toolkit. The latest release is 1.0.0 and it should be used exclusively with Processing 1.x (the alpha releases of Processing 2.0 already include a simplified version of GSVideo as the built-in video library). Two problems users typically face with GSVideo and about which I receive emails from time to time, are (1) using GSVideo in Eclipse, and (2) exporting GSVideo applications from the Processing environment. So I put together in this post a couple of tips that might be useful in these situations.
GSVideo in Eclipse
The main difficult here is to tell GSVideo where to look for the GStreamer native library files. This is an issue only on Windows and OSX, since GStreamer often comes pre-installed in Linux and can be easily accessed by any application. The recommended thing to do in this case is to copy the gsvideo jar files and the gstreamer library files into a folder inside the Eclipse project, which is libs in the example below:
These files are included in the GSVideo zip package, in the library subfolder. Once copied inside the Eclipse project, the jars need to be added into the build path, along with the core.jar and any other jars used by the application. A sample Eclipse project configured in this way is available here as a zip file, and already comes with the gstreamer native libraries for OSX.
Exporting GSVideo applications
When exporting from the PDE sketches that use GSVideo, the resulting applications won’t work because Processing (1.5) won’t copy the required GStreamer native libraries into the application folder. Again, this is a problem only on Windows and OSX, since on Linux the exported application will be able to use the system copy of GStreamer. The solution is to copy the GStreamer files manually, from the library location into the application folder.
On OSX, the package contents needs to be opened first with Finder, and the navigate to Contents/Resources/Java, where the gstreamer folder from GSVideo/library should be copied into:
Copying data files
If the GSVideo application uses video files for playback, then they need to be manually copied to a new data folder inside the exported application folder. The reason for this is that GSVideo cannot load the video files that are automatically placed by Processing inside the application’s jar file in the lib folder.
Some further discussion about these issue in the Processing forum.