6 comments on “Recording the Screen of the Windows Desktop Using FFmpeg

  1. Dear Jordan,
    this is a great post.

    Is there a way to define portion of screen to be captured.
    Like X,Y starting point, WIDTH and HEIGHT in pixels.
    I woul like to capture a video from windows application running in a form.

    Best regards,

    • I know this is possible on Linux / Unix. I’m not sure about Windows. I will do some investigating.

      — Edit —

      It is probably dependent on the codec / encoder used.

    • I just remembered that I wrote a batch file to do this. You use the “crop” video filter but you will need a 3rd party utility to find the window’s dimensions & position. I’ve used one before but I can’t think of what it was called. Unfortunately, this method only captures a section of the screen so you won’t be able to move the window around.

      The format of the crop video filter is: -vf crop=”w:h:x:y”

      So, if you wanted to capture a window that was 450px by 300px & the upper left-hand corner was located at position 101,115 you would use the filter like this: -vf crop=”450:300:101,115″

      The downfall to using this method is that FFmpeg still processes the entire screen which uses up more memory & system resources. There may be a better way to do it. Here is a reference video for how to achieve what you want on a Linux system. It may help: https://www.youtube.com/watch?v=R3elvGxZyTo

  2. Pingback: Screen (and Audio) capture with Ffmpeg, windows 7 command line How To | oNym

  3. Pingback: Recording the Screen of an X11 (Unix/Linux/BSD) Desktop Using FFmpeg | AntumDeluge

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s