# Probleme GL Video library

**URL:** <https://discourse.processing.org/t/probleme-gl-video-library/45770>\
**Category:** Processing for Pi\
**Created:** [February 15, 2025, 7:31pm UTC](https://discourse.processing.org/t/probleme-gl-video-library/45770 "2025-02-15T19:31:04Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ojey](https://avatars.discourse-cdn.com/v4/letter/o/3ec8ea/32.png) [@Ojey](https://discourse.processing.org/u/Ojey)\
**Post date:** [February 15, 2025, 7:31pm UTC](https://discourse.processing.org/t/probleme-gl-video-library/45770/1 "2025-02-15T19:31:04Z")

</div>

Hi i want to use the librairie GLvideo, i downloaded it, and when i want to try a example  
Processing\libraries\glvideo\examples\SingleVideo (this one)  
It should just play a vidéo with a simple code but i have this error : StringIndexOutOfBoundsException: begin 0, end -1, length 74

I need Gstreamer so i downloaded it and i still have the problem.  
I’m stuck…Please could you help me ?

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [February 15, 2025, 7:55pm UTC](https://discourse.processing.org/t/probleme-gl-video-library/45770/2 "2025-02-15T19:55:54Z")

</div>

can you show your code please?

It looks like something related to String or to substring?

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [February 15, 2025, 9:11pm UTC](https://discourse.processing.org/t/probleme-gl-video-library/45770/3 "2025-02-15T21:11:17Z")

</div>

Hello @Ojey ,

I installed the GL Video library from the Contribution Manager:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/6/7/67a3ecde674d3f5f55fcfe9db1aef357a74ecb33.png)

It is intended to run using the Raspberry Pi or Linux.

If I run the example that comes with the library under W10 I get a similar error.

What version of Processing are you using?  
Which Operating System?

> [@Ojey](#):
>
> I need Gstreamer so i downloaded it and i still have the problem.

With W10 I do not have to install GStreamer as it comes with the Video library.

I modified code to see if it worked under W10 _ **without the GLVideo library:** _ to see if there was an issue:

```auto
import processing.video.*;

/**
 * Press the mouse button to change playback direction
 * On Raspberry Pi: increase your GPU memory, to avoid
 * OpenGL error 1285 at top endDraw(): out of memory
 */

//import gohai.glvideo.*;

Movie video;
boolean forward = true;

void setup() {
  size(560, 406, P2D);
  video = new Movie(this, "launch1.mp4");
  video.loop();
}

void draw() {
  background(0);
  if (video.available()) {
    video.read();
  }
  image(video, 0, 0, width, height);
}

void mousePressed() {
  forward = !forward;
  if (forward == true) {
    video.speed(1.0);
  } else {
    video.speed(-1.0);
  }
}

```

Above runs under W10 successfully with the bundled GStreamer gut will give errors with my installed GStreamer.

I can’t assist with the Raspberry PI or Linux versions of Processing.

`:)`

---

<div class="post-metadata">

**Author:** ![Ojey](https://avatars.discourse-cdn.com/v4/letter/o/3ec8ea/32.png) [@Ojey](https://discourse.processing.org/u/Ojey)\
**Post date:** [February 15, 2025, 9:13pm UTC](https://discourse.processing.org/t/probleme-gl-video-library/45770/4 "2025-02-15T21:13:14Z")

</div>

Yes, but this code come from the librairy, there are exemples in a foder,  
By the way i have the same problem with all exemples in this library.

```auto
/**
 * Press the mouse button to change playback direction
 * On Raspberry Pi: increase your GPU memory, to avoid
 * OpenGL error 1285 at top endDraw(): out of memory
 */

import gohai.glvideo.*;
GLMovie video;
boolean forward = true;

void setup() {
  size(560, 406, P2D);
  video = new GLMovie(this, "launch1.mp4");
  video.loop();
}

void draw() {
  background(0);
  if (video.available()) {
    video.read();
  }
  image(video, 0, 0, width, height);
}

void mousePressed() {
  forward = !forward;
  if (forward == true) {
    video.speed(1.0);
  } else {
    video.speed(-1.0);
  }
}

```

---

<div class="post-metadata">

**Author:** ![Ojey](https://avatars.discourse-cdn.com/v4/letter/o/3ec8ea/32.png) [@Ojey](https://discourse.processing.org/u/Ojey)\
**Post date:** [February 15, 2025, 9:14pm UTC](https://discourse.processing.org/t/probleme-gl-video-library/45770/5 "2025-02-15T21:14:31Z")

</div>

I’m using Processing 4, i’m on window 11

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [February 15, 2025, 9:17pm UTC](https://discourse.processing.org/t/probleme-gl-video-library/45770/6 "2025-02-15T21:17:44Z")

</div>

The library is intended for Raspberry Pi & Linux:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/6/7/67a3ecde674d3f5f55fcfe9db1aef357a74ecb33.png)

`:)`

---

<div class="post-metadata">

**Author:** ![Ojey](https://avatars.discourse-cdn.com/v4/letter/o/3ec8ea/32.png) [@Ojey](https://discourse.processing.org/u/Ojey)\
**Post date:** [February 15, 2025, 9:19pm UTC](https://discourse.processing.org/t/probleme-gl-video-library/45770/7 "2025-02-15T21:19:24Z")

</div>

Ok !  
Because i have to make a player video with many videos (.mov with alpha channel) and internet told me 🤣that GLvideo was the best one…

---

<div class="post-metadata">

**Author:** ![Ojey](https://avatars.discourse-cdn.com/v4/letter/o/3ec8ea/32.png) [@Ojey](https://discourse.processing.org/u/Ojey)\
**Post date:** [February 15, 2025, 9:20pm UTC](https://discourse.processing.org/t/probleme-gl-video-library/45770/8 "2025-02-15T21:20:39Z")

</div>

Tks a lot, if you have a solution ?  
Or use simple this  
import processing.video.\*;

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [February 15, 2025, 9:23pm UTC](https://discourse.processing.org/t/probleme-gl-video-library/45770/9 "2025-02-15T21:23:59Z")

</div>

> [@Ojey](#):
>
> if you have a solution ?  
> Or use simple this  
> import processing.video.\*;

Use that. I provided an example that works with W10… should be fine for W11.  
Let us know!

---

<div class="post-metadata">

**Author:** ![Ojey](https://avatars.discourse-cdn.com/v4/letter/o/3ec8ea/32.png) [@Ojey](https://discourse.processing.org/u/Ojey)\
**Post date:** [February 15, 2025, 9:26pm UTC](https://discourse.processing.org/t/probleme-gl-video-library/45770/10 "2025-02-15T21:26:04Z")

</div>

Just tks a lot for your answer you really help me to open my eyes (and read everything…Raspberry Pi & Linux 😂 ) i spend one day on it

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [February 15, 2025, 9:31pm UTC](https://discourse.processing.org/t/probleme-gl-video-library/45770/11 "2025-02-15T21:31:21Z")

</div>

> [@Ojey](#):
>
> Just tks a lot for your answer

You are welcome!  
The details are important.  
This is part of the learning experience and you will get better at it!  
Time well spent! Perhaps… 🙂

Have fun!

`:)`
