Skip to content
codeanticode edited this page May 23, 2019 · 43 revisions

Introduction

In Processing 2.0, we've made the switch to a GStreamer-based video library (excising the Apple horror show that was QuickTime for Java). There are many tales to tell of the quirky and unique beast that is GStreamer, and this document seeks to tell them.

The video library relies on the gstreamer-java bindings to talk to the native GStreamer libraries. The 1.x branch of the video library used the gstreamer-java bindings that were compatible only with the 0.10 version of GStreamer, which is no longer developed. Version 2.0 of the video library uses the new gst1-java-core bindings, derived from the original gstreamer-java bindings, but now compatible with the latest stable version of GStreamer (1.8.x or newer).

Development Environment

The source code of the video library includes an Eclipse project so the development can be carried out within that IDE, but other environments, such as IntelliJ, should work as well. Details on how to setup the development environment using Eclipse are provided in this page.

The GStreamer maintainers provide packages of the latest stable version of the 1.x branch for various platforms, including Mac and Windows. Most Linux distributions include the latest GStreamer libraries by default. These packages can be downloaded from here.

Building the library from source

The easies approach to build the library from source and use it from the PDE is to clone this repo inside the sketchbook's library folder inside the video subfolder (otherwise Processing won't pick the library up):

git clone https://github.com/processing/processing-video.git video

then edit the build.properties file so the variables core.classpath.location and compiler.classpath.location point to the right locations in your local copy of the main processing repo.

After that, you should be able to simply build the library:

ant build

which will generate the video.jar file inside library. Processing should be able recognize the new build after restarting the PDE.

Version 1.x of the video library

The 1.x branch of the video library is no longer maintained. We are currently working to make the 2.0 beta branch the new default release of the library through the Contributions Manager in the PDE. Some old notes regarding the 1.x are available here as an archived reference.

Version 2.x of the video library

Thanks to Gottfried Haider and the development team behind gstreamer-java, we were finally able to update the video library to use GStreamer 1.0. The 2.0-beta releases (not yet available in the Contributions Manager) are the first result of that work. There are still issues to be dealt with, see this discussion in the Pull Request that incorporated the update: https://github.com/processing/processing-video/pull/84

The 2.0 milestone lists some of the issues that should be addressed towards the stable release of the 2.0 version of the video library.

In general, the top priorities would be to ensure that camera capture is well supported by the 2.0 stable release, since that's a very important use of the library, and that direct buffer to opengl texture functionality is re-implemented in 2.0.

Clone this wiki locally