none
Can Microsoft LifeCam record at a frame rates lower than 30 fps?

    Question

  • I'm using GraphEdit to evaluate the different filter combinations to capture video/audio.    In GraphEdit, if I right click on the capture pin for the video filter then this opens a dialog in which the available frame rate selections are 7.5, 10, 15, 20 or 30 fps.   If I select any frame rate other than 30, click OK to close the dialog and immediately return to this dialog then the frame rate is always reset to 30 fps.   Does this mean the LifeCam can only record at 30 fps?

    Thanks,

    Ian

    Wednesday, August 25, 2010 2:34 AM

Answers

  • A quick method I can think of: make your application connect camera's output pin with Null Renderer Filter through Sample Grabber. Make sure that AvgTimePerFrame field is non-zero, or if it for some reason resets to zero use ConnectDirect method to connect camera's pin to Sample Grabber input pin with your own media type, which you compose yourself and initialize with a non-zero AvgTimePerFrame. Run the graph and see how many samples are going through the grabber filter, whether it is less than 30 fps or not, whether it follows requested rate or not.

    If you can connect camera's pin with desired AvgTimePerFrame value right in GraphEdit or GraphStudio and it does not reset to zero or 30 fps, you can do it without even programming at all. Save the graph (camera -> sample grabber -> null renderer) to .GRF file and run it with DumpMediaSamples utility, which is going to find sample grabber, will provide its own callback and print out sample data exactly how I described in the paragraph above.


    http://alax.info/blog/tag/directshow
    Wednesday, August 25, 2010 1:20 PM

All replies

  • Capture frame rate is requested in AvgTimePerFrame member of VIDEOINFOHEADER structure, which is provided as a part ot AM_MEDIA_TYPE via IAMStreamConfig::SetFormat and/or during pin media type negotiation. Source camera filter - depending on implementation details - may respect this value and capture at requested frame rate, or ignore the value and capture at, typically, maximal rate.

    http://alax.info/blog/tag/directshow
    Wednesday, August 25, 2010 10:18 AM
  • Would you be able to tell me how can I confirm whether or not the source camera filter is simply ignoring the capture rate?    My intention is to use a webcam to capture video/audio in my application.   If the video frame rate cannot be changed for the LifeCam then I need to look for another webcam.  

    Thanks,

    Ian

    Wednesday, August 25, 2010 1:13 PM
  • A quick method I can think of: make your application connect camera's output pin with Null Renderer Filter through Sample Grabber. Make sure that AvgTimePerFrame field is non-zero, or if it for some reason resets to zero use ConnectDirect method to connect camera's pin to Sample Grabber input pin with your own media type, which you compose yourself and initialize with a non-zero AvgTimePerFrame. Run the graph and see how many samples are going through the grabber filter, whether it is less than 30 fps or not, whether it follows requested rate or not.

    If you can connect camera's pin with desired AvgTimePerFrame value right in GraphEdit or GraphStudio and it does not reset to zero or 30 fps, you can do it without even programming at all. Save the graph (camera -> sample grabber -> null renderer) to .GRF file and run it with DumpMediaSamples utility, which is going to find sample grabber, will provide its own callback and print out sample data exactly how I described in the paragraph above.


    http://alax.info/blog/tag/directshow
    Wednesday, August 25, 2010 1:20 PM