A few weeks ago, the Processing project started the transition to the 2.0 branch with the release of the first alpha package. Today, the second alpha is out (2.0a2), and available from the downloads section in the Google code page of the project, for the Linux, Mac and Windows platforms. The most important changes for this alpha release consist in several improvements in the new video library, and better support for 64 bits within the Processing environment and in exported applications. Follow this link for more detailed release notes, and keep reading below for some additional information about the video library included in Processing 2.0.
The new video library is based on the GStreamer multimedia framework. GStreamer is a very flexible open-source framework, characterized by its high performance for video playback and a modular design that allows to support many different video codecs, capture devices, etc. However, it is not readily usable on Windows and Mac platforms, since its development is primarily native to Linux. This is the reason why we have decided to bundle the entire GStreamer framework with the video library in Processing (think of bundling Quicktime with Processing itself :-). The increase in size of the Processing package due to the inclusion of GStreamer is not so bad though, since GStreamer is very modular and the build process was customized to remove some unnecessary plugins. Getting the Windows and Mac OSX binaries of GStreamer, for both 32 and 64 bits, is in itself a relatively complex process, which I will try to document a little more in later posts.
One thing to keep in mind in relation to size is that exported applications that use the video library will include a fully functional copy of the GStreamer framework as well, which takes about ~30MB on Mac and Windows. Exported applications on Linux don’t include any GStreamer binaries, since it is safe to assume that GStreamer will be installed on the system (if not, it should be very easy to install via any of the software managers included with the major Linux distributions). Further improvements in the build process of GStreamer will hopefully help to reduce the size of the bundled GStreamer binaries.
One exciting advancement on the Mac front is the inclusion of a better GStreamer capture plugin based on QTKit, which appears to work quite well with internal and external iSight cameras in addition to firewire devices such as this one. Camera query functionality should also work out of the box with the Camera.list() API ported over from the old video library. Capture on Windows relies on DirectShow, so most (USB) cameras with up-to-date Windows drivers would probably work fine. On Linux, the capture plugin uses Video for Linux 2 (v4l2), and similarly, any camera supported by it should work in Processing as well.
The API of the new video library mirrors as closely as possible that of the old quicktime-based library, which should facilitate the transition over to 2.0. There are a couple of new methods that are still being discussed and will be later documented (or removed altogether). API-wise, things will fluctuate significantly during the alpha period, as new features are added and debugged. One piece of functionality that is currently gone from the video library is the MovieMaker class that allowed to encode movie files on the fly. It is not clear yet if an analogous class, based on GStreamer, will be later added back in, but Processing now includes a new Movie Maker tool that can be used to create movies from a sequence of images:
Please take a look at the included video examples and use the Processing forum to post questions regarding the video library (and any other aspect of Processing 2.0). If you find something that quite clearly appears to be a bug, use to the issue tracker to report it, including all the information required to reproduce it on other machines.
Note: The P3D renderer is undergoing major changes, and particularly the PShape3D class is semi-broken at this time. This area will be the focus for the next alpha release. The Android mode has been somewhat neglected lately, this will be also remedied soon :-)