Fastest possible video recording

Hi, first of all, congratulations and thank you for this incredible project. I find it really easy to work with and incredibly powerful.

I have an OpenMV H7 plus, and I’m wondering how to get the best performance for recording high quality video (though I do realize this isn’t exactly what this project was designed for). Is there any way to get something close to HD resolution at close to 30 fps? Using the example script for saving MJPGs, it seems like writing the data causes a big slowdown on the framerate (which I guess is unsurprising if its all single threaded).

Is there any way to do this asynchronously, or is the best bet streaming to a computer over usb and writing to disk there, or is there another approach that would be better?

At HD the OV5640 outputs like 15FPS max so short answer is no. If you can use a smaller res there are a few things to try, there’s ImageIO which lets you write frames to memory, if the recording is short enough, or you could try the script here:

And finally we’re working on double buffering which should improve the FPS dramatically, but not ETA on this yet will take a while to fix all the related issues.

When I Run

sensor.set_pixformat(sensor.JPEG) 
sensor.set_framesize(sensor.HD) 
for i in range(200):
    clock.tick()
    img = sensor.snapshot()
    #m.add_frame(img)
    print(clock.fps())

The serial terminal is printing ~28 FPS, but the IDE is showing ~15fps. Is it reasonable to expect that double buffering, when implemented, would bring IDE up to 28 FPS? And is there any chance of saving MJPG to SD card at 28 FPS when double buffering is implemented?

The IDE FPS is not important, it’s just shows how fast the IDE can read frames from the cam over USB which is limited by the USB FS bandwidth…

Yes hopefully, we’re working on it right now.