Skip to content

Windows MSMF not opening connected device #11696

Closed
@feliwir

Description

@feliwir
System information (version)
  • OpenCV => 3.4.1
  • Operating System / Platform => Windows 64 Bit
  • Compiler => Visual Studio 2017
Detailed description

Hello, i am trying to open my USB camera with MSMF (the camera is detected correctlyy by windows). The issue i am having is that vd_CaptureFormats is empty here: https://github.com/opencv/opencv/blob/3.4.1/modules/videoio/src/cap_msmf.cpp#L2311
However vd_CurrentFormats lists all supported formats.

Note that two USB cameras are connected at the same time.

Steps to reproduce
int main()
{
  int devices = 0;
  cv::VideoCapture cap;
  for (int i = 0; i < 5; ++i)
  {
    if (cap.open(CV_CAP_MSMF + i))
    {
      ++devices;
    }
  }
  cap.release();
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions