mpv-player / mpv-player/mpv

Frames getting corrupted on linux when using vaapi-copy

Open
#9,383 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

This is an issue I have had since december 2020, I have not reported before because I lacked the internet to do it so here is the problem, when using mpv with svp on wayland or x11 (almost never on x11) the frames get corrupted, this only happens with vaapi (or better said vaapi-copy since svp downloads the frames from gpu memory) this does not happen when hwdec=no
But that's not it, when using gpu-api=vulkan and using shaders the thing gets worse, on x11 the black bar covers half of the screen on a Z pattern while on wayland it covers the full screen like if it was a black frame, it happens ~ 10 seconds on x11 and ~1 second on wayland (when it stars, sometimes the video can start normally without any sympthoms) so it almost like the screen is turning on and off every frame. The vulkan blinking issue happens no matter the hwdec setting and sometimes con even that the screen stays black for more than 2 seconds. Does anyone knows why this is happening? here is a screenshot of the 1st problem given that the second would be only a black screen
frame corrupted

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 corruption with mpv and SVP using vaapi-copy on Wayland and X11, then compare it with hwdec=no and the reported gpu-api=vulkan shader case. Use the screenshot and timing differences to narrow down the affected rendering path; done means the corrupted frames and black-screen blinking no longer occur in these configurations.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
computer-graphics, desktop, operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.