Reputation: 31
I'm using Processing 4.0b7 (also tried with previous versions), and installed its Video Library. I have the following code (Im literally just trying to play a video):
import processing.video.*;
Movie video;
void setup() {
size(640, 480);
video = new Movie(this, "video.mp4");
video.play();
}
void draw() {
if (video.available()) {
video.read();
image(video, 0, 0);
}
}
I have "video.mp4" on a folder named data, on the same file as the sketch. Whenever I try to run the code, I get the following error:
(java.exe:28748): GLib-CRITICAL **: 19:04:53.545: g_dir_open_with_errno: assertion 'wpath != NULL' failed
Cannot load GStreamer plugins from C:\Users\Estêvão\Documents\Processing\libraries\video\library\windows-amd64\gstreamer-1.0
Processing video library using bundled GStreamer 1.16.2
java.lang.IllegalArgumentException: No such Gstreamer factory: playbin
at org.freedesktop.gstreamer.ElementFactory.makeRawElement(ElementFactory.java:307)
at org.freedesktop.gstreamer.Element.makeRawElement(Element.java:104)
at org.freedesktop.gstreamer.elements.PlayBin.<init>(PlayBin.java:118)
at processing.video.Movie.initGStreamer(Unknown Source)
at processing.video.Movie.<init>(Unknown Source)
at ex5_2_1.setup(ex5_2_1.java:26)
at processing.core.PApplet.handleDraw(PApplet.java:2142)
at processing.awt.PSurfaceAWT$9.callDraw(PSurfaceAWT.java:1440)
at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:356)
RuntimeException: Could not load movie file video.mp4
RuntimeException: Could not load movie file video.mp4
RuntimeException: Could not load movie file video.mp4
I'm using Windows 11. I think the problem is coming from the library instalation, but I've asked for friends who have their video working to send me their Processing files, and I'm still getting the same problem. Also deleted everything Processing-related and reinstalled it several times, and I still can't get it to work. Other libraries such as sound are working.
Upvotes: 1
Views: 1710
Reputation: 31
I've finally solved the problem. The sketch was on a folder with special characters. I had already changed the name of the folder, but I kept getting the same bug, so I assumed that wasn't the problem. But well, my name has a special character as well, therefore, so does my username. Processing goes through the Windows user folder before getting to the sketch folder, and turns out that's what was making the program not work. Thank you all for your help, anyways!
Upvotes: 2
Reputation: 51867
Unfortunately I won't have the time to debug this in detail (e.g. if it's something to do with special(unicode) characters in paths or something deeper within the processing-video library).
For now I suggest using an older version of Processing. I can confirm the video library works on Windows 11 with Processing 3.5.4 and the Procecessing video 2.0 library (Thank you @cSharp for the helpful comments)
Update I can confirm you can use Processing video 2.1 with Processing 4.0b7 on Windows 11.
You would need to:
You can run your code or Processing > Examples > Contributed Libraries > Video Library for Processing 4 > Movie > Loop to test.
Upvotes: 0