So I don’t use nnn but I’ve added kitty support to mpv a while ago and I’m using it in a TUI moderation app for my file hoster 0x0.st, so I thought you might be interested in this as an alternative to XEmbed.
In short, with the “buffered” options of its sixel/kitty video outputs, mpv can run “embedded” in other TUI applications to provide video previews. In my app, I’m also using it for images, whether from files or in-memory streams (such as PDF previews from MuPDF). It works well over SSH (provided there is enough network bandwidth—ssh -C helps) and does not require synchronization of terminal output (since its writes are atomic).
So I don’t use nnn but I’ve added kitty support to mpv a while ago and I’m using it in a TUI moderation app for my file hoster 0x0.st, so I thought you might be interested in this as an alternative to XEmbed.
In short, with the “buffered” options of its sixel/kitty video outputs, mpv can run “embedded” in other TUI applications to provide video previews. In my app, I’m also using it for images, whether from files or in-memory streams (such as PDF previews from MuPDF). It works well over SSH (provided there is enough network bandwidth—
ssh -Chelps) and does not require synchronization of terminal output (since its writes are atomic).