How to record video (proceduraly)?

How to record video, by adding to it an ofFbo, per every frame?
Love to find an implementation that will work on every platform ? (iOS, Android, OS X, … )