# Help with displaying video

**URL:** <https://discourse.processing.org/t/help-with-displaying-video/19006>\
**Category:** Processing for Android\
**Created:** [March 25, 2020, 3:59pm UTC](https://discourse.processing.org/t/help-with-displaying-video/19006 "2020-03-25T15:59:16Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![TechMaster04](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/techmaster04/32/14929_2.png) [@TechMaster04](https://discourse.processing.org/u/TechMaster04)\
**Post date:** [March 25, 2020, 3:59pm UTC](https://discourse.processing.org/t/help-with-displaying-video/19006/1 "2020-03-25T15:59:17Z")

</div>

Hello all,

Currently working on porting my windows app to Android. The Windows app has a startup animation in the form of a video. I tried to use the built in video library of Processing, but that just crashes the app and yields this in the console:

```auto
FATAL EXCEPTION: Animation Thread
Process: com.TechMasterIndustries.TechmasterQueueManager, PID: 4912
java.lang.ExceptionInInitializerError
	at processing.video.Video.init(Unknown Source:0)
	at processing.video.Movie.initGStreamer(Unknown Source:6)
	at processing.video.Movie.<init>(Unknown Source:28)
	at com.TechMasterIndustries.TechmasterQueueManager.TechMasterQueueManagerAndroidBeta.setup(TechMasterQueueManagerAndroidBeta.java:89)
	at processing.core.PApplet.handleDraw(PApplet.java:1835)
	at processing.core.PSurfaceNone.callDraw(PSurfaceNone.java:476)
	at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:516)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.indexOf(int)' on a null object reference
	at processing.core.PApplet.parseInt(PApplet.java:6791)
	at processing.core.PApplet.parseInt(PApplet.java:6782)
	at processing.video.Video.<clinit>(Unknown Source:29)
	... 7 more

```

I then did some digging and found this [Library](https://github.com/omerjerk/processing-video-android/releases) which claims to be a video mode for android. This also crashes the app and yields this in the console:

```auto
FATAL EXCEPTION: Animation Thread
Process: com.TechMasterIndustries.TechmasterQueueManager, PID: 2504
java.lang.NoSuchMethodError: No virtual method getSurfaceView()Landroid/view/SurfaceView; in class Lprocessing/core/PApplet; or its super classes (declaration of 'processing.core.PApplet' appears in /data/app/com.TechMasterIndustries.TechmasterQueueManager-KQpbRXVpXCnyeeuQo0LY8g==/base.apk)
	at in.omerjerk.processing.video.android.VideoBase.<init>(Unknown Source:48)
	at in.omerjerk.processing.video.android.Movie.<init>(Unknown Source:1)
	at com.TechMasterIndustries.TechmasterQueueManager.TechMasterQueueManagerAndroidBeta.setup(TechMasterQueueManagerAndroidBeta.java:93)
	at processing.core.PApplet.handleDraw(PApplet.java:1835)
	at processing.core.PSurfaceNone.callDraw(PSurfaceNone.java:476)
	at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:516)

```

Not sure what I’m doing wrong, but here’s my code: [My Code](https://1drv.ms/u/s!AnXXk5PX0LXn9Q5qdQMOv8Guv-73?e=dHobRs)

Anyone know how to fix this/what I’m doing wrong?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [March 25, 2020, 5:25pm UTC](https://discourse.processing.org/t/help-with-displaying-video/19006/2 "2020-03-25T17:25:25Z")

</div>

Hi @TechMaster04  
Have you tried [this](https://github.com/omerjerk/processing-video-android) one?

---

<div class="post-metadata">

**Author:** ![TechMaster04](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/techmaster04/32/14929_2.png) [@TechMaster04](https://discourse.processing.org/u/TechMaster04)\
**Post date:** [March 25, 2020, 5:41pm UTC](https://discourse.processing.org/t/help-with-displaying-video/19006/3 "2020-03-25T17:41:31Z")

</div>

No, not yet. I’ll give it a try now

---

<div class="post-metadata">

**Author:** ![TechMaster04](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/techmaster04/32/14929_2.png) [@TechMaster04](https://discourse.processing.org/u/TechMaster04)\
**Post date:** [March 25, 2020, 5:52pm UTC](https://discourse.processing.org/t/help-with-displaying-video/19006/4 "2020-03-25T17:52:49Z")

</div>

Unfortunately, it still crashes. I get this error in the console:

```auto
FATAL EXCEPTION: Animation Thread
Process: processing.test.gettingstartedmovie, PID: 2084
java.lang.NoSuchMethodError: No virtual method getSurfaceView()Landroid/view/SurfaceView; in class Lprocessing/core/PApplet; or its super classes (declaration of 'processing.core.PApplet' appears in /data/app/processing.test.gettingstartedmovie-xiS_47YJhoSqxEq49WQytw==/base.apk)
	at in.omerjerk.processing.video.android.VideoBase.<init>(Unknown Source:48)
	at in.omerjerk.processing.video.android.Movie.<init>(Unknown Source:1)
	at processing.test.gettingstartedmovie.GettingStartedMovie.setup(GettingStartedMovie.java:31)
	at processing.core.PApplet.handleDraw(PApplet.java:1835)
	at processing.core.PSurfaceNone.callDraw(PSurfaceNone.java:476)
	at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:516)

```

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [March 25, 2020, 6:10pm UTC](https://discourse.processing.org/t/help-with-displaying-video/19006/5 "2020-03-25T18:10:01Z")

</div>

Have you seen [this](https://forum.processing.org/two/discussion/13084/video-in-android-mode) topic?

---

<div class="post-metadata">

**Author:** ![TechMaster04](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/techmaster04/32/14929_2.png) [@TechMaster04](https://discourse.processing.org/u/TechMaster04)\
**Post date:** [March 25, 2020, 7:07pm UTC](https://discourse.processing.org/t/help-with-displaying-video/19006/6 "2020-03-25T19:07:32Z")

</div>

I have, but it confused me quite a bit. I’ll take another look and see if I can get it to work

---

<div class="post-metadata">

**Author:** ![TechMaster04](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/techmaster04/32/14929_2.png) [@TechMaster04](https://discourse.processing.org/u/TechMaster04)\
**Post date:** [March 25, 2020, 7:37pm UTC](https://discourse.processing.org/t/help-with-displaying-video/19006/7 "2020-03-25T19:37:41Z")

</div>

UPDATE: Turns out that the topic wasn’t going to achieve the end result I desire. I’m gonna do some more research with broader terms and see if that helps, because at this point I am extremely stumped

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [March 26, 2020, 10:00am UTC](https://discourse.processing.org/t/help-with-displaying-video/19006/8 "2020-03-26T10:00:52Z")

</div>

@TechMaster04 ===

- Could be better to put the relevant code here
- Processing video lib does not work with android
- Anyway why not using the Mediaplayer class from android?- I have already posted code for that on this forum or previous one, i dont know

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [March 26, 2020, 10:15am UTC](https://discourse.processing.org/t/help-with-displaying-video/19006/9 "2020-03-26T10:15:37Z")

</div>

@akenaton  
Code below is running quite well, but when I set the surface xy values, the movie(placed in data folder) disappears as if it were below the actually sketch layout frame.  
Any idea?  
(Using APDE app mode)

```auto
import android.media.MediaMetadataRetriever;
import android.os.Looper;
import android.app.Activity;
import android.view.ViewGroup;
import android.view.View;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.media.MediaMetadataRetriever;
import android.media.MediaPlayer;
import android.content.res.Resources;
import android.content.res.AssetFileDescriptor;
import android.content.res.AssetManager;
import android.content.Context;

AssetFileDescriptor afd;
Context context;
Activity act;
SurfaceView mySurface;
SurfaceHolder mSurfaceHolder;
MediaMetadataRetriever metaRetriever;
MediaPlayer mp;

void setup() {
  size(400, 400, P2D);
  act = this.getActivity();
  context = act.getApplicationContext();
  Looper.prepare();
  mp = new MediaPlayer();
  try {
    afd = context.getAssets().openFd("m.mp4");
    MediaMetadataRetriever metaRetriever = new MediaMetadataRetriever();
    metaRetriever.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
    String height = metaRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_HEIGHT);
  }
    catch (IOException e) {
    e.printStackTrace();
  }
    mySurface = new SurfaceView(act);
    mSurfaceHolder = mySurface.getHolder();
    mSurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
    mSurfaceHolder.addCallback(new SurfaceHolder.Callback() {
    @Override
      public void surfaceCreated(SurfaceHolder surfaceHolder) {
      mp.setDisplay(surfaceHolder);
    }
    @Override
      public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i2, int i3) {
      mp.setDisplay(surfaceHolder);
    }
    @Override
      public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
    }
  }
  );
    startVideo();
}

void startVideo() {
  act.runOnUiThread(new Runnable() {
    public void run() {
      try {
        mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
        mSurfaceHolder = mySurface.getHolder();
        mSurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
        mp.prepare();
        act.addContentView(mySurface, new ViewGroup.LayoutParams(400, 400));
        mySurface.setX(width/2);
        mySurface.setY(height/2);
        if (mp.isPlaying() == false) {
          mp.start();
        }
      }
      catch (IOException e) {
        e.printStackTrace();
      }
    }
  }
    );
}

void draw() {
}

void onStop() {
    if (mp!=null) {
        mp.release();
        mp = null;
  }
    super.onStop() ;
}

```

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [March 26, 2020, 10:47am UTC](https://discourse.processing.org/t/help-with-displaying-video/19006/10 "2020-03-26T10:47:33Z")

</div>

@noel ===  
yes, your video is behind the surfaceView (normally if it has sound you can hear it) you have created and that is exactly what your code is doing; onStart you have to create a VideoView and that is the view you add to the surface; dont forget also to set the zOrder “on top” param to true. If needed i can put code for that but i am quite sure that you can find by yourself!

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [March 26, 2020, 4:30pm UTC](https://discourse.processing.org/t/help-with-displaying-video/19006/11 "2020-03-26T16:30:35Z")

</div>

@noel ===  
excuse me; i have not taken time enough to look to your code in details; the zOrder param is not only the culprit in your code, there is another error / your player: you have to setDataSource and prepare() BEFORE starting the runnable. With some modifs i can get your code running successfully (and there is no need for a videoView which is only a sublclass for the player itself) - If you want i can put the code (i think it will run the same with APDE)\_

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [March 26, 2020, 6:48pm UTC](https://discourse.processing.org/t/help-with-displaying-video/19006/12 "2020-03-26T18:48:07Z")

</div>

@akenaton  
I’ve attached the surface View to a FrameLayout like I normally do The sketch runs well with video and sound. But **still** behind my sketch window. How can I set this order.

```auto
import android.media.MediaMetadataRetriever;
import android.os.Looper;
import android.app.Activity;
import android.view.ViewGroup;
import android.view.View;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.media.MediaMetadataRetriever;
import android.media.MediaPlayer;
import android.content.res.Resources;
import android.content.res.AssetFileDescriptor;
import android.content.res.AssetManager;
import android.content.Context;
import android.widget.FrameLayout;
import android.R;
import android.content.*; 
import android.view.Gravity;
import android.view.ViewGroup.LayoutParams;

AssetFileDescriptor afd;
Context context;
Activity act;
SurfaceView mySurface;
SurfaceHolder mSurfaceHolder;
MediaMetadataRetriever metaRetriever;
MediaPlayer mp;
FrameLayout fl;

void setup() {
  size(10, 10);
  Looper.prepare();
  try {
    afd = context.getAssets().openFd("m.mp4");
    MediaMetadataRetriever metaRetriever = new MediaMetadataRetriever();
    metaRetriever.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
    String height = metaRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_HEIGHT);
  }
    catch (IOException e) {
    e.printStackTrace();
  }
  mp = new MediaPlayer();
  try {
    mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());   
    mp.prepare();
  }
  catch (IOException e) {
    e.printStackTrace();
  }
  startVideo();
}

void startVideo() {
  act.runOnUiThread(new Runnable() {
    public void run() {

      if (mp.isPlaying() == false) {
        mp.start();
      }
    }
  }
  );
}

void draw() {
}

void onStop() {
    if (mp!=null) {
        mp.release();
        mp = null;
  }
    super.onStop() ;
}

@Override 
  public void onStart() {
  act = this.getActivity();
  context = act.getApplicationContext();
  mySurface = new SurfaceView(act);
  mSurfaceHolder = mySurface.getHolder();
  mSurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
  mSurfaceHolder.addCallback(new SurfaceHolder.Callback() {
    @Override
      public void surfaceCreated(SurfaceHolder surfaceHolder) {
      mp.setDisplay(surfaceHolder);
    }
    @Override
      public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i2, int i3) {
      mp.setDisplay(surfaceHolder);
    }
    @Override
      public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
    }
  }
  );
  mySurface.bringToFront();
  //mySurface.setX(100);
  //mySurface.setY(100);
  fl = (FrameLayout)act.findViewById(R.id.content);
  FrameLayout.LayoutParams params1 = new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, Gravity.CENTER);
  fl.addView(mySurface);
}

```

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [March 27, 2020, 9:14am UTC](https://discourse.processing.org/t/help-with-displaying-video/19006/13 "2020-03-27T09:14:35Z")

</div>

@noel ===  
working code (from the first one you posted ) but i have also the version getting the frameLayout::

```auto

import android.media.MediaMetadataRetriever;
import android.os.Looper;
import android.app.Activity;
import android.view.ViewGroup;
import android.view.View;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.media.MediaMetadataRetriever;
import android.media.MediaPlayer;
import android.content.res.Resources;
import android.content.res.AssetFileDescriptor;
import android.content.res.AssetManager;
import android.content.Context;

AssetFileDescriptor afd;
Context context;
Activity act;
SurfaceView mySurface;
SurfaceHolder mSurfaceHolder;
MediaMetadataRetriever metaRetriever;
MediaPlayer mp;
int videoH = 0;
int videoL= 0;

void settings(){
  size(displayWidth, displayHeight);
}

void setup() {
  //size(400, 400, P2D);
  background(0);
  act = this.getActivity();
  context = act.getApplicationContext();
  Looper.prepare();
  mp = new MediaPlayer();
  try {
    afd = context.getAssets().openFd("who.mp4");
    MediaMetadataRetriever metaRetriever = new MediaMetadataRetriever();
    metaRetriever.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
    String h = metaRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_HEIGHT);
    String w = metaRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_WIDTH);
    videoL= int(w);
      videoH=int(h);
  mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
  mp.prepare();

}
    catch (IOException e) {
    e.printStackTrace();
  }
    mySurface = new SurfaceView(act);
    mSurfaceHolder = mySurface.getHolder();
    mSurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
    mSurfaceHolder.addCallback(new SurfaceHolder.Callback() {
    @Override
      public void surfaceCreated(SurfaceHolder surfaceHolder) {
      mp.setDisplay(surfaceHolder);
      println("surface créeé");
    }
    @Override
      public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i2, int i3) {
      mp.setDisplay(surfaceHolder);
      println("surface changée");
    }
    @Override
      public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
        println("surface détruite");
    }
  }
  );
    startVideo();
}

void startVideo() {
  act.runOnUiThread(new Runnable() {
    public void run() {
      //try {
        println("jexecute le runnable");
        //mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
        mSurfaceHolder = mySurface.getHolder();
        mSurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
        
        //mp.prepare();
        act.addContentView(mySurface, new ViewGroup.LayoutParams(videoL, videoH));
        mySurface.bringToFront();
      mySurface.setZOrderOnTop(true);
        mySurface.setX(displayWidth/2-videoL/2);
        mySurface.setY((displayHeight/2)-videoH/2);
        if (mp.isPlaying() == false) {
          mp.start();
        }
      //}
      //catch (IOException e) {
        //e.printStackTrace();
      //}
    }
  }
    );
}

void draw() {
}

void onStop() {
    if (mp!=null) {
        mp.release();
        mp = null;
  }
    super.onStop() ;
}

```

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [March 27, 2020, 6:06pm UTC](https://discourse.processing.org/t/help-with-displaying-video/19006/14 "2020-03-27T18:06:29Z")

</div>

@akenaton  
Thank you very much.  
I understood the setDataSource and prepare() tip.  
But the mySurface.setZOrderOnTop(true); really did the trick.  
Great!

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [March 27, 2020, 6:09pm UTC](https://discourse.processing.org/t/help-with-displaying-video/19006/15 "2020-03-27T18:09:59Z")

</div>

@noel ===  
yes; i have told you that in the previous post… Note that this solution is one (as often) among others (videoView…textureView) but that is not really important!

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [April 6, 2020, 2:12pm UTC](https://discourse.processing.org/t/help-with-displaying-video/19006/16 "2020-04-06T14:12:00Z")

</div>

> [@TechMaster04](#):
>
> Turns out that the topic wasn’t going to achieve the end result I desire.

I don"t know what you precisely want to achieve, but if you are still interested I uploaded a code for a video player with the play/pause/rewind buttons and a slider to fast forward/backward. [here](https://github.com/EmmanuelPil/Android-java-code-utilities-widgets-for-Processing-for-Android)

![vtvt](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/901625dde17039ba376fa47175b3c812ee4ef37b.gif)

---

<div class="post-metadata">

**Author:** ![Mesalcode](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mesalcode/32/9284_2.png) [@Mesalcode](https://discourse.processing.org/u/Mesalcode)\
**Post date:** [May 21, 2020, 2:03pm UTC](https://discourse.processing.org/t/help-with-displaying-video/19006/17 "2020-05-21T14:03:37Z")

</div>

How do I draw OVER the video?

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [May 21, 2020, 3:59pm UTC](https://discourse.processing.org/t/help-with-displaying-video/19006/18 "2020-05-21T15:59:50Z")

</div>

I have responded [here.](https://discourse.processing.org/t/play-video-in-background/21092/2)

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [May 21, 2020, 4:57pm UTC](https://discourse.processing.org/t/help-with-displaying-video/19006/19 "2020-05-21T16:57:15Z")

</div>

@Mesalcode ===  
yes, that is possible; in the thread that starts the surfaceview you comment the setZOrderOnTop ; instead of it you write mySurface.setZOrderMediaOverlay(true);  
in your setup() or before (onStart()) you create the view for your rect, the most simple way is to create a button from Button class, setting its text (if needed!), its textColor, its coordinates and layout params; then you add it to the contentView; if you want only the text just before adding you set its background color to transparent. Of course you can also a) create a drawable shape and use the same code or b) create another surface wiew for your shape and put it upon the first one with the video.

---

<div class="post-metadata">

**Author:** ![Mesalcode](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mesalcode/32/9284_2.png) [@Mesalcode](https://discourse.processing.org/u/Mesalcode)\
**Post date:** [May 22, 2020, 9:32am UTC](https://discourse.processing.org/t/help-with-displaying-video/19006/20 "2020-05-22T09:32:33Z")

</div>

Thank you for your help!

That is very unfortunate for me as I am using Processing for its buildin functions for rendering textured cubes etc. I already spent alot of time building this app and don’t want to throw all my work away for the background.

My idea was to split the video into each frame, store the frames in an array and then iterate through the frames every time draw is called. This however leads the app into crashing without any error message after a few seconds. An OutOfMemoryError would be an explanation, but I also tried loading only 20 images with 10kb each and it would still crash.

Do you have any explanation for why this is happening?

[Next page](https://discourse.processing.org/t/help-with-displaying-video/19006.md?page=2)
