Fit any-aspect camera into its tile without cropping

Add --keepaspect-window=no so mpv stops reshaping its window to the
video aspect (which pushed a 4:3 camera below its tile and hid the
bottom behind the neighbour). Combined with keepaspect=yes the video
is letterboxed to fit the tile for any camera type.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Levi Woodard
2026-07-01 19:54:33 -05:00
parent 477246d574
commit 9300266f5c

View File

@@ -67,11 +67,17 @@ func (p *Player) args() []string {
"--cursor-autohide=always", "--cursor-autohide=always",
"--no-border", "--no-border",
"--fullscreen=no", // we tile via the compositor, not fullscreen "--fullscreen=no", // we tile via the compositor, not fullscreen
// Keep aspect (letterbox) inside the tile; the compositor owns the // Fit any camera into its tile regardless of the camera's aspect:
// window size, not the video. mpv still resizes its window to the // * keepaspect=yes → letterbox the video, never crop/stretch
// video resolution on load (and mpv 0.35 lacks the flag to disable // * keepaspect-window=no → do NOT reshape the window to the video's
// that), so the daemon re-asserts each tile's geometry on a timer. // aspect; accept the tile size the compositor assigns. Without this
// mpv grows the window to e.g. 4:3 and the overflow is hidden under
// the neighbouring tile ("bottom cut off").
// mpv still resizes the window to the video's pixel size on load (mpv
// 0.35 lacks --auto-window-resize), so the daemon re-asserts each
// tile's geometry on a timer.
"--keepaspect=yes", "--keepaspect=yes",
"--keepaspect-window=no",
"--title=" + p.Title(), "--title=" + p.Title(),
"--input-ipc-server=" + p.ipcPath, "--input-ipc-server=" + p.ipcPath,
"--hwdec=" + p.cfg.HWDec, "--hwdec=" + p.cfg.HWDec,