Hello,
Sorry for the late replay, I've been away from the processing forums for a little while.
I just fixed the scratch example, which didn't work precisely because it didn't check that the video width and height weren't yet initialized. I didn't have time to upload a new version of gsvideo, so here you have the updated code of scratch:
Code:
import codeanticode.gsvideo.*;
GSMovie myMovie;
void setup() {
size(640, 480);
background(0);
// Load and play the video in a loop
myMovie = new GSMovie(this, "station.mov");
myMovie.play();
}
void movieEvent(GSMovie myMovie) {
myMovie.read();
}
void draw() {
if ((1 < myMovie.width) && (1 < myMovie.height)) {
myMovie.jump(myMovie.duration() * mouseX / width);
image(myMovie, 0, 0, width, height);
}
}
The problem with movie.width and movie.height is that they are set to 1 until the first frame is read, so until that point you don't know the width and height of the video.
But the solution I think is easy, just add in your code a condition similar to the one I put in the scratch example.
As for the complexity of the installation of gsvideo on OSX, this has been a hurdle for a long time, and the main reason for this is gstreamer itself, and the lack of binary packages for OSX. Macports is a really cumbersome and not very convenient way of installing gstreamer, as you discovered yourself, at least for the purpose of integrating with gsvideo, since it installs lots of unneeded dependencies (GTK, gnome, etc), and everything has to be inside /opt/local.
However, there is some hope that the situation on OSX will improve. For example, the songbird music player (http://www.getsongbird.com/) uses gstreamer on Windows, Linux and OSX. In fact, I was able to use the OSX gstreamer binaries that come with songbird inside gsvideo (so no more macports), and at least I could initialize gsvideo and play audio files. The problem is that songbird's gstremaer doesn't include any video decoder plugin yet, so it is pretty much useless at this point. However, the whole build environment that the songbird developers use to compile gstremaer seems to be available here:
http://src.songbirdnest.com/source/xref/dependencies/
which opens the possibility of using it to add and compile the video plugins for OSX.