Client for VNC video streaming
-
Hi
Its very unclear to me what you ask about.
What will be streaming the video ? and what format ? -
@mrjj
i don't know how VNC realy works,and it is unclear to me also.I have pc1 with a 3rd party GUI application running,
with another pc2 i want to capture the gui of the first pc.So pc2 can display/record pc1 screen with VNC, like with teamviewer. I want my qt app to run on pc2 and also record the screen of pc1.
thank you @mrjj
-
@LeLev
Ah, ok, so you did mean VNC sort of way.
Well such tool exists
https://www.tightvnc.com/rfbplayer.phpHowever its not easy to rerecreate using a Qt app as you would have to to understand its protocol.
There does exists libs to use
https://libvnc.github.io/However, can we talk about the goal of this ?
the other 3rd party GUI is runnig on some pc and you want to record a video of it running?
what will it be doing ? -
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
-
-
@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.
-
@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 -
@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 ?
-
@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. -
@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. -
-
No worries ;-)
-
@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.