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. Playing a GStreamer Pipeline on QGraphicsView
Forum Updated to NodeBB v4.3 + New Features

Playing a GStreamer Pipeline on QGraphicsView

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 4 Posters 1.0k Views 1 Watching
  • 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.
  • T Offline
    T Offline
    tungdil
    wrote on last edited by
    #1

    Hey, I'm trying to run a basic GStreamer pipeline on the QGraphicsView widget but when I execute the program I get the following error:

    GStreamer; Unable to pause - "gst-pipeline: videotestsrc ! videoconvert ! ximagesink name=%22qtvideosink%22"
    GStreamer; Unable to pause - "gst-pipeline: videotestsrc ! videoconvert ! ximagesink name=%22qtvideosink%22"
    Error: "No URI handler implemented for \"gst-pipeline\"."
    

    You can see my code down below:
    header (.h) file

        QMediaPlayer *player_1 = new QMediaPlayer(this, QMediaPlayer::VideoSurface);
    
        QGraphicsVideoItem *item_1 = new QGraphicsVideoItem;
    
        QGraphicsScene *scene_1 = new QGraphicsScene;
    

    .cpp file

        ui->graphicsView->setScene(scene_1);
        ui->graphicsView->scene()->addItem(item_1);
    
        player_1->setVideoOutput(item_1);
        item_1->setSize(QSizeF(width, height));
        player_1->setMedia(QUrl("gst-pipeline: videotestsrc ! videoconvert ! ximagesink name=\"qtvideosink\""));
        player_1->setMuted(true);
        player_1->play();
    

    I want to use QGraphicsView because it is available in the UI Designer so I can manipulate it easily. I've tried different sinks but I either get this error or I get an empty screen.
    Thanks.

    JoeCFDJ 1 Reply Last reply
    0
    • T tungdil

      Hey, I'm trying to run a basic GStreamer pipeline on the QGraphicsView widget but when I execute the program I get the following error:

      GStreamer; Unable to pause - "gst-pipeline: videotestsrc ! videoconvert ! ximagesink name=%22qtvideosink%22"
      GStreamer; Unable to pause - "gst-pipeline: videotestsrc ! videoconvert ! ximagesink name=%22qtvideosink%22"
      Error: "No URI handler implemented for \"gst-pipeline\"."
      

      You can see my code down below:
      header (.h) file

          QMediaPlayer *player_1 = new QMediaPlayer(this, QMediaPlayer::VideoSurface);
      
          QGraphicsVideoItem *item_1 = new QGraphicsVideoItem;
      
          QGraphicsScene *scene_1 = new QGraphicsScene;
      

      .cpp file

          ui->graphicsView->setScene(scene_1);
          ui->graphicsView->scene()->addItem(item_1);
      
          player_1->setVideoOutput(item_1);
          item_1->setSize(QSizeF(width, height));
          player_1->setMedia(QUrl("gst-pipeline: videotestsrc ! videoconvert ! ximagesink name=\"qtvideosink\""));
          player_1->setMuted(true);
          player_1->play();
      

      I want to use QGraphicsView because it is available in the UI Designer so I can manipulate it easily. I've tried different sinks but I either get this error or I get an empty screen.
      Thanks.

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

      @tungdil Qt5 or Qt6?

      T 1 Reply Last reply
      0
      • JoeCFDJ JoeCFD

        @tungdil Qt5 or Qt6?

        T Offline
        T Offline
        tungdil
        wrote on last edited by
        #3

        @JoeCFD Qt 5.15.3

        JoeCFDJ 1 Reply Last reply
        0
        • T tungdil

          @JoeCFD Qt 5.15.3

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

          @tungdil LInux or Windows?

          SGaistS T 2 Replies Last reply
          0
          • JoeCFDJ JoeCFD

            @tungdil LInux or Windows?

            SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

            What happens if you use the minimal example from the documentation:

            player = new QMediaPlayer;
            videoWidget = new QVideoWidget;
            videoWidget->show();
            player->setVideoOutput(videoWidget);
            player->setMedia(QUrl("gst-pipeline: videotestsrc ! xvimagesink name=\"qtvideosink\""));
            player->play();
            

            ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            T 1 Reply Last reply
            0
            • JoeCFDJ JoeCFD

              @tungdil LInux or Windows?

              T Offline
              T Offline
              tungdil
              wrote on last edited by
              #6

              @JoeCFD Ubuntu 22.04

              1 Reply Last reply
              0
              • SGaistS SGaist

                Hi,

                What happens if you use the minimal example from the documentation:

                player = new QMediaPlayer;
                videoWidget = new QVideoWidget;
                videoWidget->show();
                player->setVideoOutput(videoWidget);
                player->setMedia(QUrl("gst-pipeline: videotestsrc ! xvimagesink name=\"qtvideosink\""));
                player->play();
                

                ?

                T Offline
                T Offline
                tungdil
                wrote on last edited by
                #7

                @SGaist

                I get these two windows and the output below on the application outputScreenshot from 2023-04-06 09-21-13.png

                GStreamer; Unable to pause - "gst-pipeline: videotestsrc ! xvimagesink name=%22qtvideosink%22"
                GStreamer; Unable to pause - "gst-pipeline: videotestsrc ! xvimagesink name=%22qtvideosink%22"
                Error: "No URI handler implemented for \"gst-pipeline\"."
                
                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  lokeshkr
                  wrote on last edited by
                  #8

                  @tungdil Hi, I'm stuck in same situation. Did you manage to resolve this error : "No URI handler implemented for "gst-pipeline"."
                  ??

                  SGaistS 1 Reply Last reply
                  0
                  • L lokeshkr

                    @tungdil Hi, I'm stuck in same situation. Did you manage to resolve this error : "No URI handler implemented for "gst-pipeline"."
                    ??

                    SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @lokeshkr Hi,

                    which version of Qt are you using ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    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