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. One camera with multiple video output

One camera with multiple video output

Scheduled Pinned Locked Moved Unsolved General and Desktop
camera
1 Posts 1 Posters 300 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.
  • A Offline
    A Offline
    AkshayFP
    wrote on 17 Feb 2022, 22:55 last edited by
    #1

    I am on Qt 6.2 and I have a very simple QML camera output that streams the camera output to VideoOut via CaptureSession

    import QtQuick
    import QtMultimedia
    import QtQuick.Controls
    
    Window {
        width: 640
        height: 480
        visible: true
        title: qsTr("Camera App")
    
        Item {
            width: parent.width
            height: parent.height
    
            CaptureSession {
                camera: Camera {
                    id: camera
                }
                videoOutput: videoOutput
            }
    
            VideoOutput {
                id: videoOutput
                anchors.fill: parent
                orientation: -90
            }
    
            Component.onCompleted: {
                camera.stop()
            }
    
            Button {
                text: camera.active ? "Stop" : "Start"
                onClicked: function() {
                    if (camera.active) {
                        camera.stop()
                    } else {
                        camera.start()
                    }
                }
            }
        }
    }
    

    I want to display another VideoOutput similar to how MediaPlayer can do.

    How would I display the same camera feed in two VideoOutput side-by-side?

    1 Reply Last reply
    0

    1/1

    17 Feb 2022, 22:55

    • Login

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