Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Playing RTSP Video in QML on Windows

I am trying to play a RTSP stream in QML into a Video tag as following:

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 videoScreens, 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 I am doing wrong? If not, How could I get this working?

PS.: I've also tried to use MediaPlayer together with VideoOutput, but I was given the same error.

Thank you in advance

like image 541
RafaelTSCS Avatar asked Nov 01 '22 16:11

RafaelTSCS


1 Answers

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

like image 164
user3668531 Avatar answered Nov 08 '22 09:11

user3668531