@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 supportedI'm on a master using Mac (why is
ofxiOSVideoPlayerin the error?)
Is this a good aproach?Thanks in advance!
Posts: 8
Participants: 4
