0

How can I create video of specific window on Windows operating system using Qt? Specific window can be any opened GUI program like Chrome, Notepad etc

QScreen *screen = QGuiApplication::primaryScreen();
if (const QWindow *window = windowHandle())
    screen = window->screen();

pixmap = screen->grabWindow(0);

Using this approach by continuously taking screenshot I can record entire desktop but How can I record specific window? For which I need to know window id of that specific window first.

Alok
  • 7,734
  • 8
  • 55
  • 100
  • 1
    you need to use FFmpeg or something like this – Parisa.H.R Aug 22 '21 at 11:03
  • This is way too broad of a topic. Like, do you want to continuously take screenshots at an arbitrary interval? Do you want to record changes whenever they happen? Do you want to store the raw, uncompressed data? Do you want to compress the data? Lossy or lossless? – IInspectable Aug 22 '21 at 11:11

0 Answers0