mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
26.69k stars 2.83k forks source link

Taskbar progress indicator does not appear at the very start of video playback #14282

Closed raziel711 closed 4 weeks ago

raziel711 commented 1 month ago

mpv Information

mpv v0.38.0-372-g481e4984 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on May 31 2024 12:18:20
libplacebo version: v7.349.0 (v6.338.0-140-g50ddb03-dirty)
FFmpeg version: N-115464-g249c66bb2
FFmpeg library versions:
   libavutil       59.20.100
   libavcodec      61.5.104
   libavformat     61.3.104
   libswscale      8.2.100
   libavfilter     10.2.102
   libswresample   5.2.100

Other Information

Reproduction Steps

When using taskbar-progress, the taskbar progress indicator does not appear at the very start of video playback. For example, when using a video with a duration of 23:41 played with mpv --no-config, at six seconds the progress indicator is not visible on the taskbar: mpv_FiR97HZTgh

It only appears starting at seven seconds: mpv_qX64fZPxRm

For reference, this is at the six second mark with MPC-HC; the indicator shows up from the start of the video: mpc-hc64_bPmxDzaKPi

I've tested videos with various lengths, and it seems like the progress indicator does not appear until the video reaches around 0.5% of the total duration. I'm sure that behavior is probably a part of Windows itself and can't be changed; however, when mpv is paused, the indicator is visible even at the very beginning of the video.

For instance, here is an example from the same video at two seconds: mpv_nujMHWZMja

Would it be possible to make it so that the behavior for the progress indicator matches when the video is playing and when it is paused?

Expected Behavior

The taskbar progress indicator should appear from the start of the video while it is playing.

Actual Behavior

While the video is playing, the progress indicator does not appear on the taskbar until the video reaches ~0.5% of its total duration. The indicator only appears before the 0.5% point if the video is paused.

Log File

log.txt

Sample Files

Any sufficiently long video file should work.

I carefully read all instruction and confirm that I did the following:

kasper93 commented 1 month ago

the progress indicator does not appear on the taskbar until the video reaches ~0.5% of its total duration.

Yes, that's correct assessment. The position send to taskbar is rounded to integer % value and 0 is interpreted as no progress by Windows, so only after 0.5% it starts showing anything. There is no reason to do that, ITaskbarList3 api takes ULONGLONG, so the progress can be more fine grained. I will update that when I have time.

EDIT: Will be fixed by https://github.com/mpv-player/mpv/pull/14283