A brief introduction: I recently bought a Canon HV40 Legria to eventually switch off my webcam (in my experience, frame rate with webcam is too much flickle). I made a test application in order to understand which is the frame rate of the camcorder, in order to set the correct frames duration in the encoding procedure (using MemoryMovieMaker), and according to my test, frame rate is about 24 fps.
Now, I made some capturing and I got a bad surprise: if my capturing lasts some minutes, my encoded video file lasts some minutes less. And that’s because…the frame rate is NOT constant! What I mean is that the grabber grabs less and less frames, while the encoder always put the same frame duration, since I assumed that is constant.
By logging the capturing to a file, I discovered that the frame rate seriously goes down while I’m recording. First, a new frame is captured every 33 ms (update rate is 30 fps), apart from when a new frame is not found (1 frame on 6 is captured every 66 ms). Then the rate progressively slows down, up to 5 frames per second after a few minutes!! Or in other words, update() is called less and less frequently. Hey, this happens just when I’m encoding!
Why does it happen? What can slow down performance so drastically? Please, help. I’m lost :shock: