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

  • 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?

  • administrators

    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.

  • @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?

  • administrators

    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.

  • @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.

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

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.