[FFmpeg-user] kmsgrab on Intel 8th generation aka h/w accelerated screen capture

Moritz Barsnick barsnick at gmx.net
Mon Jun 25 12:42:53 EEST 2018


On Mon, Jun 25, 2018 at 09:10:29 +0800, Kai Hendry wrote:
> However since kmsgrab requires CAP_SYS_ADMIN as it points out to its
> friendly documentation
> https://www.ffmpeg.org/ffmpeg-devices.html#kmsgrab I believe I need to
> run it with `sudo`.

Actually, the documentation says: "If you don’t understand what all of
that means, you probably don’t want this." ;-)

My understanding (<- that's a disclaimer ;-)):

CAP_SYS_ADMIN is a Linux capability. Such a capability is something you
(or the system administrator) grants a program. In effect, this
particular capability is somewhat like root permissions, but sudo just
won't suffice anymore, a program *must* have this capability in order
to access DRM (which kmsgrab uses). I consider this unfortunate, that a
program has to be granted general CAP_SYS_ADMIN, but *sigh*.

Here you find an explanation of how to grant such a capability:
https://stackoverflow.com/q/26504457/3974309

Basically:
$ sudo setcap cap_sys_admin+ep /path/to/ffmpeg

Afterwards, run ffmpeg *without* sudo.

Hope this helps,
Moritz


More information about the ffmpeg-user mailing list