Repository navigation
fix: list the frame rates DirectShow devices support besides the default one - #189
Merged
Merged
Conversation
…ult one Signed-off-by: Roman Ondráček <[email protected]>
kekyo
self-requested a review
November 9, 2026 03:01
Owner
|
LGTM, I will merge it, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On DirectShow, FlashCap lists each format of a device with its default frame rate only. A webcam which records a format at more frame rates, such as 1280x720 MJPEG at 60 and 30 fps, is listed with 30 fps only, so the higher frame rates cannot be selected. V4L2 lists all of them for the same webcam.
Related: #52
@insam125, this looks like the missing 60 fps of your StreamCam. Could you try this branch?
Cause
IAMStreamConfig::GetStreamCapsreturns one entry per format, with the default frame interval inAvgTimePerFrameand a range inMinFrameInterval/MaxFrameInterval. FlashCap usedAvgTimePerFrameonly. The range is not usable by itself, UVC devices support only some intervals in it.Changes
IAMVideoControl::GetFrameRateListof the capture filter, as OBS does. Each format is listed with its default frame rate and the other supported ones.DirectShowDevicesets the frame interval of the selected characteristics inAvgTimePerFrameof the format passed toIAMStreamConfig::SetFormat.IAMVideoControl, or without the list, is listed with the default frame rate as before.IAMVideoControlis declared inNativeMethods_DirectShow.Testing
AvgTimePerFrame166666 (60 fps), at 30 fps 333333.v4l2-ctl --set-parm=60reports 60 fps, the stream has 29.7 fps), so I could not measure 60 fps frames with it. A device which does deliver them would help, see the request above.