'QML udp/rtp video stream fails Windows 10

In Qt5 /qml it was possible to playback udp stream as rtp payload on Windows MSVC kit , below qml code works on Qt5, now problem is migrating to qt6 (6.3) this stopped working anymore, No error reported .. only if I check Video element error, I get Failed to load source ; in Qt6, QMultimedia back end is Windows media foundation , as of Qt supported-media-formats Under Widows section , It seems that whatever Windows media player can decode and play ..so should also Qt do, strangely, I can play the stream with same url using Windows media player , which also uses media foundation. I also have installed the K-Lite codec pack from codec guide in same reference .. , notably, Qt can detect erroneous url and reports Unsupported url scheme! if the url was erratic , this is not the case! Is this a bug in Qt6 .. or ?

code

GStreamer streaming pipeline .. gst-launch-1.0 filesrc location=./local_video.mp4 ! decodebin ! queue ! videoconvert ! jpegenc ! queue ! rtpjpegpay ! udpsink host=192.168.0.174 port=5005

QML code:

import QtQuick
import QtQuick.Controls
import QtMultimedia


Window {
    id: root
    width: 640
    height: 480
    visible: true
    title: qsTr("Hello World")
    Component.onCompleted: {
        mediaplayer.source = "rtp://192.168.0.174:5005/? udpsrc.caps=application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)JPEG, payload=(int)26"
        //mediaplayer.source = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
        mediaplayer.play()
    }
    Video {
        id: mediaplayer
        width: 640
        height: 480
        onErrorChanged: console.log("play error", mediaplayer.errorString , error) // Failed to load source
    }
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source