From 58caf577f1949655e2eeaf3d7c565eedb6ee2805 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 18 Nov 2015 21:21:57 +0100 Subject: [PATCH] player: replace mistimed-frame-count with vsync-ratio on status line I think this is much more informative. Maybe. --- DOCS/man/mpv.rst | 12 +++++++----- player/osd.c | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/DOCS/man/mpv.rst b/DOCS/man/mpv.rst index 1e66d4301a..fda4aa0701 100644 --- a/DOCS/man/mpv.rst +++ b/DOCS/man/mpv.rst @@ -562,11 +562,13 @@ listed. this will indicate a problem. (``total-avsync-change`` property.) - Encoding state in ``{...}``, only shown in encoding mode. - Display sync state. If display sync is active (``display-sync-active`` - property), this shows ``DS: 12/13``, where the first number is the number of - frames where a vsync was intentionally added or removed - (``mistimed-frame-count``), and the second number of estimated number of vsyncs - which took too long (``vo-delayed-frame-count`` property). The latter is a - heuristic, as it's generally not possible to determine this with certainty. + property), this shows ``DS: 2.500/13``, where the first number is average + number of vsyncs per video frame (e.g. 2.5 when playing 24Hz videos on 60Hz + screens), which might jitter if the ratio doesn't round off, or there are + mistimed frames (``vsync-ratio``), and the second number of estimated number + of vsyncs which took too long (``vo-delayed-frame-count`` property). The + latter is a heuristic, as it's generally not possible to determine this with + certainty. - Dropped frames, e.g. ``Dropped: 4``. Shows up only if the count is not 0. Can grow if the video framerate is higher than that of the display, or if video rendering is too slow. Also can be incremented on "hiccups" and when the video diff --git a/player/osd.c b/player/osd.c index e26439432d..353c301942 100644 --- a/player/osd.c +++ b/player/osd.c @@ -235,8 +235,10 @@ static void print_status(struct MPContext *mpctx) // VO stats if (mpctx->d_video) { if (mpctx->display_sync_active) { - saddf(&line, " DS: %d/%"PRId64, mpctx->mistimed_frames_total, + char *r = mp_property_expand_string(mpctx, "${vsync-ratio}"); + saddf(&line, " DS: %s/%"PRId64, r, vo_get_delayed_count(mpctx->video_out)); + talloc_free(r); } int64_t c = vo_get_drop_count(mpctx->video_out); if (c > 0 || mpctx->dropped_frames_total > 0) {