mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
26.89k stars 2.84k forks source link

select.lua: strip trailing zeros from FPS values #14144

Closed guidocella closed 2 months ago

guidocella commented 2 months ago

Show e.g. "30 fps" instead of "30.000 fps".

guidocella commented 2 months ago

I'm not sure if 3 decimal digits is too many here.

github-actions[bot] commented 2 months ago

Download the artifacts for this pull request:

Windows * [mpv-i686-w64-mingw32](https://nightly.link/mpv-player/mpv/actions/artifacts/1502257960.zip) * [mpv-x86_64-w64-mingw32](https://nightly.link/mpv-player/mpv/actions/artifacts/1502258336.zip) * [mpv-x86_64-windows-msvc](https://nightly.link/mpv-player/mpv/actions/artifacts/1502297482.zip)
macOS * [mpv-macos-14-arm](https://nightly.link/mpv-player/mpv/actions/artifacts/1502253910.zip) * [mpv-macos-13-intel](https://nightly.link/mpv-player/mpv/actions/artifacts/1502255282.zip) * [mpv-macos-12-intel](https://nightly.link/mpv-player/mpv/actions/artifacts/1502261642.zip)
ruihe774 commented 2 months ago

Why? IMO

30.000 fps
29.970 fps
23.976 fps

look better than

30 fps
29.97 fps
23.976 fps

The former representation is commonly used for these frame rate values.

guidocella commented 2 months ago

I think the latter looks better and is consistent with mp.get_property_osd.

kasper93 commented 2 months ago

Arguably when we are displaying values together in one table like output they should have the same precision. Although I doubt there are many cases where fps will differ in the same file.