Background Rendering

I want to backgroundrender an OpenGL Window with user-defineable resolution. I also want to capture an animation to video(avi).
I know that i have to work with glReadPixels. I tried it and it worked fine (i used the libtiff.lib).
But i want to render in background (e.g. a 360 view of an object) and save it to video file.
Are there some tutorials where i can take a look at?
Or someone knows what i am talking about (i know its hard and can help me.