The jmcvideo library is a wrapper for playing videos and grabbing video data for any of the formats that the JMC library supports. It works on Windows, OSX, and Linux, using native bindings when possible. The framerates for playback are very fast, up to 300fps fullscreen for multiple YouTube quality .flv videos playing simultaneously. There are two versions of the library, one that interfaces with Processing and one directly for Java using the Java openGL bindings.
The Processing version can be used as a replacement for the current Processing video library (which is itself a wrapper for the QuickTime For Java library and which doesn't seem to work in OS X 10.5.6). The library includes two renderers, JMCMovie, which is an extension of PImage, and operates exactly like the Processing Movie library, and JMCMovieGL, which is faster and stores the video data in an openGL texture and contains some specialized drawing methods.
The newest version of the library has been tested extensively on Mac (OSX 10.5.7). Previous versions were tested using various formats on Mac (OSX 10.5.6) as well as Linux (Ubuntu 8.04) and Windows (XP SP2 & Vista Home Basic). Please let me know if other formats are supported and I will update the following usage matrix:
downloads for Processing
jmcvideo.jar - For all platforms.
VideoLoop - Plays a short video in a loop using a PImage.
VideoLoopGL - Plays a short video in a loop using an openGL texture.
VideoURL - Streams a movie trailer over http.
VideoBounceGL - Plays a video backwards and forwards between specified points in the video.
VideoJogGL - Plays a video, allowing the user to interactively seek within the video.
VideoSpeedGL - Plays a video, allowing the user to interactively change the speed of playback.
VideoSwitchGL - Demonstrates how to switch between multiple videos.
There are also some older jmcvideo 1.1 demos, which demonstrate different video effects and may or may not work on all platforms. I haven't updated them yet for jmcvideo 1.2, but most likely they work with a few minor changes.
Please feel free to contribute to the demos section by sending me any code or links to my email or by posting on the jmcvideo thread on the Processing forums.
Browsable javadocs can be found here.
You can browse the source code online here or clone the project from github like so:
1) Create the jmcvideo library folder in your Processing sketch folder. For example, on OSX it will look something like this:
On other platforms it will look similar.
2) Download jmcvideo.jar from this site and put it in the jmcvideo library folder. For example, on OSX:
3) Download JavaFX 1.2 for your platform from the javafx.com site. Find the appropriate JMC files and copy them into the jmcvideo library directory you have created. For example, for OSX you will need the following files:
For Windows, you will need to find the files jmc.dll and jmc.jar. For Linux, you will need to find the files libGStreamer.so and jmc.jar.
The jmcvideo library folder for OSX, for example, will then contain the following files:
4) Add "import jmcvideo.*;" to any of your programs that use the jmcvideo library. See the demo sketches above for examples.
A number of modifications have been made from the previous version to this version. Thanks to everyone who emailed me suggestions or pointed out issues on the Processing forums.
- The dispose method works properly.
- Streaming video is improved.
- CPU usage is minimized.
- The Processing pixel format and the openGL texture format are available.
- The "repeat" and "bounce" functionality work correctly.
- The seek resolution is better (before it was limited to 1 second intervals, now you can specify time at arbitrary resolution to jump to individual frames).
- Ability to set up start and stop markers to control looping or bouncing at specified points.
- Simpler demos to illustrate jmcvideo functionality.
- Ability to grab download progress.
processing - open source programming language
javafx - javafx sdk download
jogl - java bindings to opengl
gsvideo - another cross-platform video library
pushing pixels - great blog entry about JMC
informIT article - list of function signatures for JMC
kochobisexual - some video samples were recorded on my cellphone at a kocho show in NY
heat death - some video samples were recorded at a heat death show in Santa Barbara
angus forbes - my portfolio