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. QTMultimedia FFMPEG backend preview
QtWS25 Last Chance

QTMultimedia FFMPEG backend preview

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
13 Posts 3 Posters 2.8k 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.
  • S Offline
    S Offline
    sethsource
    wrote on 23 Dec 2022, 21:16 last edited by sethsource 1 Nov 2023, 05:47
    #1

    on the docs, there is "You can test the FFmpeg backend right now by using a Qt build that has FFmpeg enabled and setting the QT_MEDIA_BACKEND environment variable to ffmpeg:"

    After setting this environment variable using my clean install of 6.4 it still doesn't work. it says ffmpeg isnt supported.

    How do i test this preview out? i've been waiting for the ability to use an RTSP stream on windows compiled programs for the longest time using QT.

    This ofcourse works flawlessly on Linux. Just install 6.4, open my project, build, and boom. But on windows I cant get it to work. I need some help figuring out the steps to test out this preview.

    I've researched online and found posts with people compiling their own QTMultimedia with ffmpeg, but failed to produce any steps or details.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sethsource
      wrote on 27 Dec 2022, 15:19 last edited by sethsource
      #2

      I also just attempted this on 6.5 release and 6.6 preview. Its very odd, with the ffmpeg environment variable enabled, there is no error output, but it doesnt work like it should.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sethsource
        wrote on 27 Dec 2022, 15:37 last edited by sethsource
        #3

        On Linux, this code displays an RTSP stream. and I know that ffmpeg supports this, as i've created a .NET program using ffmpeg to do something similar. I just want to make this with QT/QML

        import QtQuick
        import QtMultimedia
        import QtQml.Models 2.3
        Window {
            width: 640
            height: 480
            visible: true
            title: qsTr("CSACamera")
            color: "#000000"
            Video {
                    id: stream
                    anchors.fill: parent
                    focus: true
                    source: "rtsp://admin:CSACamera18@192.168.2.18/h264_stream"
                    opacity: 1.0
                    fillMode: Image.Stretch
                    muted: true
                    onStopped: stream.play()
                    Timer {
                            interval: 300000; running: true; repeat: true
                            onTriggered: {
                                console.log("Log: Refresh")
                                stream.stop()
                                stream.source="rtsp://admin:CSACamera18@192.168.2.18/h264_stream"
                                stream.play()
                            }
                        }
        //            onErrorChanged: {
        //                console.log("VIDEO ERROR")
        //                stream.stop()
        //                stream.source="rtsp://admin:CSACamera18@192.168.2.18/h264_stream"
        //                stream.play()
        //            }
        
                    Text {
                        id: text1
                        width: 73
                        height: 18
                        color: "#ffffff"
                        text: qsTr("Audio: False")
                        anchors.left: parent.left
                        anchors.top: parent.top
                        font.pixelSize: 15
                        anchors.leftMargin: 0
                        anchors.topMargin: 0
                    }
        
                    Keys.onPressed: (event)=> {
                        if(event.key === Qt.Key_M) {
                            if(text1.text === "Audio: True") {
                                text1.text = "Audio: False"
                                stream.muted = true
                            } else if (text1.text === "Audio: False") {
                                text1.text = "Audio: True"
                                stream.muted = false
                            }
                        }
                    }
            }
        }
        
        
        1 Reply Last reply
        0
        • S Offline
          S Offline
          sethsource
          wrote on 2 Jan 2023, 03:02 last edited by sethsource 1 May 2023, 22:46
          #4
          This post is deleted!
          1 Reply Last reply
          0
          • S Offline
            S Offline
            sethsource
            wrote on 5 Jan 2023, 22:47 last edited by
            #5
            This post is deleted!
            1 Reply Last reply
            0
            • S Offline
              S Offline
              sethsource
              wrote on 10 Jan 2023, 17:08 last edited by
              #6
              This post is deleted!
              1 Reply Last reply
              0
              • S Offline
                S Offline
                sethsource
                wrote on 13 Jan 2023, 15:23 last edited by
                #7

                buimp .

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 13 Jan 2023, 20:03 last edited by
                  #8

                  Hi,

                  Did you check whether the plugin was deployed ?
                  If not, did you try to build it yourself ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  S 1 Reply Last reply 16 Jan 2023, 15:14
                  0
                  • S SGaist
                    13 Jan 2023, 20:03

                    Hi,

                    Did you check whether the plugin was deployed ?
                    If not, did you try to build it yourself ?

                    S Offline
                    S Offline
                    sethsource
                    wrote on 16 Jan 2023, 15:14 last edited by
                    #9

                    @SGaist How would i check to see if it's deployed? and also there's no instructions anywhere on how to build the preview with FFMPEG included

                    J 1 Reply Last reply 16 Jan 2023, 16:36
                    0
                    • S sethsource
                      16 Jan 2023, 15:14

                      @SGaist How would i check to see if it's deployed? and also there's no instructions anywhere on how to build the preview with FFMPEG included

                      J Offline
                      J Offline
                      JoeCFD
                      wrote on 16 Jan 2023, 16:36 last edited by JoeCFD
                      #10

                      @sethsource from Qt6.5, FFMPEG comes as default. Check the folder /plugins/multimedia and you will be able to see the plugin is there. If you use Qt6.4, you have to set QT_MEDIA_BACKEND. From all changes they are making, you may not be surprised by issues. Qt6.5 is under beta and Qt6.6 is under dev. I guess you have to be patient with this app.

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        sethsource
                        wrote on 17 Jan 2023, 15:02 last edited by
                        #11

                        QT6.4 didnt work with FFMPEG out of the box, as well as 6.6. I'll try 6.5.

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          sethsource
                          wrote on 17 Jan 2023, 16:25 last edited by
                          #12

                          Okay now we're getting somewhere. QT6.5 with msvc allows me to run my program without yelling at me. only thing now is it seems it wants me to specify a "decoding framework". heres the output:

                          Cant seem to find any environment variables on the internet that i can use.

                          Available HW decoding frameworks:
                          dxva2
                          d3d11va

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            sethsource
                            wrote on 17 Jan 2023, 16:43 last edited by
                            #13

                            I read on an ffmpeg forum that people make the use of dxva2 and d3d11va through a command line argument for video...
                            "ffmpeg -hwaccel dxva2 -threads 1 -i INPUT -f null - -benchmark"

                            but this is completely unrelated to QT. I attempted to use an envar for hwaccel and using command line arg and no difference.

                            1 Reply Last reply
                            0

                            6/13

                            10 Jan 2023, 17:08

                            • Login

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