Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : Processing 2.0 video alpha channel

$
0
0
Hi everyone!

Same problem with getting your code running, Akiersky. Rendered the *.mov with RGB+ALPHA properties and Animation as you suggested.

  1.     import processing.opengl.*;
        import codeanticode.gsvideo.*;
        import codeanticode.glgraphics.*;
     
    void setup() {
      size(600, 400, OPENGL);
      frameRate(30);
    }

    void draw() {
       background(100,100,0);
     
       BGvideo bgv = new BGvideo("air_argb.mov", app);    
       bgv.draw(); 
    }

    public class BGvideo {

      GSMovie myMovie;
      GLTexture tex;

      public BGvideo (String videoFile, PApplet app) {

        app.registerDraw(this);

        myMovie = new GSMovie(app, videoFile );
        tex = new GLTexture(app);
        myMovie.setPixelDest(tex);
        myMovie.loop();
      }
      public void draw () {
        myMovie.read();
        if (tex.putPixelsIntoTexture()) {
          background(255, 0, 0);
          image(tex, 0, 0, 600, 400);
        }
      }
    }
Comes up with the error:
 Cannot find anything named "app"
  1.    BGvideo bgv = new BGvideo("air_argb.mov", app);    
If I replace 'app' with 'this' it comes up with:
NoSuchFieldError: You may be using a library that's incompatible with this version of Processing.

I'm using Processing 2.08b.


Also tried using the mask() option at first, but have problems syncing up the two videos as stated here:
https://forum.processing.org/topic/videos-with-alpha-mask-sync-problem

Viewing all articles
Browse latest Browse all 1768

Trending Articles