Ask Your Question

Revision history [back]

Videowriter and capturing - memory leak ?

Hi all, this is my first posting here. I am using OSX 10.10 and OpenCV 2.4.9. I am currently trying to capture long movies from a webcam at 25 frames/second.. The frame rates I get are okay at the beginning - then the frame rate starts dropping and the memory which is used goes up. I have replicated this on four machines and the offending program line is the videowriter.write(frame) part. Apparently there is a memory leak which I can observer in the memory usage. When I stop and restart the writer it starts again with the higher frame rate and drops again. This is why it is not possible to record longer movies in real time (it does not matter so much if you simply write out processed images from movies). Can anybody help me, before I rewrite this using Apple Quicktime (which is hell) ?

Greetings Karl