I have written an app that processes a video (720*576 px, 30 fps, RGB format) using OpenCV under Java. I only calculate 5 int variables as a result of my processing on each frame. I would like to store those 5 int variables with the current frame in a dataset, and I therefore need to do that several times per second (30 times/sec would be ideal, but I could do with less by grouping the data, I guess...).

What would be the right database choice for such a thing? I was thinking HDF5, would that be a suitable solution?

2 Answers 2


Just about anything would work.

The issue of "30 times a second" should be within the capability of any database or dataset file format. If there are problems keeping up, they can be handled:

  • by either batching the inserts (for a database or access library),

  • by writing to a buffered stream, or

  • by using an in-memory queue and separate Java threads for frame processing and saving the extracted data. (Assuming that you are processing frames in real-time.)

I would chose a database / library / format based on the other things that you want it to do. The performance should not be a concern for what you are proposing to do.


You could easily, (on most modern systems), write 5 integer values 4 commas and linefeed to a file on hard disk at 30 writes per second and with a much lower overhead than a DB. Try keeping it simple and write to a csv file - most databases can import from a csv file without problems if you need it in a database later.

  • yes, however I wanted to add the current processed frame too, which means I would put 720*576*3 = 1244160 float variables + 5 int variables at 30 writes/sec... Does your answer still hold in that case, or do you think I then need an alternate solution?
    – Raoul
    Dec 7, 2014 at 21:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.