PDA

View Full Version : How to set double format framerate ?



Pixel
March 2, 2005, 22:06:35
Hi, Stefan
Grabber.h file provided a function "getAvailableFPS( const VideoFormatItem& op ) const;" that can return the floating type framerates available for the current videoformat. However, there is only one function, "setFrameRate(long)", to set the framerate. It only takes integer values. Can you tell me how can I set a framerate in floating format?
Btw, I'm using IC2.0 library

Thank you very much

Stefan Geissler
March 3, 2005, 10:21:18
Hello Pixel,

The setFrameRate function searches for the nearest match of the passed long frame rate to the internal double framerate. Thus, a passed 33 would match to 33.333333.

I suggest to use the function getAvailableFrameRates(), that returns a vector of longs, that contains the available frame rates.

Pixel
March 3, 2005, 15:50:46
So here is an question. I recorded video in 640x240 format. The framerate passed to 'setFrameRate(long)' is 30. But the aviinfo I got from the avi file shows that the actual framerate is 33.3. If change the video format to 640x480 without changing the input of setframerate function, the framerate of recorded video is about 30. But I need to ensure the video is recorded at 30 Hz whatever the video format is.
Do you have any suggestion?
Thank you very much

Pixel

Stefan Geissler
March 4, 2005, 09:00:29
Hello Pixel,

Sorry, but for this issue i have no sulotion. The frame rate is created by the video capture device, thus the influence on it is limited.