Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 20, 2024

Conversation

guidocella
Copy link
Contributor

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

@guidocella
Copy link
Contributor Author

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

@guidocella guidocella force-pushed the format-fps branch 2 times, most recently from 8d3a5cf to accfa2d Compare May 14, 2024 17:53
Show e.g. "30 fps" instead of "30.000 fps".

Also switch to %.4f for consistency with pretty_print_double().
Copy link

github-actions bot commented May 14, 2024

Download the artifacts for this pull request:

Windows
macOS

@ruihe774
Copy link
Contributor

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
Copy link
Contributor Author

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

@kasper93
Copy link
Contributor

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.

@kasper93 kasper93 merged commit b82d437 into mpv-player:master May 20, 2024
18 checks passed
@guidocella guidocella deleted the format-fps branch May 20, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants