Glitch when exporting from fbo to ofxvideorecorder

hey arturo and everybody

i’m trying to export a video file from an fbo. the fbo is created from some opencv manipulations. i can see the image nicely on my screen either directly or painting the fbo. yet, when i send it to ofxvideorecorded, i get this beautiful but annoying glitch.

here is the relevant code. am i missing something?

thanks in advance
(using of0.8, linux mint nadia)

ofIm.setFromPixels(imgReturn.data,imgReturn.cols,imgReturn.rows, OF_IMAGE_COLOR);
ofPixels pixels;
fbo.begin();
ofIm.draw(0,0);
fbo.readToPixels(pixels);
fbo.end();
vidRecorder.addFrame(pixels);

Hey Bruno

i’m trying readToPixels in an fbo and it works for me without problem. i think we fixed some bug in this function recently, can you try using 0.8.1?

Also to be sure that it’s the fbo and not the videoRecorder what is not working, you can try uploading the pixels to a texture and drawing it to see if the pixels have the correct contents

Hi Arturo!

I figured after a few weeks, that somewhere else in the code I was allocating the image ofIm with a different size. I thought it would make no difference since I’m grabing the pixels through the fbo, but somehow that fixed the glitch.

Thanks as always!