Since I do a lot of non-focused BS over the day I want to find out how much of it I actually do. Therefore I want to record my screen and finally or maybe directly make a time lapse of it. That's my X problem. My current Y problem is that I can't even record a simple screen cast without a time lapse on my MacBook with the recent macOS.

ffmpeg -f avfoundation -i 1 -framerate 10 -capture_cursor -capture_mouse_clicks -pixel_format 0rgb -t 60 ~/Desktop/screen.mp4 


ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple clang version 11.0.3 (clang-1103.0.32.59)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_3 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang 

...Removed irrelevent bits

[AVFoundation input device @ 0x7fd835c15ec0] Configuration of video device failed, falling back to default.
[avfoundation @ 0x7fd83600c400] Selected pixel format (yuv420p) is not supported by the input device.
[avfoundation @ 0x7fd83600c400] Supported pixel formats:
[avfoundation @ 0x7fd83600c400]   uyvy422
[avfoundation @ 0x7fd83600c400]   yuyv422
[avfoundation @ 0x7fd83600c400]   nv12
[avfoundation @ 0x7fd83600c400]   0rgb
[avfoundation @ 0x7fd83600c400]   bgr0
[avfoundation @ 0x7fd83600c400] Overriding selected pixel format to use uyvy422 instead.
[avfoundation @ 0x7fd83600c400] Stream #0: not enough frames to estimate rate; consider increasing probesize
[mp4 @ 0x7fd837809200] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2
[libx264 @ 0x7fd837819a00] MB rate (20340000000) > level limit (16711680)
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
More than 1000 frames duplicated
Received > 3 system signals, hard exiting

To me this looks like ffmpeg ignores the arguments in the command line. What is the problem?

1 Answer 1


To me this looks like ffmpeg ignores the arguments in the command line. What is the problem?

The flags capture_cursor and capture_mouse_clicks are boolean and defaulted to "0"; set them to "1" and put them before the first input.

The format that you want to use for ffmpeg goes like this:

% ffmpeg [input1 flags] -i input1 \
  [input2 flags] -i input2 \ 
  [inputN flags] -i inputN \
  [output1 flags] output1 \
  [output2 flags] output2

So, in this case, the -capture_cursor 1 and -capture_mouse_clicks 1 must come before the first input (-i).

As for the errors, The frame rate is too high for the muxer that you're using. Just go with something simple:

% ffmpeg -capture_cursor 1 -capture_mouse_clicks 1 -f avfoundation -i "1" -r 10 -s 1280x720  -t 20 ~/Desktop/screen.mkv

The above will capture the screen at a 1280x720 resolution for 20 seconds and capture both the cursor and the mouse clicks.

  • Thank you with this line recording works fine, although I still get the error Configuration of video device failed, falling back to default. Could you give me a hint on how to make a timelapse? -framerate 1 on the input does not really work. (I thought forcing in input to a smaller value than the output would accelerate the video). Another option is applying a filter but this is really killing my cpu. Therefore not usable for a background task. May 9, 2020 at 22:12
  • The issue you're having with pixel formats is that you're using a 12 bit format on a desktop that obviously has much more depth. Why is this necessary? Just record the screen at a default pixel format.
    – Allan
    May 10, 2020 at 14:34
  • Regarding time lapse - the command you entered will record your desktop. Setting the frames per second will only affect the quality of the video. To make a time lapse, you have to take individual images every X number of seconds and then combine those images into a move. That's a completely different command and question; it out of scope for this one.
    – Allan
    May 10, 2020 at 14:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .