mpv-player / mpv-player/mpv

add support for additional unit points (pt) for --autofit and -–geometry

Open
#5,688 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core:option-param-conf core:video meta:feature-request
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

it would be nice if we could add another unit points, besides percentage, to the autofit and geometry option. currently everything is unitless and interpreted as pixels. it would be helpful for high hidpi resolutions. currently --hidpi-window-scale decides how the unitless values are being treated. making those option a bit more explicit will avoid problems like #4218.

to avoid backwards incompatibility, anything unitless should be treated as pixel. additionally i don't think pixels and points should be mixed within the option. so if mixed either only the first unit should be treated as right or we only add the unit as a suffix at the end.

--geometry=1920ptx1080+100+100 << would treat everything as points
--geometry=1920x1080pt+100pt+100 << would treat everything as pixel
--geometry=1920x1080+100+100pt << or as suffix, everything points
--geometry=1920x1080pt <<same as above

that way we could probably also deprecated the --hidpi-window-scale option.

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

Start by locating the command-line option parsing and handling for --autofit, --geometry, and --hidpi-window-scale. Review the unit and mixed-unit examples in the issue; the work is done when point units are supported without changing the meaning of unitless values, with the mixed-unit behavior decided and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli
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.