I can't find this error online

** (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:

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):

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?

1 Like

-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?

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

i think something like

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

will take care of both events

tested with:

/**
 * 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);
}
1 Like