Client for VNC video streaming
-
@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
@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. -
@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.wrote on 4 Jan 2019, 23:07 last edited by@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. -
@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.@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. -
@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.wrote on 4 Jan 2019, 23:49 last edited by -
@LeLev
yep :) -
wrote on 5 Jan 2019, 00:48 last edited by
@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 -
No worries ;-)
-
@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 ?
wrote on 7 Jan 2019, 15:12 last edited by@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::paintEventi'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
-
One thing you could do is use GStreamer to connect to your VNC server and record the video.
See the rfbsrc plugin.
-
One thing you could do is use GStreamer to connect to your VNC server and record the video.
See the rfbsrc plugin.
wrote on 7 Jan 2019, 16:31 last edited by@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! -
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.
-
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.
-
In that case, using GStreamer would simplify the process of creating the video especially at the speed of the stream you get.
-
In that case, using GStreamer would simplify the process of creating the video especially at the speed of the stream you get.
wrote on 8 Jan 2019, 08:53 last edited by ODБOï 1 Aug 2019, 08:55hi,
@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 -
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.
-
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.
wrote on 9 Jan 2019, 08:31 last edited byHi @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
-
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.
-
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.
wrote on 10 Jan 2019, 10:37 last edited by@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 .proINCLUDEPATH += 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 -
I would try calling
get_init
before creating theQApplication
object.
24/41