Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

play video in reverse

$
0
0

Hi,

I'm trying to play a video file in reverse - using Processing 2.1. According to the documentation setting the speed to a negative number should do it, but I get a GStreamer error:

(Processing core video:9472): GStreamer-CRITICAL **: gst_segment_set_seek: assertion `start <= stop' failed

Here is the code (I just modified the Speed sample to use negative speeds as well):

/**
 * Speed. 
 *
 * Use the Movie.speed() method to change
 * the playback speed.
 * 
 */

import processing.video.*;

Movie mov;

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

void movieEvent(Movie movie) {
  mov.read();  
}

void draw() { 
  image(mov, 0, 0);

  float newSpeed = map(mouseX, 0, width, -0.5, 1);
  mov.speed(newSpeed);

  fill(255);
  text(nfc(newSpeed, 2) + "X", 10, 30); 
}  

Thanks, Guy


Viewing all articles
Browse latest Browse all 2896

Trending Articles