[MPlayer-users] Progress bar chart

Alexander Strasser eclipse7 at gmx.net
Sat May 11 15:49:21 EEST 2019


Hi all!

On 2019-05-11 00:21 +0200, Reimar Döffinger wrote:
> On Fri, May 10, 2019 at 01:04:11PM -0400, Elijah wrote:
> > You know the bar chart of how far through a video you are that overlays
> > when you use the skip forward / skip backward controls? How can I get
> > that to display without skipping around? Ideally, it would display every
> > time the video is paused.
> >
> > I'm currently using:
> > MPlayer 1.2.1 (Debian), built with gcc-5.4.0 (C) 2000-2016 MPlayer Team
> > but could be persuaded to change.
>
> Check the documentation for keybinds/slave mode commands.
> osd_show_progression
> You can bind that to a key, maybe can even bind it together
> with the pause functionality to the same key, try it out
> (I don't remember all the details of what is possible myself)

I fail to see how one could bind multiple commands or a command list
to a single key. I tried to bind osd_show_progression to a different
key so one could use it while paused, but neither with pausing_keep
nor pausing_keep_force did it end up well.

This is a rather delicate problem anyway because pausing is involved.
E.g. if you want the OSD to show the play state too, it might end
up showing you "Playing" rendered when the video is paused or it
shows you "Paused" after the video is unpaused.

I have hacked up this late last night, which tends to work (bar only):

--- a/mplayer.c
+++ b/mplayer.c
@@ -3754,6 +3754,10 @@ goto_enable_cache:
         while (!mpctx->eof) {
             float aq_sleep_time = 0;

+if (mpctx->osd_function == OSD_PAUSE) {
+    set_osd_bar(0, "Position", 0, 100, demuxer_get_percent_pos(mpctx->demuxer));
+}
+
             if (dvd_last_chapter > 0) {
                 int cur_chapter = demuxer_get_current_chapter(mpctx->demuxer);
                 if (cur_chapter != -1 && cur_chapter + 1 > dvd_last_chapter)


In general I think this is an interesting request, I would like to
get it right somehow and maybe even make it the default behaviour.
It's just annoying if one has to unpause playback just for seeing the
position and pause it again...


  Alexander


More information about the MPlayer-users mailing list