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. Qt Multimedia QAbstractVideoFilter Missing in Qt 6.9
Forum Update on Monday, May 27th 2025

Qt Multimedia QAbstractVideoFilter Missing in Qt 6.9

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
8 Posts 3 Posters 164 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.
  • T Offline
    T Offline
    track
    wrote last edited by
    #1

    Hi everyone,

    I’m working on a Qt Multimedia-based barcode scanning project using SCodes ZXing Barcode Wrapper with Qt 6.9 (MinGW). The project relied on QAbstractVideoFilter for video frame processing, but with Qt 6.9 I encountered this error: fatal error: QAbstractVideoFilter: No such file or directory

    Project Details:
    Qt Version: Qt 6.9

    Compiler: MinGW 64-bit

    Build System: CMake

    Modules Used: Qt Multimedia, Qt Quick, SCodes, ZXing
    Troubleshooting So Far:

    1. Verified Qt Multimedia is installed via Qt Maintenance Tool.
      2 Explicitly linked Qt Multimedia in CMake: "
      find_package(Qt6 REQUIRED COMPONENTS Multimedia)
      target_link_libraries(my_project PRIVATE Qt6::Multimedia)
      "
      Any recommended fixes for barcode scanning with Qt Multimedia in Qt 6.9?

    If anyone has solved this, your insights would be incredibly helpful!

    Thanks in advance!

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

      Hi,

      You have to port your application. The Qt Multimedia module has seen a massive rewrite for Qt 6 and that class was removed.

      See here for more details about what has changed.

      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
      2
      • T Offline
        T Offline
        track
        wrote last edited by
        #3

        I ported the application, but the barcode can't be scanned using SCodes ZXing Barcode Wrapper to Qt 6, but I am encountering difficulties when trying to decode the barcode after processing video frames.

        The project originally used QAbstractVideoFilter (which was removed in Qt 6) to process video frames. I successfully ported the code by replacing QAbstractVideoFilter with other video frame processing mechanisms, but I am now unable to read the barcode from the frames.

        " Problem:

        After porting the code, the barcode isn’t detected even though the video frame is processed correctly.

        The SBarcodeDecoder works in the sense that it doesn't throw exceptions anymore, but it also doesn't detect any barcodes.

        jsulmJ 1 Reply Last reply
        0
        • T track

          I ported the application, but the barcode can't be scanned using SCodes ZXing Barcode Wrapper to Qt 6, but I am encountering difficulties when trying to decode the barcode after processing video frames.

          The project originally used QAbstractVideoFilter (which was removed in Qt 6) to process video frames. I successfully ported the code by replacing QAbstractVideoFilter with other video frame processing mechanisms, but I am now unable to read the barcode from the frames.

          " Problem:

          After porting the code, the barcode isn’t detected even though the video frame is processed correctly.

          The SBarcodeDecoder works in the sense that it doesn't throw exceptions anymore, but it also doesn't detect any barcodes.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote last edited by
          #4

          @track said in Qt Multimedia QAbstractVideoFilter Missing in Qt 6.9:

          The SBarcodeDecoder works in the sense that it doesn't throw exceptions anymore, but it also doesn't detect any barcodes.

          Did you check the content of the frames you're passing to SBarcodeDecoder? Store them as images and see what's inside.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • T Offline
            T Offline
            track
            wrote last edited by
            #5

            I checked the images(attached) but they are not detected as barcaodes .Here is the qml file "import QtQuick 2.15
            import QtQuick.Controls 2.15
            import QtQuick.Layouts 1.15
            import QtMultimedia 6
            import CustomFilters 1.0

            ApplicationWindow {
            visible: true
            width: 640
            height: 480
            title: "SCodess QR Scanner"

            Camera {
                id: camera
                active: true
                focusMode: Camera.FocusModeAutoNear
                customFocusPoint: Qt.point(0.5, 0.5)  // Focus center
            }
            
            CaptureSession {
                id: session
                camera: camera
                videoOutput: videoOutput
            }
            
            VideoOutput {
                id: videoOutput
                anchors.fill: parent
                fillMode: VideoOutput.PreserveAspectCrop
            }
            
            SBarcodeFilter {
                id: barcodeFilter
                videoSink: videoOutput.videoSink
                captureRect: Qt.rect(0.25, 0.25, 0.5, 0.5)  // Middle 50% of the frame
            
                onBarcodeDetected: console.log("Detected:", barcodeValue)
            }
            
            Rectangle {
                id: scanOverlay
                anchors.centerIn: parent
                width: parent.width * 0.5
                height: parent.height * 0.5
                color: "transparent"
                border.color: "lime"
                border.width: 2
                radius: 4
                z: 10
            
                Rectangle {
                    id: scanLine
                    width: parent.width
                    height: 2
                    color: "lime"
                    radius: 1
                    y: 0
                    anchors.horizontalCenter: parent.horizontalCenter
            
                    SequentialAnimation on y {
                        loops: Animation.Infinite
                        running: true
                        NumberAnimation {
                            from: 0
                            to: scanOverlay.height - scanLine.height
                            duration: 1500
                            easing.type: Easing.InOutQuad
                        }
                        PauseAnimation { duration: 300 }
                        NumberAnimation {
                            from: scanOverlay.height - scanLine.height
                            to: 0
                            duration: 1500
                            easing.type: Easing.InOutQuad
                        }
                        PauseAnimation { duration: 300 }
                    }
                }
            }
            
            Component.onCompleted: {
                console.log("[Debug] VideoSink assigned?", videoOutput.videoSink !== null)
            }
            

            }
            "
            frame_22_20250518_101243.png
            frame_51_20250518_101253.png

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

              Did you try the example that comes with that library ?

              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
              • T Offline
                T Offline
                track
                wrote last edited by
                #7

                The example from zxing works

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

                  Then you should compare your code to it and adjust 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