You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(linux)!: use experimental renderer by default
This commit introduces an experimental offscreen renderer for Linux
that decouples UI rendering from video rendering as much as possible to
improve UI responsiveness. The new renderer is enabled by default on
Linux and can be toggled via the MPVQC_LINUX_EXPERIMENTAL_RENDERER
environment variable.
Updated Video Rendering:
- Windows:
unchanged - mpvQC uses winId/HWND embedding as before
- Linux:
Offscreen renderer (experimental) by default. Set
MPVQC_LINUX_EXPERIMENTAL_RENDERER=false to use the old renderer
Technical Differences:
- Legacy renderer: Renders directly into the UI's framebuffer. Without
tweaking other configuration parameters, this has the limitation that
the UI is constrained to the framerate of the video file.
- Offscreen renderer: Uses two additional framebuffers and renders in a
separate thread, independent of the screen's refresh rate:
mpv → _render_fbo → _display_fbo → Qt Quick's FBO → screen
_render_fbo → _display_fbo: pointer swap
_display_fbo → Qt Quick's FBO: blit in render()
Audio Delay Compensation:
The offscreen renderer decouples video rendering from UI framerate,
which means mpv renders frames independently of what's displayed on
screen. This can cause audio desynchronization as the audio continues
at real-time while video frames may be presented at the display's
refresh rate.
To address this, mpvQC now automatically adjusts the audio delay based
on the current monitor's refresh rate. The delay is calculated as the
frame time (1 / refresh_rate) rounded to millisecond precision. The
adjustment updates dynamically when the window moves to a different
monitor or when the refresh rate changes.
Breaking Change:
Users upgrading from previous versions of mpvQC on Linux must update
their mpv settings via Options -> Edit mpv.conf:
- When using the NEW offscreen renderer (default):
Remove any video-timing-offset configuration. The new renderer handles
timing automatically through audio delay compensation based on the
monitor's refresh rate. Having video-timing-offset configured will
cause timing issues.
- When using the OLD legacy renderer
(MPVQC_LINUX_EXPERIMENTAL_RENDERER=false):
Keep or add video-timing-offset=0.016 (or adjust based on your
monitor's refresh rate). The legacy renderer requires this setting
for proper synchronization.
0 commit comments