Gentoo Archives: gentoo-user

From: wabe <wabenbau@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] OT: Avi-player diplaying the current frame counter while playing ?
Date: Fri, 26 May 2017 00:30:04
Message-Id: 20170526022923.03ee0d05@hal9000.localdomain
In Reply to: [gentoo-user] OT: Avi-player diplaying the current frame counter while playing ? by tuxic@posteo.de
1 tuxic@××××××.de wrote:
2
3 > Hi,
4 >
5 > currentlu I am playing around with Blender animations.
6 >
7 > To sync certain movements of objects to other objects
8 > I need the exact frame number, at which "something
9 > happens" ;)
10 >
11 > The clips are of the avi-format but they are of non
12 > standard resultions. MPlayer does not play them
13 > ("no audio found" and that's it) but mpv has no
14 > problem with them.
15 > But mpv only prints the perceantage of how much
16 > is played already (I cant convice mpv otherwise...)
17 >
18 > Is there a way to instruct mpv to print the current
19 > frame count while playing?
20
21 I read the mpv man page and found a solution.
22
23
24 Create a file ~/.mpv/input.conf with the content
25
26 i show-text ${estimated-frame-number}
27
28 When playing a video you can now press the i-key to see the
29 current framenumber.
30
31 But manpage says about the estimated-frame-number property:
32 "This is only an estimate. (It's computed from two unreliable
33 quantities: fps and possibly rounded timestamps.)
34
35 I've tested it with some videos that I recorded with my
36 smartphone and it seemed that the printed frame number was
37 always correct.
38
39
40 Another thing that it maybe useful:
41
42 If you start mpv from command line with these two options
43
44 --osd-level=3 --osd-fractions=yes
45
46 then the OSD as well as the console output shows you the
47 current timestamp with milliseconds.
48
49 If you don't wanna start mpv from command line then you can
50 also add these two options to ~/.mpv/config
51 If you do this you need a line for every option and you may
52 not include the double hyphens.
53
54
55 Btw.: If you press the . key while playing a video, mpv will
56 switch to single frame mode. Every time you press this key
57 again, mpv shows the next frame.
58 You can use the space bar to continue/pause the video.
59
60 --
61 Regards
62 wabe

Replies