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

Black pixels when looping through video loaded by Direct Show Player

$
0
0

@Christof wrote:

Hi, in the past (OF 0.8.x) I used code like this to load video frames into a vector<ofPixels>:

video.loadMovie("myMovie.mov");
video.setFrame(0);

int numFrames = video.getTotalNumFrames();
myBuffer.resize(numFrames);

for (int i = 0; i < numFrames; ++i){
    myBuffer[i] = video.getPixelsRef();
    video.nextFrame();
}

For some reason this doesn't work anymore with Direct Show Player (Win 7, OF 0.9.3). The dimensions of the pixels are right, but they are all black!
On Quicktime, calling setFrame() would load the frame, but Direct Show won't do that! Calling update() after setFrame() won't work as well...

Of course I could use another video player, but the functionality is part of an addon I'm working on and I'd rather like to use the standard ofVideoPlayer to keep it as generic as possible...

Any ideas?

Christof

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 636

Trending Articles