2.2.1 x86 | processing.video.* | issues with plugins and gstreamer | a lot of WARNINGS

edited September 2014 in Library Questions

Hi,

I'm trying to make a simple video example work (below is the code):

I tried with x86 and with x64 versions of processing 2.2.1, the sktech didn't render and I obtain several errors, according to what version I was using.

as a starter, x86 errors:

** (java.exe:6368): WARNING **: Failed to load plugin 'C:/soft/processing-2.2.1-win32/modes/java/libraries/video/library/\windows32\plugins\libgstadpcmdec.dll': `C:/soft/processing-2.2.1-win32/modes/java/libraries/video/library/\windows32\plugins\libgstadpcmdec.dll': The specified module could not be found.

** (java.exe:6368): WARNING **: Failed to load plugin 'C:/soft/processing-2.2.1-win32/modes/java/libraries/video/library/\windows32\plugins\libgstadpcmenc.dll': `C:/soft/processing-2.2.1-win32/modes/java/libraries/video/library/\windows32\plugins\libgstadpcmenc.dll': The specified module could not be found.

... and so on

** (java.exe:6368): WARNING **: Failed to load plugin 'C:/soft/processing-2.2.1-win32/modes/java/libraries/video/library/\windows32\plugins\libgsty4mdec.dll': `C:/soft/processing-2.2.1-win32/modes/java/libraries/video/library/\windows32\plugins\libgsty4mdec.dll': The specified module could not be found. Cannot load GStreamer plugins from C:/soft/processing-2.2.1-win32/modes/java/libraries/video/library/\windows32\plugins

The libraries involved in the error messages are:

libgstadpcmdec.dll libgstadpcmenc.dll libgstannodex.dll libgstaudioparsers.dll libgstcog.dll libgstcoloreffects.dll libgstcolorspace.dll libgstdataurisrc.dll libgstdebugutilsbad.dll libgstdirectdrawsink.dll

.. and 15 more...

The dll files do exist actually in the folder.

Any clues?

Thanks!

Alejandro Gomez

code:

/** * Frames * by Andres Colubri. * * Moves through the video one frame at the time by using the * arrow keys. It estimates the frame counts using the framerate * of the movie file, so it might not be exact in some cases. */

import processing.video.*;

Movie mov; int newFrame = 0; int movFrameRate = 30;

void setup() { size(640, 360); background(0); // Load and set the video to play. Setting the video // in play mode is needed so at least one frame is read // and we can get duration, size and other information from // the video stream. mov = new Movie(this, "transit.mov");

// Pausing the video at the first frame. mov.play(); mov.jump(0); mov.pause(); }

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

void draw() { background(0); image(mov, 0, 0, width, height); fill(255); text(getFrame() + " / " + (getLength() - 1), 10, 30); }

void keyPressed() { if (key == CODED) { if (keyCode == LEFT) { if (0 < newFrame) newFrame--; } else if (keyCode == RIGHT) { if (newFrame < getLength() - 1) newFrame++; } } setFrame(newFrame);
}

int getFrame() {
return ceil(mov.time() * 30) - 1; }

void setFrame(int n) { mov.play();

// The duration of a single frame: float frameDuration = 1.0 / movFrameRate;

// We move to the middle of the frame by adding 0.5: float where = (n + 0.5) * frameDuration;

// Taking into account border effects: float diff = mov.duration() - where; if (diff < 0) { where += diff - 0.25 * frameDuration; }

mov.jump(where); mov.pause();
}

int getLength() { return int(mov.duration() * movFrameRate); }

Answers

  • /** * Frames * by Andres Colubri. * * Moves through the video one frame at the time by using the * arrow keys. It estimates the frame counts using the framerate * of the movie file, so it might not be exact in some cases. */
    
    import processing.video.*;
    
    Movie mov; int newFrame = 0; int movFrameRate = 30;
    
    void setup() { size(640, 360); background(0); // Load and set the video to play. Setting the video // in play mode is needed so at least one frame is read // and we can get duration, size and other information from // the video stream. mov = new Movie(this, "transit.mov");
    
    // Pausing the video at the first frame. mov.play(); mov.jump(0); mov.pause(); }
    
    void movieEvent(Movie m) { m.read(); }
    
    void draw() { background(0); image(mov, 0, 0, width, height); fill(255); text(getFrame() + " / " + (getLength() - 1), 10, 30); }
    
    void keyPressed() { if (key == CODED) { if (keyCode == LEFT) { if (0 < newFrame) newFrame--; } else if (keyCode == RIGHT) { if (newFrame < getLength() - 1) newFrame++; } } setFrame(newFrame);
    }
    
    int getFrame() {
    return ceil(mov.time() * 30) - 1; }
    
    void setFrame(int n) { mov.play();
    
    // The duration of a single frame: float frameDuration = 1.0 / movFrameRate;
    
    // We move to the middle of the frame by adding 0.5: float where = (n + 0.5) * frameDuration;
    
    // Taking into account border effects: float diff = mov.duration() - where; if (diff < 0) { where += diff - 0.25 * frameDuration; }
    
    mov.jump(where); mov.pause();
    }
    
    int getLength() { return int(mov.duration() * movFrameRate); }
    

    Hey I structured I so others can help. I don't know much about videos but I know that you need to add it as a file. Did you go to

    Sketch then add file, and add it? That might be why it's saying can't find plug in.

    Hope it helps :)

Sign In or Register to comment.