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
Qt 6.11 is out! See what's new in the release blog

Client for VNC video streaming

Scheduled Pinned Locked Moved Solved General and Desktop
41 Posts 4 Posters 55.2k Views 2 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.
  • ODБOïO ODБOï

    Thank you,

    @mrjj said in Client for VNC video streaming:

    the other 3rd party GUI is runnig on some pc and you want to record a video of it running?

    yes,it is running on a machine with 'custom windows'

    the Gui will reveal a strange 'hardware' bug on the machine that happends only 1-2 times per year... lot of things have been done for debugging this (not by me) but nothing was found, everything is 'normal' :) . I need to record the gui to see some values when the 'hardware' bug happends. I could simply use Fraps or another screen capture tool, but the installation of 3rd party tool is not allowed on that windows. It has VNC

    mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by
    #11

    @LeLev

    Ok, a rare bug. Delicious ;)
    if it only happens 1-2 in a year, how will you know what time to record video?

    Anyway, you could simply use a tool to record the VNC session then. im not sure creating a Qt app would be worth the time.

    ODБOïO 1 Reply Last reply
    0
    • mrjjM mrjj

      @LeLev

      Ok, a rare bug. Delicious ;)
      if it only happens 1-2 in a year, how will you know what time to record video?

      Anyway, you could simply use a tool to record the VNC session then. im not sure creating a Qt app would be worth the time.

      ODБOïO Offline
      ODБOïO Offline
      ODБOï
      wrote on last edited by
      #12

      @mrjj said in Client for VNC video streaming:

      Delicious ;)

      absolutely! :) but this cost tons of money.. for the chief. that is a large machine going crazy once a year

      i want my qt app to start every time when the user will start the machine (he will also start my app on a pc near the machine).
      then my app will record and save video chunks. I thought using qt to handle record/chunk/deletion/.. logic
      Do you think tools alre 'programables' enough or its worth use Qt (everywhere).
      Thanks

      mrjjM 1 Reply Last reply
      0
      • ODБOïO ODБOï

        @mrjj said in Client for VNC video streaming:

        Delicious ;)

        absolutely! :) but this cost tons of money.. for the chief. that is a large machine going crazy once a year

        i want my qt app to start every time when the user will start the machine (he will also start my app on a pc near the machine).
        then my app will record and save video chunks. I thought using qt to handle record/chunk/deletion/.. logic
        Do you think tools alre 'programables' enough or its worth use Qt (everywhere).
        Thanks

        mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #13

        @LeLev
        Ah, well even most tools can be controlled by scripts, using a Qt program would be more solid.
        Also considering its the operator that controls the recording. ( i though it would be you)
        it has to be really smooth operating so a Qt app seems like good idea.

        How many FPS do you need to record ?

        ODБOïO 2 Replies Last reply
        1
        • mrjjM mrjj

          @LeLev
          Ah, well even most tools can be controlled by scripts, using a Qt program would be more solid.
          Also considering its the operator that controls the recording. ( i though it would be you)
          it has to be really smooth operating so a Qt app seems like good idea.

          How many FPS do you need to record ?

          ODБOïO Offline
          ODБOïO Offline
          ODБOï
          wrote on last edited by
          #14

          @mrjj said in Client for VNC video streaming:

          Also considering its the operator that controls the recording. ( i though it would be you)

          I need to minimize operator intervention. He will only start the pc the rest must be done automatically.

          20-30 fps and descent ~480p+ is enough

          mrjjM 1 Reply Last reply
          0
          • ODБOïO ODБOï

            @mrjj said in Client for VNC video streaming:

            Also considering its the operator that controls the recording. ( i though it would be you)

            I need to minimize operator intervention. He will only start the pc the rest must be done automatically.

            20-30 fps and descent ~480p+ is enough

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #15

            @LeLev

            Ok, so it must auto connect and record and make sure not to fill disk with video.
            The QVNCClientWidget should make it fairly easy to connect etc but
            it seems not to have a direct way of save to video.
            However, it exposes the image directly as QImage so you should be able to
            create a video somehow.

            ODБOïO 1 Reply Last reply
            1
            • mrjjM mrjj

              @LeLev

              Ok, so it must auto connect and record and make sure not to fill disk with video.
              The QVNCClientWidget should make it fairly easy to connect etc but
              it seems not to have a direct way of save to video.
              However, it exposes the image directly as QImage so you should be able to
              create a video somehow.

              ODБOïO Offline
              ODБOïO Offline
              ODБOï
              wrote on last edited by
              #16

              @mrjj said in Client for VNC video streaming:

              QVNCClientWidget

              Really ?! awsome there is a ready to use Qt Class !
              i was not expecting this conclusion at all
              Thank you very much for info and for your time!
              I will play with QVNCClientWidget this weekend and get into this monday.

              mrjjM 1 Reply Last reply
              0
              • ODБOïO ODБOï

                @mrjj said in Client for VNC video streaming:

                QVNCClientWidget

                Really ?! awsome there is a ready to use Qt Class !
                i was not expecting this conclusion at all
                Thank you very much for info and for your time!
                I will play with QVNCClientWidget this weekend and get into this monday.

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #17

                @LeLev
                Hi
                Yes, SGaist was so kind to dig one up. :) (see link higher up)
                Its not part of official Qt but Qt never the less.
                Its from 2016 so seems pretty recent.
                So the biggest issue will be to produce a video from the frames. Preferable compressed
                if video size matters.

                ODБOïO 1 Reply Last reply
                2
                • mrjjM mrjj

                  @LeLev
                  Hi
                  Yes, SGaist was so kind to dig one up. :) (see link higher up)
                  Its not part of official Qt but Qt never the less.
                  Its from 2016 so seems pretty recent.
                  So the biggest issue will be to produce a video from the frames. Preferable compressed
                  if video size matters.

                  ODБOïO Offline
                  ODБOïO Offline
                  ODБOï
                  wrote on last edited by
                  #18

                  @mrjj said in Client for VNC video streaming:

                  see link higher

                  cant find it,

                  https://bitbucket.org/amahta/qvncclient/src ?

                  mrjjM 1 Reply Last reply
                  0
                  • ODБOïO ODБOï

                    @mrjj said in Client for VNC video streaming:

                    see link higher

                    cant find it,

                    https://bitbucket.org/amahta/qvncclient/src ?

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #19

                    @LeLev
                    yep :)

                    ODБOïO 1 Reply Last reply
                    1
                    • mrjjM mrjj

                      @LeLev
                      yep :)

                      ODБOïO Offline
                      ODБOïO Offline
                      ODБOï
                      wrote on last edited by
                      #20

                      @mrjj
                      perfect ! thank you and thank you @SGaist

                      1 Reply Last reply
                      0
                      • SGaistS SGaist

                        Hi,

                        This article and the linked repository might be just what you need.

                        Hope it helps

                        ODБOïO Offline
                        ODБOïO Offline
                        ODБOï
                        wrote on last edited by
                        #21

                        @SGaist said in Client for VNC video streaming:

                        This article and the linked repository might be just what you need

                        omg.. sorry i did not see your messages. my bad.
                        Thank you very much

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #22

                          No worries ;-)

                          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
                          • mrjjM mrjj

                            @LeLev
                            Ah, well even most tools can be controlled by scripts, using a Qt program would be more solid.
                            Also considering its the operator that controls the recording. ( i though it would be you)
                            it has to be really smooth operating so a Qt app seems like good idea.

                            How many FPS do you need to record ?

                            ODБOïO Offline
                            ODБOïO Offline
                            ODБOï
                            wrote on last edited by
                            #23

                            @mrjj said in Client for VNC video streaming:

                            How many FPS do you need to record

                            Hi,
                            So finally, thaks to you and SGaist the server is running on the machine i want to connect,
                            on the other side, i have my QVNCClientWidget that connects and shows the first machine GUI.

                            Now, i need to record the screen.

                            I simply added my signal ' void saveImg(QImage );' to **QVNCClientWidget **,
                            that signal is emited in QVNCClientWidget::paintEvent

                            i'm passing the screen images to a slot that will save them as simple images.

                            void QVNCClientWidget::paintEvent(QPaintEvent *)
                            {
                                if(screen.isNull())
                                {
                                    screen = QImage(width(), height(), QImage::Format_RGB32);
                                    screen.fill(Qt::red);
                            
                                }
                            
                                 emit saveImg(screen); 
                            
                                QPainter painter;
                                painter.begin(this);
                                painter.drawImage(0, 0, screen.scaled(width(), height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
                                painter.end();
                            }
                            

                            So, for now i'm only recording all the frames as .png images, and then i can reconstruct a video with a 3rd party tool (VirtualDub).
                            To reconstruct a video my tool needs a parameter FPS (and it must match with my program FPS , if not, video is to fast or to slow)
                            Is there a way to specify the FPS with QVNCClientWidget ?

                            Or do you see a solution to create the video with the images directly in my qt app ? I read its possible with LibAvi or Opencv but can't find Qt only solution.

                            Thank you

                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #24

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

                              See the rfbsrc plugin.

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

                              ODБOïO 1 Reply Last reply
                              2
                              • SGaistS SGaist

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

                                See the rfbsrc plugin.

                                ODБOïO Offline
                                ODБOïO Offline
                                ODБOï
                                wrote on 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
                                • SGaistS Offline
                                  SGaistS Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on 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

                                  ODБOïO 1 Reply Last reply
                                  1
                                  • SGaistS SGaist

                                    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.

                                    ODБOïO Offline
                                    ODБOïO Offline
                                    ODБOï
                                    wrote on 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
                                    • SGaistS Offline
                                      SGaistS Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on 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

                                      ODБOïO 1 Reply Last reply
                                      1
                                      • SGaistS SGaist

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

                                        ODБOïO Offline
                                        ODБOïO Offline
                                        ODБOï
                                        wrote on last edited by ODБOï
                                        #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
                                        • SGaistS Offline
                                          SGaistS Offline
                                          SGaist
                                          Lifetime Qt Champion
                                          wrote on 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

                                          ODБOïO 1 Reply Last reply
                                          1

                                          • Login

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