Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Camera/Video Without OpenGL (Quick Renderer)

Camera/Video Without OpenGL (Quick Renderer)

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
11 Posts 2 Posters 1.9k Views
  • 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.
  • K Offline
    K Offline
    kengineer
    wrote on last edited by
    #1

    I have a non OpenGL embedded Linux system with a QT 5.9 build. I am developing a QML and C++ based application. In this case I am utilizing the Qt Quick 2D renderer in lieu of OpenGL - because of this, I cannot utilize the "VideoOutput" item in QML since this is reliant on OpenGL.

    I am looking for some ideas for an alternative way to display a camera view in my application. What is my best option in this case? I can do tricks with launching another app or something but would prefer something more built in if it's possible.

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

      Hi,

      What are the specs of the camera ?
      How fast is it supposed to be ?

      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
      • K Offline
        K Offline
        kengineer
        wrote on last edited by
        #3

        720x480 SD, 30 fps - this is a pretty low quality camera, nothing super fancy. I can already utilize the camera in my system sans QT (using gstreamer or other tools) but want to integrate a live camera view into my UI application in certain cases.

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

          You can maybe use QtGStreamer for example.

          Is that a USB camera ?

          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
          • K Offline
            K Offline
            kengineer
            wrote on last edited by
            #5

            No it's an embedded interface. That shouldn't matter though as it just appears as a standard V4L2 device (/dev/video)

            "Finally, when drawing on QtQuick2 (Qt5), the only way is to use qtquick2videosink."

            "If you are using QtQuick (either QtQuick1 with Qt4 or Qt5, or QtQuick2 with Qt5), there is also a "VideoItem" element available when you import "QtGStreamer 1.0". See the qmlplayer and qmlplayer2 examples for details."

            So does that mean I can still utilize the VideoItem element as long as I setup gstreamer to feed qtquick2videosink?

            K 1 Reply Last reply
            0
            • K kengineer

              No it's an embedded interface. That shouldn't matter though as it just appears as a standard V4L2 device (/dev/video)

              "Finally, when drawing on QtQuick2 (Qt5), the only way is to use qtquick2videosink."

              "If you are using QtQuick (either QtQuick1 with Qt4 or Qt5, or QtQuick2 with Qt5), there is also a "VideoItem" element available when you import "QtGStreamer 1.0". See the qmlplayer and qmlplayer2 examples for details."

              So does that mean I can still utilize the VideoItem element as long as I setup gstreamer to feed qtquick2videosink?

              K Offline
              K Offline
              kengineer
              wrote on last edited by
              #6

              Also since it says:
              "qtglvideosink and qtquick2videosink use OpenGL/OpenGLES and support hardware colorspace conversion and color balance."

              Wouldn't I have the same problem? OpenGL doesn't work well on my system.

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

                What system do you have ?

                What format is the image you receive ?

                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
                • K Offline
                  K Offline
                  kengineer
                  wrote on last edited by
                  #8

                  @SGaist said in Camera/Video Without OpenGL (Quick Renderer):

                  do you have ?
                  What format is the image

                  It's a Cortex A5 based system with no GPU. The camera format is ITU601 - but ultimately, I just need to be able to display any old /dev/video device in my QML application window. Like I mentioned, I have already verified the interface as I can use gstreamer to output it to my display. I am just wondering if there are any alternatives to VideoOutput as this is directly reliant on OpenGL which I can't practically use on this system.

                  That link seems to be saying that QtGstreamer still uses OpenGL correct? If it can only use OpenGL, then I would still have the same problem.

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

                    They also have widget sink.

                    In any case, this stack overflow answer might be an interesting starting point to push images to QtQuick from C++.

                    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
                    • K Offline
                      K Offline
                      kengineer
                      wrote on last edited by
                      #10

                      @SGaist said in Camera/Video Without OpenGL (Quick Renderer):

                      dget si

                      Well the widget sink would require the use of QWidgets correct? Not Quick/QML... I was wondering if there was any other way to implement video in QML but doesn't sound like there is.

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

                        Sorry, I don't have deep enough knowledge of the Qt Quick Renderer to give you hints about how to implement a video item for it.

                        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