Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QML Camera on Android. Can't set max resolution by viewfinder property
QtWS25 Last Chance

QML Camera on Android. Can't set max resolution by viewfinder property

Scheduled Pinned Locked Moved Solved Mobile and Embedded
6 Posts 2 Posters 2.6k 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.
  • V Offline
    V Offline
    Velmorl
    wrote on 19 Nov 2017, 08:39 last edited by
    #1

    I am testing my qt-opencv-android app on phone: Samsung Galaxy J7. Max resolution of phone video camera is 1920x1080(phone display res: 1280x720). But QML Camera allows to set resolution not more than 1280x720. Result of supportedViewfinderResolutions() is the list: ...//...640x480...//...1280x720 (the last! not 1920x1080). I can set all resolutions in the list by using property "viewfinder.resolution", but not 1920x1080). Any ideas, how to get videostream from QML Camera with 1920x1080?

    T V 2 Replies Last reply 20 Nov 2017, 08:48
    0
    • V Velmorl
      19 Nov 2017, 08:39

      I am testing my qt-opencv-android app on phone: Samsung Galaxy J7. Max resolution of phone video camera is 1920x1080(phone display res: 1280x720). But QML Camera allows to set resolution not more than 1280x720. Result of supportedViewfinderResolutions() is the list: ...//...640x480...//...1280x720 (the last! not 1920x1080). I can set all resolutions in the list by using property "viewfinder.resolution", but not 1920x1080). Any ideas, how to get videostream from QML Camera with 1920x1080?

      V Offline
      V Offline
      Velmorl
      wrote on 30 Nov 2017, 06:23 last edited by
      #6

      @Velmorl I suppose iit's from low level limitations. Video could be recorded in FHD, but of viewport it is possible to stream HD.

      1 Reply Last reply
      1
      • V Velmorl
        19 Nov 2017, 08:39

        I am testing my qt-opencv-android app on phone: Samsung Galaxy J7. Max resolution of phone video camera is 1920x1080(phone display res: 1280x720). But QML Camera allows to set resolution not more than 1280x720. Result of supportedViewfinderResolutions() is the list: ...//...640x480...//...1280x720 (the last! not 1920x1080). I can set all resolutions in the list by using property "viewfinder.resolution", but not 1920x1080). Any ideas, how to get videostream from QML Camera with 1920x1080?

        T Offline
        T Offline
        tekojo
        wrote on 20 Nov 2017, 08:48 last edited by
        #2

        Hi @Velmorl
        The viewfinder is limited to your screen, as that is your viewfinder. Just like a traditional digital camera, the sensor has a different capability than the screen.

        You want to take a look at http://doc.qt.io/qt-5/qml-qtmultimedia-cameracapture.html
        That has among other things a list of supported resolutions, and will let you set the resolution from that list.

        V 1 Reply Last reply 20 Nov 2017, 11:33
        3
        • T tekojo
          20 Nov 2017, 08:48

          Hi @Velmorl
          The viewfinder is limited to your screen, as that is your viewfinder. Just like a traditional digital camera, the sensor has a different capability than the screen.

          You want to take a look at http://doc.qt.io/qt-5/qml-qtmultimedia-cameracapture.html
          That has among other things a list of supported resolutions, and will let you set the resolution from that list.

          V Offline
          V Offline
          Velmorl
          wrote on 20 Nov 2017, 11:33 last edited by
          #3

          @tekojo Thank you for response. If viewfinder is limited to screen, than there's no way to increase video resolution uper screen resolution. In my case such an implementation is erroneous. Phone camera can shoot video in FHD, but QML Camera only in HD.
          Is it possible to change list of supported resolutions and add necessary resolution?
          Or change viewport/screen size?

          T 1 Reply Last reply 21 Nov 2017, 07:11
          0
          • V Velmorl
            20 Nov 2017, 11:33

            @tekojo Thank you for response. If viewfinder is limited to screen, than there's no way to increase video resolution uper screen resolution. In my case such an implementation is erroneous. Phone camera can shoot video in FHD, but QML Camera only in HD.
            Is it possible to change list of supported resolutions and add necessary resolution?
            Or change viewport/screen size?

            T Offline
            T Offline
            tekojo
            wrote on 21 Nov 2017, 07:11 last edited by
            #4

            @Velmorl
            What I mean is that you can set the video capture to FHD, and the file you get will be FHD, but your viewfinder (screen) can not show FHD, so it scales to whatever you set it to.
            (Just like my normal digital camera can capture 24MP images, but the viewfinder is limited to 1MP.)

            I don't think the viewfinder has scaling, but once you take a picture, you can zoom the preview image.

            V 1 Reply Last reply 21 Nov 2017, 14:26
            1
            • T tekojo
              21 Nov 2017, 07:11

              @Velmorl
              What I mean is that you can set the video capture to FHD, and the file you get will be FHD, but your viewfinder (screen) can not show FHD, so it scales to whatever you set it to.
              (Just like my normal digital camera can capture 24MP images, but the viewfinder is limited to 1MP.)

              I don't think the viewfinder has scaling, but once you take a picture, you can zoom the preview image.

              V Offline
              V Offline
              Velmorl
              wrote on 21 Nov 2017, 14:26 last edited by Velmorl
              #5

              @tekojo Maybe you right. But in QVideoFilterRunnable::run(QVideoFrame* , const QVideoSurfaceFormat& , QVideoFilterRunnable::RunFlags ) I can't get FHD, only HD. And I do not know what to do.

              1 Reply Last reply
              0
              • V Velmorl
                19 Nov 2017, 08:39

                I am testing my qt-opencv-android app on phone: Samsung Galaxy J7. Max resolution of phone video camera is 1920x1080(phone display res: 1280x720). But QML Camera allows to set resolution not more than 1280x720. Result of supportedViewfinderResolutions() is the list: ...//...640x480...//...1280x720 (the last! not 1920x1080). I can set all resolutions in the list by using property "viewfinder.resolution", but not 1920x1080). Any ideas, how to get videostream from QML Camera with 1920x1080?

                V Offline
                V Offline
                Velmorl
                wrote on 30 Nov 2017, 06:23 last edited by
                #6

                @Velmorl I suppose iit's from low level limitations. Video could be recorded in FHD, but of viewport it is possible to stream HD.

                1 Reply Last reply
                1

                • Login

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