Quantcast
Channel: bugs, errors - openFrameworks
Viewing all articles
Browse latest Browse all 636

Video to sequence

$
0
0

@xavivives wrote:

I'm trying to convert a video to a vector of images.

I've been trying something among these line

ofVideoPlayer player;
vector <ofImage> sequence;

player.setPixelFormat(OF_PIXELS_RGB);
player.load("movies/fingers.mov");
player.setLoopState(OF_LOOP_NORMAL);
player.play();

for(int i= 0;i < player.getTotalNumFrames();i++ )
{
    player.nextFrame();
    ofImage image;
    image.allocate(player.getWidth(), player.getHeight(), OF_IMAGE_COLOR);
    image.setFromPixels(player.getPixels());
    sequence.push_back(image);
}

But I've been getting these errors

[ error ] ofxiOSVideoPlayer: getPixels(): Returning pixels that may be unallocated. Make sure to initialize the video player before calling getPixels.
[ error ] ofPixels: image type not supported
[ error ] ofPixels: image type not supported
[ error ] ofPixels: image type not supported

I'm on a master using Mac (why is ofxiOSVideoPlayer in the error?)
Is this a good aproach?

Thanks in advance! wink

Posts: 8

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 636

Trending Articles