Re: photo/video on tty console with the new VT/framebuffer

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Sat, 20 May 2023 17:49:39 UTC
Alastair Hogge <agh@riseup.net> writes:

> On 2023-05-19 11:04, Ivan Quitschal wrote:
>
>> Hi all
>> 
>> i have a question. searched everywhere and found nothing about.
>> 
>> Is it possible to visualize photos on tty console like we used to on old SYSCONS by using zgv or something?

See https://github.com/mpv-player/mpv/issues/7983

>> Or watching videos with mpv/mplayer + sdl 2.0/openGL or something?
>
> As long as those packages support DRMKMS and does your GPU, you can to a
> degree. I noticed video works for mpv and games/sdl, tho, I cannot get
> input working. I tried the Doom 3 port, and watched movies with mpv all
> from the vty just a couple of months ago.

mpv doesn't call KDSKBMODE ioctl, so input remains under VT control but
not visible due to video showing on top. One can still control mpv via
stdin(4) using a keyboard but keybindings would be limited by termios(4).
For example, Ctrl+S would pause playback after a few seconds instead of
taking a screenshot.

SDL2 probably has a bug. SDL1 uses vgl(3) instead of KDSKBMODE directly.