• Hey !
    I am recovering and displaying a video from an IP camera using a QML sourcecode.
    I'm using a basic mediaplayer
    But here is my problem. For now I am directly linked to my camera, but, in the end, my camera will send the video to a kind of controller. This controller will send me under UDP packet a lot of information, including the camera video.
    I also know that, the controller can "recognize" the video, and put an "ID Video" on all UDP packets corresponding to the camera before sending me.
    How should I modify my code to focus on these UDP packet and display the video on my computer ?

    Here is my first code :
    RTSP.qml :

    import QtQuick 2.0
    import QtQuick.Controls 2.0
    import QtQuick.Layouts 1.3
    import QtQuick.Controls.Material 2.0
    import QtQuick.Controls.Universal 2.0
    import Fluid.Controls 1.0
    import QtMultimedia 5.5
    import QtQuick.Window 2.0
    import QtQuick 2.7
    import "elements"
    Tab {
         //visible: true
        //visibility: maximised
        title: "RTSP Stream"
            id: swipeview
            anchors.fill: parent
            currentIndex: tabBar.currentIndex
                    id: mediaplayer
                    source: "rtsp://"
                    anchors.fill: parent
                    source: mediaplayer
                    anchors.centerIn: parent
                    font.pointSize: 32
                    text: qsTr("RTSP Launch")
                    id: playArea
                    anchors.fill: parent
                    onClicked: {
                        print("initi stream")
                        msgPage1.visible = false
                            print("para stream")
                            msgPage1.visible = true

    main.qml :

                    spacing: 0
                    anchors.fill: parent
                    LeftStatusStack {
                        id: leftStatusStack
                        anchors.top : parent.top
                        color: Material.primary
                        Layout.fillHeight: true
                            id: rtspTab
                            objectName: "rtspTab"
                            visible: true

    I dont put all the main because I think you dont need it but there is a lot of module (all working)

    So to sum up : The video arrive with a lot of other UDP packet, video packet contains a identificator, I just want to display that video, how can I modify my code ? :)

    Thanks for help ;)

  • Lifetime Qt Champion


    It's a bit vague. What will that controller be ? Won't it just add data to the video stream ?
    You make it sound like it's going to interleave information so generate new frames between video frames.

  • Hi @SGaist ,

    sorry for the time of response
    Actually, it will add data yes. Most of the data will be video stream but not all.That's why I need to recover only video data and, as I explain, I know that these video data have an identificator (something like 0x0019 )

  • Lifetime Qt Champion

    What I meant is, is the stream altered or can you still view it on e.g. VLC ?

  • @SGaist the stream is not altered, I want to recover exactly the same video that the camera send

  • @Chanchan said in RTSP & QML:

    the stream is not altered

    somehow contradicts

    video arrive with a lot of other UDP packet

    please answer @SGaist question regarding what happens if you use i.e. VLC to connect to your server output, can you view the video? I bet not...

  • no, as I said, I recover a lot of UDP packets, but only one type is interesting for me : video ones. And that I want is to detect these packet and display them in a video module

  • I didnt try with VLC but I used Gstreamer and yes I can display it

  • @Chanchan said in RTSP & QML:

    I used Gstreamer and yes I can display it

    Mmm, strange. So somehow Gstreamer is smart enough to drop the non-video related UDP packets?

  • Lifetime Qt Champion

    So my guess is that device is just adding meta data to your video stream so it should play the same especially if GStreamer is able to show it.

  • Banned

    This post is deleted!

  • sorry for the response time again, ok I will search in this way then, thanks for answering :)

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.