nogui  openbsd  freebsd  mpv 

2024-04-20

openbsd typewriter

No GUI | mpv

no xorg, no wayland, no friends

The following is tested on OpenBSD and FreeBSD without an X server, neither of which use the linuxian /dev/fb device to display graphical output in the terminal.

mpv in tty

basics

play only audio

$ mpv --no-video file

render video in ascii (straight inside the console)

$ mpv --vo=tct "video file"

Using sdl/drm drivers

The following will play the video file and occupy the entire screen. It's not possible to switch to another tty while mpv is running. Display available drivers for your system by running $ mpv --vo=help and adapt the following appropriately.

$ mpv --vo=sdl "video file"
$ mpv --vo=drm "video file"

display image (on loop, otherwise it will automatically close after a few seconds) and close it with 'q'

$ mpv --vo=sdl --loop "image file"

streaming online content

The following requires you to have yt-dlp installed. In most cases, it comes packaged with mpv already. Use the appropriate video driver for your system (--vo). You don't need to do so, if you're running this under xorg. This will work for things like youtube or twitch. Consult yt-dlp documentation for more options.

Stream a video in the highest available quality

$ mpv --vo=sdl "url"

Stream a video in the worst available quality

$ mpv --vo=sdl --ytdl-format="w" "url"

Stream a video in the closest available quality to 420p, but not higher. You can change the number to whatever you want.

$ mpv --vo=sdl --ytdl-format="bestvideo[height<=?420]+bestaudio[height<=?420]" "url"

Stream just audio from a url

$ mpv --no-video "url"

Stream a video file on a gopher server

$ mpv --vo=sdl "gopher url"

Stream a video in lowest quality from a url and render it in ascii

$ mpv --vo=tct --ytdl-format="w" "url"