Capture Windows screen with ffmpeg

后端 未结 7 1445
心在旅途
心在旅途 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:34

    This can be done without using x11grab/xcbgrab/gdigrab with help of the below commands in linux .

    To record a video,

     ffmpeg -f x11grab  -s 1366x768 -i :0.0 -r 25 -vcodec libx264  output.mkv
    

    To record a frame,

    ./ffmpeg -f fbdev -framerate 1 -i /dev/fb1 -frames:v 1 screenshot3.jpeg
    

提交回复
热议问题