# I can't find this error online

**URL:** <https://discourse.processing.org/t/i-cant-find-this-error-online/14569>\
**Category:** Electronics (Arduino, etc.)\
**Created:** [October 10, 2019, 11:39am UTC](https://discourse.processing.org/t/i-cant-find-this-error-online/14569 "2019-10-10T11:39:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SimonRedfox](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@SimonRedfox](https://discourse.processing.org/u/SimonRedfox)\
**Post date:** [October 10, 2019, 11:39am UTC](https://discourse.processing.org/t/i-cant-find-this-error-online/14569/1 "2019-10-10T11:39:47Z")

</div>

\*\* (Processing core video:1627): WARNING \*\*: gstvideo: failed to get framerate property of pad playsink1:audio\_sink

This is the error I’m getting for the following codes

processing:

```auto
import processing.serial.*;
import processing.video.*;

Serial port;

String val;
String A;
String B;

Boolean C;

Movie video;
Movie video1;

void setup(){
  size (300, 400);
  
  printArray(Serial.list()); //print alle serial poorten
 
  port = new Serial(this, "/dev/cu.SLAB_USBtoUART", 9600);
 
  video = new Movie (this, "IMG_0585.MOV");
  video.loop();
  video.frameRate(2);
  
  video1 = new Movie (this, "IMG_0574.MOV");
  video1.loop();
  video1.frameRate(2);
}

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

void movieEvent1(Movie video1){
  video1.read();
}

void draw(){
  int C = port.read();
     if (port.available() > 0) {
       int scenario = port.read();
       println(scenario);
     if (scenario == 1 && C == 0){
       image(video, 0, 0, width, height);
     }
     if (scenario == 2 && C == 1){
       image(video1, 0, 0, width, height);
     }
   }
  }

```

Arduino (the build is two simple buttons):

```auto
const int lamp1 = 13;

int knopje1;
int knopje2; 
int kern = 1;
int fossiel = 2;

boolean flag1 = true;
boolean flag2 = false;
boolean C = false;

void setup() {
pinMode (knopje1, INPUT);
pinMode (knopje2, INPUT);
pinMode (lamp1, OUTPUT);

Serial.begin(9600);
}

void loop() {

  if (digitalRead (A0)==HIGH) {
    flag1 = flag1;
    C = false;
      digitalWrite(lamp1, HIGH); 
        Serial.write(kern);
        Serial.write(C);
        Serial.print(C );
        Serial.println(kern);
        delay(1000);
        
    }

  if (digitalRead (A2)==HIGH) {
    flag2 = flag2;
    C = true;
    digitalWrite(lamp1, LOW); 
    Serial.write(fossiel);
    Serial.write(C);
    Serial.print(C );
    Serial.println(fossiel);
    delay(1000);
    }
  }

```

Does anyone know what is wrong and how to fix it?

---

<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:** [October 10, 2019, 12:02pm UTC](https://discourse.processing.org/t/i-cant-find-this-error-online/14569/2 "2019-10-10T12:02:41Z")

</div>

-a- i not think your problem has anything to do with arduino,  
so please post a code version just related to the movie lib problem  
and select “library” category

-b- where you find  
this code?

```auto
void movieEvent1(Movie video1){
  video1.read();
}

```

i think something like

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

```

will take care of both events

tested with:

```auto
/**
 * Loop. 
 * Shows how to load and play a QuickTime movie file.  
 */

import processing.video.*;

Movie movie1, movie2;

void setup() {
  size(640, 360);
  background(0);
  movie1 = new Movie(this, "transit1.mov");
  movie1.loop();
  movie2 = new Movie(this, "transit2.mov");
  movie2.loop();
}

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

void draw() {
  image(movie1, 0, 0, width/2, height/2);
  image(movie2, width/2, height/2, width/2, height/2);
}

```
