How To Record Desktop With FFMPEG
----------------------------------------------------------------
Use built-in GDI screengrabber
You can also use gdigrab as input device to grab video from the Windows screen.
To capture all your displays as one big contiguous display:
ffmpeg -f gdigrab -framerate 30 -i desktop output.mkv
-------------------------------------------------------------------
gdigrab
Win32 GDI-based screen capture device.
This device allows you to capture a region of the display on Windows.
There are two options for the input filename:
desktop
or
title=window_title
The first option will capture the entire desktop, or a fixed region of the desktop. The second option will instead capture the contents of a single window, regardless of its position on the screen.
For example, to grab the entire desktop using ffmpeg:
ffmpeg -f gdigrab -framerate 6 -i desktop out.mpg
Grab a 640x480 region at position 10,20:
ffmpeg -f gdigrab -framerate 6 -offset_x 10 -offset_y 20 -video_size vga -i desktop out.mpg
Grab the contents of the window named "Calculator"
ffmpeg -f gdigrab -framerate 6 -i title=Calculator out.mpg