Capture some portion of Windows screen

Examples and samples for those who develop software with FFmpeg.
Post Reply
Posts: 3
Joined: Tue Feb 17, 2015 8:55 pm

Capture some portion of Windows screen

Post by harshalpatel » Tue Feb 17, 2015 11:16 pm


I am using static ffmpeg version 2.5.2 for windows to capture the screen using screen capture recorder. Here I am using Directshow input device to capture the screen.

My ffmpeg command line:
ffmpeg -f dshow -i video="screen-capture-recorder" -f rawvideo -pix_fmt yuv420p -r 30 -t 10 screen-capture.yuv
using this command line, ffmpeg is able to capture the whole screen.

But when I tried adding size parameter (-video_size) to capture only certain portion of the screen, then ffmpeg shows:
could not set video options
video=screen-capture-recorder : Input/Output error

Is there any way to tell ffmpeg to capture some portion of the screen rather than capturing the whole screen in Windows?

Thank you,
Harshal Patel

Posts: 1876
Joined: Fri Aug 05, 2011 9:56 pm

Re: Capture some portion of Windows screen

Post by rogerdpack » Tue Feb 24, 2015 12:57 am

I think it's a bug, could you file a github trac on screen-capture-recorder for me on it?

Post Reply