mpv-player / mpv-player/mpv

Changing window-scale via commands should keep the video centered

Open
#8,581 19 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

meta:feature-request vo:gpu:opengl vo:gpu:x11
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

Before requesting a new feature make sure it hasn't been requested yet.
https://github.com/mpv-player/mpv/labels/meta%3Afeature-request

Expected behavior of the wanted feature

When I set window-scale using bindings written in input.conf, the video window is not centered after that which is very annoying since I'll always center the window manually after I set window-scale.

There is an issue https://github.com/mpv-player/mpv/issues/3164 with the same feature request, but it is requested for Windows, it was solved by modifying the code of mpv, but only for Windows platform, a feature shouldn't be working only on one platform not on others unless it is impossible or not worth the time.

It is suggested that I should open a new issue at that issue page, so I open this feature request for both macOS and Linux, although I'm only using Linux.

BTW:

  • mpv version
$ mpv -v
mpv 0.33.0-dirty Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
built on UNKNOWN
FFmpeg library versions:
libavutil       56.51.100
libavcodec      58.91.100
libavformat     58.45.100
libswscale      5.7.100
libavfilter     7.85.100
libswresample   3.7.100
FFmpeg version: n4.3.1
  • Linux Distribution and Version
$ uname -a
Linux chz 5.9.16-1-MANJARO #1 SMP PREEMPT Mon Dec 21 22:00:46 UTC 2020 x86_64 GNU/Linux

Manjaro-Linux Cinnamon DE
  • Source of the mpv binary
Manjaro repo
  • If known which version of mpv introduced the problem
  • Window Manager and version
DE: Cinnamon 4.8.6
WM: muffin 4.8.1
  • GPU driver and version
Nvidia
linux59-nvidia 460.39
Alternative behavior of the wanted feature
Log file

steps:

  • mpv --log-file=~/mpv2.log file.mpv`
  • Alt+3 to window-scale 1.5
  • Alt+1 to window-scale 0.5
  • q to quit

mpv2.log

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no source file or test. Start by reproducing the reported input.conf steps with window-scale 1.5 and 0.5 on Linux or macOS, then trace the window-scale command and platform window-management paths. Done means changing window-scale through bindings leaves the video window centered.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux, macos
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.