Passing parameters to ffmpeg while using QtMultimedia
-
Hi,
I am trying to use ffmpeg as QtMultimedia backend in windows and trying to display an rtp h264 stream.
I use a sdp file for stream description. Using ffplay, I can easily play the stream by:.\ffplay.exe -protocol_whitelist file,udp,rtp -i .\stream.sdp
Giving this sdp file as source of a QML Video item also works as:
Video { id: mediaplayer width: 720 height: 576 onErrorChanged: console.log("play error", mediaplayer.errorString , error) // Failed to load source source: "file:///C:/stream.sdp" autoPlay: true }
However, because I cannot pass -protocol_whitelist file,udp,rtp parameter to ffmpeg over QML, I end up the following error:
[rtp @ 000002288B0A4000] Protocol 'rtp' not on whitelist 'file,crypto,data'!Is there a way to pass this -protocol_whitelist file,udp,rtp parameter to ffmpeg?
Regards
Alper -
Hi and welcome to devnet,
AFAIK, you currently can't.
You should check the bug report system to see if there's a ticket related to that.
-
This will be fixed in the upcoming Qt 6.8 release, and is back-ported to 6.7.2. See https://bugreports.qt.io/browse/QTBUG-125006, which adds a check for the QT_FFMPEG_PROTOCOL_WHITELIST environment variable, which the user can set to override the whitelist with their own.