mpv-player / mpv-player/mpv

framerate on variable refresh rate displays fluctuates and causes flickering

Open
#14,075 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

os:linux
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

Important Information

Provide following Information:

  • mpv 0.38.0
  • Void Linux kernel version 6.6.30
  • xbps-install
  • sway 1.9
  • AMD Polaris 22 XT [Radeon RX Vega M GH], normal kernel driver, Mesa 24.0.5
Reproduction steps

mpv --no-config --video-sync=audio --log-file=output.txt 'https://www.youtube.com/watch?v=oaCfKda82nA'

Expected behavior

The framerate should be very close to 60Hz and vary very little. The screen should not flicker.

Actual behavior

Using drm_monitor I measured the timing when the vsyncs actually occur. Sway allows to enable/disable VRR using swaymsg output * adaptive_sync on|off. In
f one can see that with VRR off, the framerate is stable at 120Hz, as expected. With VRR on it fluctuates around 60Hz.

Zooming in f_zoomed one can see the oscillations have an amplitude of around 2.5Hz. The exact amount varies with the video, but the phenomenon can be reproduced reliably. This fluctuation does not sound like much, but can be clearly seen on screen as flickering, especially in darker areas.

Log file

output.txt

Sample files

Occurs on any video I happened to look at, but the measurement was taken on this video.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the provided mpv command on a sway display, toggling adaptive_sync and comparing timing with drm_monitor. Use output.txt and the reported measurements to trace the variable-refresh-rate timing behavior; done means playback remains near the expected refresh rate without visible flicker.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.