Closed mia-0 closed 1 year ago
As far as I see, preview-tui already supports kitty (but I don't see mpv mentioned anywhere). So my understanding is that you're asking to embed an mpv instance inside kitty to do the previews, is that correct?
In any case, this is going to be @luukvbaal's call.
Yeah, somewhat analogous to the XEmbed approach in preview-tabbed. So mpv does the rendering and you just tell it where, relative to the terminal window. It could replace image viewers and e.g. calls to ffmpegthumbnailer.
I won't be looking into this as I'm not a kitty user but a PR is welcome AFAIC. I guess https://github.com/mpv-player/mpv/commit/874e28f4a41a916bb567a882063dd2589e9234e1 can be used for reference.
It also supports sixels and there’s almost no difference between the two as far as usage goes (see e.g. here).
Ah... this requires mpv v0.36
, no wonder I got error no kitty vo. Latest release still v0.35
Right, I forgot that wasn’t actually in any release yet. I’m on a distro that packages git snapshots (as per upstream recommendation)…
I have added this to the tracker as no one is free to pick this up at the moment. Closing accordingly.
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).