Video library error on PC with non-default renderers

I wrote a sketch in Processing 3.5.4 that uses a collection of png and mp4 files as inputs, making use of the Video library for videos. On macOS, it runs perfectly. On Windows 10, however, it fails to load videos, either giving the error “Seek operation failed” when calling any Movie functions, like loop(), or simply returning blank pixels. After substantially reducing the script to its barest bone operations, I found that in default renderer mode (no renderer specified in size()), the video files are read perfectly. If I specify any other renderer (P2D or P3D), they fail to load. I unfortunately need to use P3D for the script. Is this a known issue? Multiple other people using my sketch experienced this issue on their machines as well, so I don’t believe it’s specific to my machine’s specifications, but could this be an OpenGL issue?

In case it is useful, I’m including the pared down code below. This particular portion simply reads the first frame of the video to create a thumbnail image. Use any mp4 file to test, placed inside the “data” folder within the sketch.

Thanks!

import processing.video.*;

Layer layer;

void setup() {
  size(900,900);              //Change this to P3D to cause an error
  layer = new Layer(this, "1105_L4_objects_RAB.mp4"); 
}

void draw() {
  image(layer.frame,0,0);
}

void movieEvent(Movie m) {
  m.read();
}

class Layer {
  PImage frame;
  Movie m;

  Layer(PApplet parent, String f_) {
    m = new Movie(parent, f_);
    m.loop();
    m.read();
    m.pause();
    m.loadPixels();
    int w = m.width;
    int h = m.height;
    frame = m.get(0, 0, w, h);
  }
}

Hi,

Is “Seek operation failed” the only error output?

Your issue might be similar to this :

It seems similar to the issue you linked to, but I do not get that entire error message–I only get Seek operation failed. I do sometimes get another different error after I stop the sketch that says WARNING: no real random source present, which is also mentioned in that thread. I see that a ton of people had this very problem on macOS Catalina (rather than PC) earlier this summer, including the black/blank get() pixels. But now that it’s appeared on the PC end (and since no solutions were presented for the Catalina problems other than waiting for updates), I’m not sure where to go!

The “no real random source present” message is a red herring, and not a sign of a problem, just annoyance.

Which version of the Video library? The last time I looked at the integration code between OpenGL and Video library version 2 I noticed a problem, which I think I reported at the time.

1 Like

I’ve added a comment on the GitHub issue linked above, but I’m not sure if your issue is definitely caused by the same problem.

I’m indeed using Video library Version 2. It must be an OpenGL issue. I did the somewhat tedious exercise of downloading and testing previous Video library 2.0 releases (Beta1-5), and as soon as they integrate GStreamer (Beta 3), I begin getting the “Seek operation failed” error. On previous versions, it just crashes.

Thank you for adding the comment on the GitHub issue you linked. I think for now I just have to stick with Mac for this particular sketch. Would it be worth my commenting on that issue on GitHub as well (or creating a new issue)?

1 Like

I am also getting this error from a multi video playback sketch. Is there any work around or a fix anyone can recommend?