Capture Windows screen with ffmpeg

后端 未结 7 1433
心在旅途
心在旅途 2021-01-30 01:06

The ffmpeg is cross-platform and very powerful software to handle video/audio or to stream it. On Linux ffmpeg can capture X11 screen with a command below:

ffmpe         


        
7条回答
  •  再見小時候
    2021-01-30 01:32

    Use the built-in GDI screengrabber (no install needed) like this :

    ffmpeg -f gdigrab -framerate 10 -i desktop [output]
    

    This will capture ALL your displays as one big contiguous display.

    If you want to limit to a region, and show the area being grabbed:

    ffmpeg -f gdigrab -framerate ntsc -offset_x 10 -offset_y 20 -video_size 640x480 \
    -show_region 1 -i desktop [output]
    

    To grab the contents of the window named "Calculator":

    ffmpeg -f gdigrab -framerate 25 -i title=Calculator [output]
    

    I found that framerate 10 suits screen capture well (you can change it).

    I have encoded to both files and streaming outputs and it works quite well.

提交回复
热议问题