Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cannot use two webcams simultaneously using QtMultimedia under Mac OS

Cannot use two webcams simultaneously using QtMultimedia under Mac OS

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dalamber
    wrote on last edited by
    #1

    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: https://qt.gitorious.org/qt/qtmultimedia/source/0e280e78e2fe0f0417ca284f6b0d7a536a970bfd:src/plugins/avfoundation/camera/avfcamerasession.mm#L295

    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?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dalamber
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        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":http://bugreports.qt-project.org to see if it's something that's already been asked

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved