Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt5 gstreamer render issue in graphicsview
QtWS25 Last Chance

Qt5 gstreamer render issue in graphicsview

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 2 Posters 1.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sanket_1989
    wrote on 10 Apr 2024, 11:28 last edited by
    #1

    I created the .ui file with different graphics view in frame. While running the application in ubuntu i am able to render the gstreamer pipeline in graphics view. Sink is autovideosink

    But while running the same application on CCPiolotV1000x display, Not able to capture live stream in graphics view. Stream is opening in new window.

    J 1 Reply Last reply 10 Apr 2024, 15:51
    0
    • S sanket_1989
      10 Apr 2024, 11:28

      I created the .ui file with different graphics view in frame. While running the application in ubuntu i am able to render the gstreamer pipeline in graphics view. Sink is autovideosink

      But while running the same application on CCPiolotV1000x display, Not able to capture live stream in graphics view. Stream is opening in new window.

      J Offline
      J Offline
      JoeCFD
      wrote on 10 Apr 2024, 15:51 last edited by
      #2

      @sanket_1989 autovideosink will not work in Qt and usually will open a default window to render video.
      This feature of running gstreamer pipeline in qt multimedia module is not supported in Qt6 anymore. Therefore, try to use qml sink to render video display if you prefer to use gstreamer pipeline.

      S 1 Reply Last reply 10 Apr 2024, 18:22
      0
      • J JoeCFD
        10 Apr 2024, 15:51

        @sanket_1989 autovideosink will not work in Qt and usually will open a default window to render video.
        This feature of running gstreamer pipeline in qt multimedia module is not supported in Qt6 anymore. Therefore, try to use qml sink to render video display if you prefer to use gstreamer pipeline.

        S Offline
        S Offline
        sanket_1989
        wrote on 10 Apr 2024, 18:22 last edited by sanket_1989 4 Oct 2024, 18:28
        #3

        @JoeCFD Can you share me the example code which consist qmlvideosink ?

        Currently i am using QT5 in which i am setting the media Qurl as Gstreamer pipeline.
        Steps like below :
        player = new QMediaPlayer
        videoItem = new QGraphicsVideoItem
        graphicsView->setScene(new QGraphicsScene(this))
        graphicsView->scene()->addItem(videoItem);
        player -> setVideoOutput(birdEyevideoItem);
        videoItem->setSize(QSizeF(width(),height()));
        graphicsView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);graphicsView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
        graphicsView->installEventFilter(this);

        player->setMedia(QUrl("gst-pipeline: udpsrc port=5555 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)JPEG" ! rtpjpegdepay ! jpegparse ! jpegdec ! autovideosink sync=false"));

        player->play();

        J 1 Reply Last reply 10 Apr 2024, 19:06
        0
        • S sanket_1989
          10 Apr 2024, 18:22

          @JoeCFD Can you share me the example code which consist qmlvideosink ?

          Currently i am using QT5 in which i am setting the media Qurl as Gstreamer pipeline.
          Steps like below :
          player = new QMediaPlayer
          videoItem = new QGraphicsVideoItem
          graphicsView->setScene(new QGraphicsScene(this))
          graphicsView->scene()->addItem(videoItem);
          player -> setVideoOutput(birdEyevideoItem);
          videoItem->setSize(QSizeF(width(),height()));
          graphicsView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);graphicsView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
          graphicsView->installEventFilter(this);

          player->setMedia(QUrl("gst-pipeline: udpsrc port=5555 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)JPEG" ! rtpjpegdepay ! jpegparse ! jpegdec ! autovideosink sync=false"));

          player->play();

          J Offline
          J Offline
          JoeCFD
          wrote on 10 Apr 2024, 19:06 last edited by
          #4

          @sanket_1989
          try to replace autovideosink with qtvideosink from here
          https://forum.qt.io/topic/110561/qtmediaplayer-and-custom-gstreamer-pipeline/6

          S 1 Reply Last reply 11 Apr 2024, 04:17
          0
          • J JoeCFD
            10 Apr 2024, 19:06

            @sanket_1989
            try to replace autovideosink with qtvideosink from here
            https://forum.qt.io/topic/110561/qtmediaplayer-and-custom-gstreamer-pipeline/6

            S Offline
            S Offline
            sanket_1989
            wrote on 11 Apr 2024, 04:17 last edited by sanket_1989 4 Nov 2024, 04:47
            #5

            @JoeCFD Yes i tried with qtvideosink. Its working fine for the below pipeline and able to render in Graphicsview.

            setMedia(QUrl("gst-pipeline: videotestsrc ! qtvideosink"));

            But for below pipeline i am not able to get the desired output.

            setMedia(QUrl("gst-pipeline: udpsrc port=5555 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)JPEG" ! rtpjpegdepay ! jpegparse ! jpegdec ! qtvideosink sync=false"));

            getting below error in CCpilotV1000x device.

            shared image (1).jpeg

            J 1 Reply Last reply 11 Apr 2024, 13:18
            0
            • S sanket_1989
              11 Apr 2024, 04:17

              @JoeCFD Yes i tried with qtvideosink. Its working fine for the below pipeline and able to render in Graphicsview.

              setMedia(QUrl("gst-pipeline: videotestsrc ! qtvideosink"));

              But for below pipeline i am not able to get the desired output.

              setMedia(QUrl("gst-pipeline: udpsrc port=5555 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)JPEG" ! rtpjpegdepay ! jpegparse ! jpegdec ! qtvideosink sync=false"));

              getting below error in CCpilotV1000x device.

              shared image (1).jpeg

              J Offline
              J Offline
              JoeCFD
              wrote on 11 Apr 2024, 13:18 last edited by
              #6

              @sanket_1989 you are running under root because /opt is a root dir?

              S 2 Replies Last reply 12 Apr 2024, 04:55
              0
              • J JoeCFD
                11 Apr 2024, 13:18

                @sanket_1989 you are running under root because /opt is a root dir?

                S Offline
                S Offline
                sanket_1989
                wrote on 12 Apr 2024, 04:55 last edited by
                #7

                @JoeCFD Yes we are running as a root user. we are cross compile the qt application and deploy in /opt in device.

                1 Reply Last reply
                0
                • J JoeCFD
                  11 Apr 2024, 13:18

                  @sanket_1989 you are running under root because /opt is a root dir?

                  S Offline
                  S Offline
                  sanket_1989
                  wrote on 17 Apr 2024, 07:02 last edited by
                  #8

                  @JoeCFD Hello any solution ?

                  J 1 Reply Last reply 17 Apr 2024, 13:48
                  0
                  • S sanket_1989
                    17 Apr 2024, 07:02

                    @JoeCFD Hello any solution ?

                    J Offline
                    J Offline
                    JoeCFD
                    wrote on 17 Apr 2024, 13:48 last edited by
                    #9

                    @sanket_1989 does your pipeline work from command line?

                    S 1 Reply Last reply 18 Apr 2024, 06:42
                    0
                    • J JoeCFD
                      17 Apr 2024, 13:48

                      @sanket_1989 does your pipeline work from command line?

                      S Offline
                      S Offline
                      sanket_1989
                      wrote on 18 Apr 2024, 06:42 last edited by
                      #10

                      @JoeCFD Yes i am able to fetch the pipeline from command line using autovideosink. But qtvideosink is not working in device.

                      J 1 Reply Last reply 18 Apr 2024, 14:14
                      0
                      • S sanket_1989
                        18 Apr 2024, 06:42

                        @JoeCFD Yes i am able to fetch the pipeline from command line using autovideosink. But qtvideosink is not working in device.

                        J Offline
                        J Offline
                        JoeCFD
                        wrote on 18 Apr 2024, 14:14 last edited by JoeCFD
                        #11

                        @sanket_1989 said in Qt5 gstreamer render issue in graphicsview:

                        qtvideosink

                        Check here out.
                        https://github.com/GStreamer/qt-gstreamer/blob/master/elements/gstqtvideosink/gstqtvideosink.cpp
                        You may need to install qt gstreamer in order to have qtvideosink available. Be aware that this package is very old, has some bugs and no more update.
                        Therefore, it is not right to use qt multimedia to run a gstreamer pipeline because you do not have any control over it and qt multimedia may not work properly for your pipeline. Better to use qml sink directly.

                        Note that I do not use qt multimedia.

                        1 Reply Last reply
                        0

                        8/11

                        17 Apr 2024, 07:02

                        • Login

                        • Login or register to search.
                        8 out of 11
                        • First post
                          8/11
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved