Issue with grabscreen

Hello,

I’m using the grabscreen function to get the pixels of each frame from some shader output to save into a video with ofxqtvideosaver, but the images being recorded are showing up kind of funky. I get a small band about ~75px or so of my image running across the bottom of each frame. The band appears to have been cut from the top of the frame, vertically flipped, and then slapped on the bottom.

I’m recording 1920x1080, which is larger than the resolution of my laptop. I’ve noticed if I use my work computer (which has a larger than 1080p display), and launch my app at fullscreen so none of the image is offscreen, the band does not show up. I can also save larger than display resolution video just fine if I am not using grabscreen, which is why I think the problem may be originating there. Actually if I save at 1000px height or smaller, it doesn’t happen, so it is definitely being caused by being off the bottom of the screen. The part that is offscreen on the width dimension renders fine though.

The code is really straightforward, I allocate the ofImage screen in setup and then at the end of update()

  
  
screen.grabScreen(0, 0, 1920, 1080);     
saver.addFrame(screen.getPixels());  
  

Does anyone know what would cause something like this to happen? If not, what is the best/or an alternative way to save the output of a shader into video? Converting it to pixels seems like an unnecessary computation. Can be saved straight from the texture?

I uploaded an image of the problem here, you can see the bottom strip that is not supposed to be there. I’m not sure what other details to include to help debug this…For what it’s worth vertical sync doesn’t seem to make a difference whether it’s on or off.
http://25.media.tumblr.com/7e3d6ed2d75101f73838bf6cc5cbd2b9/tumblr-mtjdwyPITk1qzhwpro1-1280.png
And another
http://24.media.tumblr.com/44d1b7f4f4ce157805e0c79730745c8e/tumblr-mtjf44Saf71qzhwpro1-1280.png

Thanks for your help!

Update!

It seems all of the image needs to be visibly on screen when saving video, or else it just creates / mirrors the video for whatever is offscreen. There don’t seem to be any issues with horizontal offscreen pixels, but vertical ones appear as a pasted mirror of whatever is being displayed on screen.

To solve this I ended up using a little shareware app called SwitchResX and making a custom scaled screen that is a little larger than the video I’m trying to render. Here’s a link to the app.
http://www.madrau.com/

This works fine up to resolutions of around 4000pixels, but the app doesn’t seem to allow anything larger than that.

For my current project however, I need to render video at 7680x4320 so this little trick doesn’t work at all. Does anyone have experience working with video this large on a laptop?

The only thing I can think of is to render a video at 3840x2160 and then scale it up in ffmpeg or some other post/editing software. Not exactly ideal, but the screen is so big the scaling might not matter, however the rendering will take forever! How in the world do people edit video this size?

Thanks for your help!

If you are doing such a big image, I’d either look at creating an offscreen FBO to draw into and grab from (which you can draw on screen smaller to observe) or looking at an addon like:

which can do really high resolution output.