# Cant play two videos at the same time

**URL:** <https://discourse.processing.org/t/cant-play-two-videos-at-the-same-time/16820>\
**Category:** Libraries\
**Created:** [January 2, 2020, 8:02pm UTC](https://discourse.processing.org/t/cant-play-two-videos-at-the-same-time/16820 "2020-01-02T20:02:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![markcoelho](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@markcoelho](https://discourse.processing.org/u/markcoelho)\
**Post date:** [January 2, 2020, 8:02pm UTC](https://discourse.processing.org/t/cant-play-two-videos-at-the-same-time/16820/1 "2020-01-02T20:02:20Z")

</div>

So, i have an animation of a car moving, and i’m trying to use mask on it, exactly the same video, but i only exported the alpha channel.  
I’m trying to play them simultaneously, so they overlap, but they seem to be playing at different timings, so it looks like this:  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/3/38822658e12fff5f0df2cdbc3cd05a3b1c400acd.png)  
And my code looks like this:

```auto
import processing.video.*;
PImage img;
Movie video, mask;
void setup() {
  size(600, 840);
  img = loadImage("comtexto.png");
  img.resize(width, height); 
  video = new Movie(this, "1.mp4");
  mask = new Movie(this, "2.mp4"); 
  mask.loop(); 
  video.loop(); 
}
void draw() {
  background(img);
  video.mask(mask);
  image(video, 0, 0);
}
void movieEvent(Movie m) {
  m.read();
}

```

Why aren’t they overlapping? They are exactly the same size and length video.

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [January 3, 2020, 3:32am UTC](https://discourse.processing.org/t/cant-play-two-videos-at-the-same-time/16820/2 "2020-01-03T03:32:31Z")

</div>

i think there is no control what frame ( of what second of a video ) you can show.  
( as actually processing does not know video / sound …  
it just talks to JAVA and that talks to operating system )  
so your computer will try to start first one video and then the other one…  
like independently.

no idea if ( at end of setup) a final

```auto
myMovie1.jump(0.01);
myMovie2.jump(0.01);

```

would improve ( not existing ) sync
