From c3fcb10fdbff1f1f4d58adfe30fd8802f35d86c5 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Mon, 16 Oct 2017 05:32:07 +0200 Subject: [PATCH] Updated mpsync FPS retrieval for new mpv version. --- mpsync | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mpsync b/mpsync index 62008f0..cd8b08c 100755 --- a/mpsync +++ b/mpsync @@ -98,6 +98,7 @@ class target(object): self.sk.connect(path) self.obuf = bytearray() self.ibuf = bytearray() + self.fps = self.getprop("container-fps") def write(self, data): self.obuf.extend(data) @@ -246,7 +247,7 @@ def main(tty): elif c == 'S': offsets = getoffsets() for tgt, off in zip(targets, offsets): - tgt.runcmd("show_text", "Offset: %f" % off) + tgt.runcmd("show_text", "Offset: %i" % round(off * tgt.fps)) elif c == '.': runcmd("frame_step") paused = True -- 2.11.0