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
Forum Updated to NodeBB v4.3 + New Features

Qt5 gstreamer render issue in graphicsview

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 2 Posters 1.3k 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 sanket_1989

    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.

    JoeCFDJ Offline
    JoeCFDJ Offline
    JoeCFD
    wrote on 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
    0
    • JoeCFDJ JoeCFD

      @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 last edited by sanket_1989
      #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();

      JoeCFDJ 1 Reply Last reply
      0
      • S sanket_1989

        @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();

        JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on 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
        0
        • JoeCFDJ JoeCFD

          @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 last edited by sanket_1989
          #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

          JoeCFDJ 1 Reply Last reply
          0
          • S sanket_1989

            @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

            JoeCFDJ Offline
            JoeCFDJ Offline
            JoeCFD
            wrote on last edited by
            #6

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

            S 2 Replies Last reply
            0
            • JoeCFDJ JoeCFD

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

              S Offline
              S Offline
              sanket_1989
              wrote on 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
              • JoeCFDJ JoeCFD

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

                S Offline
                S Offline
                sanket_1989
                wrote on last edited by
                #8

                @JoeCFD Hello any solution ?

                JoeCFDJ 1 Reply Last reply
                0
                • S sanket_1989

                  @JoeCFD Hello any solution ?

                  JoeCFDJ Offline
                  JoeCFDJ Offline
                  JoeCFD
                  wrote on last edited by
                  #9

                  @sanket_1989 does your pipeline work from command line?

                  S 1 Reply Last reply
                  0
                  • JoeCFDJ JoeCFD

                    @sanket_1989 does your pipeline work from command line?

                    S Offline
                    S Offline
                    sanket_1989
                    wrote on 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.

                    JoeCFDJ 1 Reply Last reply
                    0
                    • S sanket_1989

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

                      JoeCFDJ Offline
                      JoeCFDJ Offline
                      JoeCFD
                      wrote on 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

                      • Login

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