I have a 15-inch 2017 MacBook Pro running Mac OS X 10.13 (High Sierra):
Image may be NSFW.
Clik here to view.
The default display supports screen resolutions up to
2880x1800
, despite the maximum resolution selectable via the standard UI is limited to 1920x1200
(see this question):
Image may be NSFW.
Clik here to view.
Now, I'm trying to capture a full-screen recording via ffmpeg
, using the avfoundation
device, in full resolution (i. e. w/o any sub-sampling):
ffmpeg -y -v error -hide_banner -f avfoundation -i 1:none -threads 0 -f mp4 -vcodec mpeg4 -r 25/1 -qscale:v 1 output.mp4
Strangely, when the screen resolution varies between 1024x640
and 1920x1200
(i. e. is selectable via the "scaled list" in the Mac OS X preferences), the size of the resulting video raster is always a quadruple of the screen resolution:
1024x640
→2048x1280
- ...
1920x1200
→3840x2400
Image may be NSFW.
Clik here to view.
If, on the other hand, I set the screen resolution to the maximum of 2880x1800
using the screenresolution
utility, the size of ffmpeg
output will be identical to the screen resolution.
In both cases, the -video_size
option will be ignored by ffmpeg
.
The above is only true for the built-in display: for any external displays, screen resolution and captured video resolution are always the same, regardless of the scale level.
Questions:
- Why does
ffmpeg
(or, rather, theavfoundation
input device) exhibit such inconsistencies? - How do I force
ffmpeg
to always use the current display resolution when capturing the screen? I would rather not enable sub-sampling (-vf scale=...
) to affect the resulting raster size.