Play RTSP video in QML on Windows

I am trying to play an RTSP stream in QML in a Video tag like this:

Repeater {
    model: 8

    Video {
        Layout.fillWidth: true
        Layout.fillHeight: true

        fillMode: VideoOutput.Stretch

        source: Controller.urlCanal(index + 1)
        autoPlay: true
        autoLoad: true

        CustomBorder {
            commonBorder: true
            color: "#228e14"
            commonBorderWidth: 3
        }
    }
}

      

This should display 8 video screens, but I am getting the error:

DirectShowPlayerService :: doSetUrlSource: Unresolved error code 800c000d

Url:

Rtsp: //192.168.50.10: 8082 / user = admin & password = admin & channel = 7 & stream = 0.sdp real_stream

Does QML support RTSP? If so, what am I doing wrong? If not, how can I get this to work?

PS: I also tried to use MediaPlayer along with VideoOutput but was given the same error.

Thank you in advance

+3


source to share


1 answer


Qt itself does not support RTSP. Try using a third party library like OpenCV or FFMPEG. I used OpenCV and then created a plugin from my C ++ code to create an OpenCV camera element and then mapped the RTSP feeds to QML.



0


source







All Articles