Important: Please read the Qt Code of Conduct -

Cannot use two webcams simultaneously using QtMultimedia under Mac OS

  • I am trying to grab video frames for further processing from two USB cameras under MAC OS X. I am using Qt 5.3 (the same applies to 5.2) and QtMultimedia library. From my application, I can connect to each of two cameras separately. But when I'm trying to use both at a time - an error is occurring for the second one: "Runtime camera error" - that's what I see in output.

    The error occurs in AVFoundation plugin:

    I have four OSes installed on a different hardware: MacOS 10.9, MacOS 10.8 and two MacOS 10.7
    Strange, but two cameras work fine with 10.8 and one of the 10.7 machines. Another 10.7 machine and 10.9 machine do not allow to connect to the second camera with "Runtime camera error" message.

    What can it be?

  • The solution was found.
    The second camera could not be connected due to limitation of USB bandwidth. The QCamera doesn't allow to choose resolution and always connects to the maximum available (HD as usually).

    We could reproduce the same behavior by writing the native AVFoundation based classes on our own. Then, we reduced the cameras resolution to a smaller one (e.g. 320x240) and two-three cameras worked great.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Missing resolution selection might be (in lack of better terms) a missing feature for the OS X backend. You can check the "bug report system": to see if it's something that's already been asked

Log in to reply