Seems like FreeBSD supports the VT management API that mpv expects but with declarations in the sys/consio.h header instead of sys/vt.h. With this patch playing videos directly on the console (when DRM/KMS is supported) works on my computer. $ mpv -vo gpu --gpu-context=drm <video-file> Switching VT while it's running (even if paused) unfortunately doesn't work very well (and crashes the X server if you switch to it). Still pretty neat that it does play the video though. /usr/ports/multimedia/mpv/files/patch-drm-vt-consio: --- wscript.orig 2018-10-02 19:03:41 UTC +++ wscript @@ -273,7 +273,7 @@ iconv support use --disable-iconv.", }, { 'name': 'vt.h', 'desc': 'vt.h', - 'func': check_statement(['sys/vt.h', 'sys/ioctl.h'], + 'func': check_statement(['sys/consio.h', 'sys/ioctl.h'], 'int m; ioctl(0, VT_GETMODE, &m)'), }, { 'name': 'gbm.h', --- video/out/drm_common.c.orig 2018-10-02 19:03:41 UTC +++ video/out/drm_common.c @@ -21,7 +21,7 @@ #include <sys/ioctl.h> #include <poll.h> #include <sys/stat.h> -#include <sys/vt.h> +#include <sys/consio.h> #include <unistd.h> #include "drm_common.h"
A commit references this bug: Author: cpm Date: Mon Jul 8 14:24:23 UTC 2019 New revision: 506228 URL: https://svnweb.freebsd.org/changeset/ports/506228 Log: multimedia/mpv: enable DRM console output support Allow Mpv to play videos directly on the console when DRM/KMS is supported (e.g., mpv -vo gpu --gpu-context=drm <video-file>) PR: 238944 Submitted by: sigsys@gmail.com Changes: head/multimedia/mpv/Makefile
Committed, thanks!