Live sampling video grabber

i wanna create a video looper, it should be able to record videos from a video grabber and loop it.
does anyone know of any example projects or addons that could help me getting started with it?

I don’t know if this can fit your needs, but here’s a class I made for a previous project. It simply records the images in RAM, and can play them again. It automatically reduce the size of the images passed to it to fit a maximal bitrate. You can also choose the maximum FPS.

FramesBuffer.h (4,4 Ko)
FramesBuffer.cpp (7,7 Ko)

Another way can be to use an add-on for recording the video in a file (ofxVideoRecorder maybe), and playback this video with ofVideoPlayer). This will allows to have a bigger video than my class.


thanks a lot, this sounds quite promising. do you have by any chance a working example online?

i just found ofxPlayModes, but i guess i is quite some work to port it to the most recent version of openFrameworks.

thanks, it works.
How are your files licensed? are you planning to turn it into an addon?

No. Do you mean some code that use this class ? It was part of a quite big project that I can’t easily share. But is seems that in the meantime you’ve managed to make it works by yourself.

I don’t know much about licenses. You can use it for what you want, just do not put a license on it which will prevent me or other people to use it later !

No plan for this.

Just a warning if you use it, my solution to check if there is enough free memory seems clumsy. I don’t know if there can be drawbacks. I use it because I haven’t found a better solution, and this one works fine for me.