QTMultimedia FFMPEG backend preview
-
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.
-
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 } } } } }
-
This post is deleted!
-
This post is deleted!
-
This post is deleted!
-
buimp .
-
Hi,
Did you check whether the plugin was deployed ?
If not, did you try to build it yourself ? -
@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.
-
QT6.4 didnt work with FFMPEG out of the box, as well as 6.6. I'll try 6.5.
-
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 -
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.