PDA

View Full Version : AVI speed doubled?



jomtois
June 16, 2010, 19:37:10
I am using the IC Imaging Control 3.1 to connect to the following camera:

PC VGA Camer@ Plus

When I inspect the videoformats, I see the following array:

{I420 (160x120)}
{I420 (176x144)}
{I420 (320x240)}
{I420 (352x288)}
{I420 (640x480)}
{RGB24 (160x120)}
{RGB24 (176x144)}
{RGB24 (320x240)}
{RGB24 (352x288)}
{RGB24 (640x480)}
{RGB24 (800x600)}

My issue comes from capturing an AVI. I have tried this using compression codecs and no compression codecs with the same result. If the VideoFormat the IC Imaging Control is set to is one of the "I420" formats, the AVI comes out normally as you would expect. When I change the selected VideoFormat to RGB24 (800x600) and record an AVI (compressed or not) the AVI will be saved at over twice the speed. So a 10 second clip will be a 3 second clip, and when played back will be sped up. Changing to the RGB24 640x480 will still be sped up, but a 10 second clip will become a 6 second clip, so not quite as fast. From RGB24 352x288 down it appears to be approximately correct, or correct, I can't time it precisely enough to know for certain.

What would be causing this?

After I instantiate the control this is all I do (I have also used the AVIStartCapture() methods with same result):



icImagingControl.Device = icImagingControl.Devices[0];
icImagingControl.VideoFormat = icImagingControl.VideoFormats[10];

MediaStreamSink aviSink = new MediaStreamSink();
aviSink.Filename = FileSaveLocation;
icImagingControl.Sink = aviSink;
icImagingControl.LiveStart();
.....
icImagingControl.LiveStop();


Any ideas? I would like to use the 800x600 mode if possible...

Jon

Stefan Geissler
June 17, 2010, 13:04:21
Jon,

I have no idea, what causes this. However, IC Imaging Control sets the camera's frame rate as playback frame rate in the AVI file. Thus, maybe the frame rate at the RGB formats is set wrong by the camera driver?

Also, in case you use the DV Encoder, the DV Encoder sets the frame rate to 25 or 29 fps automatically.

jomtois
June 17, 2010, 15:02:54
Stefan,

Thanks for the info. It is probably the camera driver. This is just a cheap webcam to test out on my development machine, not the real (much better) cameras we will actually be using. I wanted to make sure I was not missing a step somewhere. You have confirmed that the control sets the avi playback speed to the camera framerate, which is what I had suspected.

I will stay away from the RGB24 formats on this camera since their actual framerates do not seem to align with what are reported to the control.

Thank you for your time,
Jon