Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpv sixel/kitty support for preview #1590

Closed
mia-0 opened this issue Feb 17, 2023 · 7 comments · Fixed by #1749
Closed

mpv sixel/kitty support for preview #1590

mia-0 opened this issue Feb 17, 2023 · 7 comments · Fixed by #1749

Comments

@mia-0
Copy link

mia-0 commented Feb 17, 2023

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).

@N-R-K
Copy link
Collaborator

N-R-K commented Feb 18, 2023

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.

@mia-0
Copy link
Author

mia-0 commented Feb 18, 2023

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.

@luukvbaal
Copy link
Collaborator

I won't be looking into this as I'm not a kitty user but a PR is welcome AFAIC. I guess mpv-player/mpv@874e28f can be used for reference.

@mia-0
Copy link
Author

mia-0 commented Feb 19, 2023

It also supports sixels and there’s almost no difference between the two as far as usage goes (see e.g. here).

@kuntau
Copy link
Contributor

kuntau commented Feb 19, 2023

Ah... this requires mpv v0.36, no wonder I got error no kitty vo. Latest release still v0.35

@mia-0
Copy link
Author

mia-0 commented Feb 19, 2023

Right, I forgot that wasn’t actually in any release yet. I’m on a distro that packages git snapshots (as per upstream recommendation)…

@jarun jarun mentioned this issue Apr 23, 2023
9 tasks
@jarun
Copy link
Owner

jarun commented Apr 23, 2023

I have added this to the tracker as no one is free to pick this up at the moment.
Closing accordingly.

@jarun jarun closed this as completed Apr 23, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants