Exporting Sketch With Movie Is Blank

Hi, I’m having issues with exporting a sketch that has a movie in it from the Video library from processing. When I run the sketch, it runs fine and the video plays. But, when I export the sketch to an exe and try to run it, it displays nothing (just a blank screen).

import java.*;
import processing.sound.*;
import processing.video.*;
Movie movie;
void setup() {
 size(1000,1000,P2D); 
  movie = new Movie(this, "keyboard-cat.mov");
  //  movie.width = width;
  //  movie.height = height;

  movie.loop();
  movie.volume(0.1); //music volume
}

void draw() {
  background(0);
  image(movie, 0, 0, width, height);
}
void movieEvent(Movie movie) {  
  movie.read();
}

Yes the movie file is in the data folder which is located in the same folder as the sketch.

Help would be much appreciated!

Here’s a link to download the code + export if you need

You might need to import the library via sketch → import library → Video by the processing foundation

Hi,

Welcome to the forum! :wink:

Looks like it’s a common problem, I’ve already seen this kind of issue here :

I am not currently able to reproduce your issue but maybe someone can help!

1 Like

When I try to run your code, I see this error message in the console:

No glyph found for the (\uFFFF) character

Not 100% sure it’s related to your issue (it might actually be an issue with the video library as mentioned above), but may be worth fixing this.

P.S. I’m on macOS 11.2.1

Ah that was some leftover code that we hadn’t cleaned up in time. The actual game was Textbox.pde.

For clarification for others, my team had come third place in a hackathon but whenever I tried to export the code into an exe so other people can play, it wouldn’t work. I eventually isolated the issue to processing’s movie library (or maybe I just did something silly?) and the code you see above is the movie I was trying to get to work in an exe.

If you’re curious, here’s the link to the github page to our hackathon game. I did a bit of cleaning up but if the code above doesn’t work when exporting, then the game won’t (though you can still run the sketch fine hopefully if you import the libraries)

1 Like

Assuming you’re trying Windows 64-bit when you mention .exe, try creating a folder called windows64 inside the libraries folder of the exported sketch. Move all the .dll files and the gstreamer-1.0 folder into it. Does this now work?

3 Likes

This fixed it! Thank you so much!! Is this common knowledge in the processing community or how did you figure it out?

3 Likes

Probably not. I maintain the Java bindings for GStreamer that Processing Video uses. Just looked for where the library was trying to load GStreamer from. Not sure whether this is a bug in the Video library or Processing’s export function. Mind you, I’m really not a fan of bundling the GStreamer native libraries, at least in the way it’s done here.

Glad it’s working for you anyway! :slightly_smiling_face:

3 Likes

Opened an issue against Processing 4 at Export sketch bug? Native libraries in different location relative to JARs · Issue #176 · processing/processing4 · GitHub

1 Like

What do you mean “inside the libraries folder of the exported sketch”?
How do I see the contents of an .exe file?

In mac I know how to do it but not in windows!