Support Kitty graphics shared-memory transmission (t=s)
Kitty graphics playback works with mpv's default direct transmission, but shared-memory transmission does not work inside Zellij.
The Kitty graphics parser in Zellij 0.45.0 explicitly rejects t=s with ENOTSUPPORTED: "shared memory transfer is not supported".
Environment
- macOS
- Zellij 0.45.0
- Ghostty 1.3.1
- mpv v0.41.0-1049-g0b7ed670f
Steps to reproduce
Inside Zellij, using the same video:
Run the default direct-transmission mode:
mpv --no-config --vo=kitty --really-quiet video.mp4Video displays successfully.
Enable shared-memory transmission:
mpv --no-config --vo=kitty --vo-kitty-use-shm=yes --really-quiet video.mp4Video does not display.
Expected behavior
Zellij accepts Kitty t=s transmissions, reads the referenced POSIX shared-memory object, and displays the image through its existing Kitty graphics pipeline.
Motivation
Shared-memory transmission avoids sending the full Base64-encoded pixel data through the application's PTY. Supporting incoming t=s would improve compatibility with mpv and reduce the amount of data sent from mpv to Zellij.
I understand that Zellij currently re-emits images to the host terminal as direct RGBA data, so incoming shared-memory support alone would not eliminate the host terminal's parsing overhead.
A possible follow-up optimization would be shared-memory transmission from Zellij to a supporting local host terminal.
Relevant code and specification
- Zellij 0.45.0 Kitty graphics parser explicitly rejects
t=s. - Zellij 0.45.0 host-terminal output re-emits images using direct RGBA transmission.
- Kitty graphics protocol: shared memory.
- mpv Kitty output implementation.
Source: zellij-org/zellij