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. Client for VNC video streaming
QtWS25 Last Chance

Client for VNC video streaming

Scheduled Pinned Locked Moved Solved General and Desktop
41 Posts 4 Posters 9.1k 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 SGaist
    7 Jan 2019, 15:55

    One thing you could do is use GStreamer to connect to your VNC server and record the video.

    See the rfbsrc plugin.

    O Offline
    O Offline
    ODБOï
    wrote on 7 Jan 2019, 16:31 last edited by
    #25

    @SGaist
    thank you very much, i will try that. But do you mean i no more need the QVNCClientWidget ? or i need to integrate GStreamer with my widget ?
    I wanted to create my qt application client to have control on it : automatically stop/start recording/ delete when on some conditions is meet etc...
    THX!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 7 Jan 2019, 21:07 last edited by
      #26

      The idea is that you can use your widget for looking at whatever you need and GStreamer for the recording part which will allow you to generate a video file directly and not put a heavy load on your GUI thread.

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

      O 1 Reply Last reply 7 Jan 2019, 21:17
      1
      • S SGaist
        7 Jan 2019, 21:07

        The idea is that you can use your widget for looking at whatever you need and GStreamer for the recording part which will allow you to generate a video file directly and not put a heavy load on your GUI thread.

        O Offline
        O Offline
        ODБOï
        wrote on 7 Jan 2019, 21:17 last edited by
        #27

        @SGaist
        i don't need to look the screen i don't want gui, i only need the record part.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 7 Jan 2019, 21:22 last edited by
          #28

          In that case, using GStreamer would simplify the process of creating the video especially at the speed of the stream you get.

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

          O 1 Reply Last reply 8 Jan 2019, 08:53
          1
          • S SGaist
            7 Jan 2019, 21:22

            In that case, using GStreamer would simplify the process of creating the video especially at the speed of the stream you get.

            O Offline
            O Offline
            ODБOï
            wrote on 8 Jan 2019, 08:53 last edited by ODБOï 1 Aug 2019, 08:55
            #29

            hi,
            @SGaist said in Client for VNC video streaming:

            simplify

            how to use it please? I want to build GStreamer with this forum article help
            but the link is down : https://cgit.freedesktop.org/gstreamer/qt-gstreamer
            https://gitlab.freedesktop.org/gstreamer/qt-gstreamerSource download/src/qt-gstreamer

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 8 Jan 2019, 21:24 last edited by
              #30

              The link is back up however, the bindings should be considered outdated.

              Since you won't be looking at the the stream itself, what you can do is use the gstreamer API directly.

              Use the command line to find the best pipeline for your needs and then you can use something like GstParse to generate the pipeline in your code and then start it.

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

              O 1 Reply Last reply 9 Jan 2019, 08:31
              1
              • S SGaist
                8 Jan 2019, 21:24

                The link is back up however, the bindings should be considered outdated.

                Since you won't be looking at the the stream itself, what you can do is use the gstreamer API directly.

                Use the command line to find the best pipeline for your needs and then you can use something like GstParse to generate the pipeline in your code and then start it.

                O Offline
                O Offline
                ODБOï
                wrote on 9 Jan 2019, 08:31 last edited by
                #31

                Hi @SGaist

                Please tell me what command line are you talking about, I'm reading some introduction to GStreamer because ive never heared about it. What is the pipeline ? Thank you for the links, i'm looking for more general introduction/tutorial documents

                What are the drawbacks of my current solution please ? : Connecting with QVNCClientWidget, and then saving an image every time Gui is refreshed, i get 15 fps and it's enough for me.

                Thank you very mush for the help

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 9 Jan 2019, 22:09 last edited by
                  #32

                  gst-launch-1.0 is the tool

                  The drawback is as you wrote, you have to build the video afterwards and you don't really know the frame rate of it.

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

                  O 1 Reply Last reply 10 Jan 2019, 10:37
                  1
                  • S SGaist
                    9 Jan 2019, 22:09

                    gst-launch-1.0 is the tool

                    The drawback is as you wrote, you have to build the video afterwards and you don't really know the frame rate of it.

                    O Offline
                    O Offline
                    ODБOï
                    wrote on 10 Jan 2019, 10:37 last edited by
                    #33

                    @SGaist hello,

                    I installed gstreamer-1.0-devel-x86_64-1.14.3
                    (I dit not built it)
                    and linked my app against it adding this in my .pro

                    INCLUDEPATH += c:/gstreamer/1.0/x86_64/include \
                            c:/gstreamer/1.0/x86_64/lib/gstreamer-1.0/include \
                            c:/gstreamer/1.0/x86_64/include/gstreamer-1.0 \
                            c:/gstreamer/1.0/x86_64/include/glib-2.0\
                            c:/gstreamer/1.0/x86_64/include/glib-2.0/glib \
                            c:/gstreamer/1.0/x86_64/lib/glib-2.0/include
                    
                    LIBS += -Lc:/gstreamer/1.0/x86_64/lib
                    LIBS +=  -lgstreamer-1.0 -lglib-2.0 -lwinpthread -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0
                    CONFIG += c:/gstreamer/1.0/x86_64/lib/pkgconfig
                    

                    My app will compile but crash as soon i run it and gst_init(&argc, &argv) is called...
                    I can't even put breakpoints, debuggings stops immediately

                    #include "mainwindow.h"
                    #include <QApplication>
                    #include <gst/gst.h>
                    #include <QDebug>
                    
                    int main(int argc, char *argv[])
                    {
                        QApplication a(argc, argv);
                        MainWindow w;
                        w.showMaximized();
                        GstElement *pipeline;
                        GstBus *bus;
                        GstMessage *msg;
                        putenv("GST_PLUGIN_PATH=C:\\gstreamer\\1.0\\x86_64\\lib\\gstreamer-1.0\\");
                        gst_init(&argc, &argv); // << crash
                        return a.exec();
                        }
                    

                    Could you please tell me if you see something ?
                    Thank you for help

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 10 Jan 2019, 10:42 last edited by
                      #34

                      I would try calling get_init before creating the QApplication object.

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

                      O 1 Reply Last reply 10 Jan 2019, 10:52
                      1
                      • S SGaist
                        10 Jan 2019, 10:42

                        I would try calling get_init before creating the QApplication object.

                        O Offline
                        O Offline
                        ODБOï
                        wrote on 10 Jan 2019, 10:52 last edited by ODБOï 1 Oct 2019, 10:56
                        #35

                        @SGaist thx
                        but i have the same issue when i call gst_Init() before creating QApplication object.

                        int main(int argc, char *argv[])
                        {
                            putenv("GST_PLUGIN_PATH=C:\\gstreamer\\1.0\\x86_64\\lib\\gstreamer-1.0\\");
                            gst_init(&argc, &argv); // << crash
                        
                            QApplication a(argc, argv);
                            MainWindow w;
                            w.showMaximized();
                        ...
                        

                        The only output i get is :

                        11:52:22: The process was ended forcefully.
                        11:52:22: C:/Users/lev/Documents/build-QVNCClient-Desktop_Qt_5_12_0_MinGW_64_bit-Release/release/QVNCClient crashed.
                        

                        i tryed to see more information about the crash in Windows event viewer but nothing is reported there

                        Windows 7
                        Qt5.12
                        GNU Make 4.2.1 built for x86_64-w64-mingw32

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on 10 Jan 2019, 11:11 last edited by
                          #36

                          Did you add the path to where the gstreamer dlls can be found to the PATH environment variable ? This should be done in the Run part of the Project panel.

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

                          O 2 Replies Last reply 10 Jan 2019, 11:16
                          1
                          • S SGaist
                            10 Jan 2019, 11:11

                            Did you add the path to where the gstreamer dlls can be found to the PATH environment variable ? This should be done in the Run part of the Project panel.

                            O Offline
                            O Offline
                            ODБOï
                            wrote on 10 Jan 2019, 11:16 last edited by
                            #37

                            @SGaist
                            In the Run part of the Project panel i can see a checked checkbox , "Add build library search path to PATH"

                            1 Reply Last reply
                            0
                            • S SGaist
                              10 Jan 2019, 11:11

                              Did you add the path to where the gstreamer dlls can be found to the PATH environment variable ? This should be done in the Run part of the Project panel.

                              O Offline
                              O Offline
                              ODБOï
                              wrote on 10 Jan 2019, 13:51 last edited by
                              #38

                              @SGaist sry! this is my stupid error to forget copying gstreamers dlls near my app.

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on 10 Jan 2019, 14:22 last edited by
                                #39

                                Nothing stupid, it happened to all developers working on Windows at some point or the other.

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

                                O 1 Reply Last reply 10 Jan 2019, 14:37
                                2
                                • S SGaist
                                  10 Jan 2019, 14:22

                                  Nothing stupid, it happened to all developers working on Windows at some point or the other.

                                  O Offline
                                  O Offline
                                  ODБOï
                                  wrote on 10 Jan 2019, 14:37 last edited by
                                  #40

                                  @SGaist
                                  Thank you so much for your time.
                                  GStreamer is now initialized successfully!
                                  Now I'm trying too find documentation about 'pipeline' concept, this is very unclear for me

                                  1 Reply Last reply
                                  0
                                  • S Offline
                                    S Offline
                                    SGaist
                                    Lifetime Qt Champion
                                    wrote on 10 Jan 2019, 15:03 last edited by
                                    #41

                                    A GStreamer pipeline is basically a list of module that you chain to each other from the source to the sink to, for example, read an audio file, decode it and finally send it to your audio output.

                                    From a command line point of view, it's the elements built from the parameters you give to gst-launch.

                                    For example:
                                    Play the mp3 music file "music.mp3" using a libmad-based plugin and output to an OSS device:

                                    gst-launch-1.0 filesrc location=music.mp3 ! mad ! audioconvert ! audioresample ! osssink
                                    

                                    The documentation of get-launch gives you more good examples.
                                    The API tutorials are pretty nice to get started.

                                    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
                                    1

                                    34/41

                                    10 Jan 2019, 10:42

                                    • Login

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