mpv-player / mpv-player/mpv

Hardware decoding + Vulkan cause purple/blue screen when playing 4K

Open
#14,934 13 comments 4 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

mpv Information
mpv 0.38.0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on Jan  1 1980 00:00:00
libplacebo version: v7.349.0
FFmpeg version: 6.1.2
FFmpeg library versions:
   libavutil       58.29.100
   libavcodec      60.31.102
   libavformat     60.16.100
   libswscale      7.5.100
   libavfilter     9.12.100
   libswresample   4.12.100
Other Information
- Linux version: NixOS 24.11 (Vicuna)
- Kernel Version: Linux nixos 6.11.0 #1-NixOS SMP PREEMPT_DYNAMIC Sun Sep 15 14:57:56 UTC 2024 x86_64 GNU/Linux
- GPU Model: 03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] [1002:73df] (rev c0)
- Mesa/GPU Driver Version: 4.6 (Compatibility Profile) Mesa 24.2.2
- Window Manager and Version:
- Source mpv: Nixpkgs
- Introduced in version:
Reproduction Steps

Playing videos larger than 2560x2560 will result in a purple screen:

2024-09-27_10-46

I have found the option that causes the problem. The anomaly occurs when I enable both hwdec=auto-safe and gpu-api=vulkan. It does not occur if I disable hardware decoding, or use opengl as API.

The console will have a lot of repeated logs, as follows:

[vo/gpu-next/libplacebo] Requested image size 3840x2160x0 exceeds the maximum allowed dimensions 2560x2560x1 for vulkan image format 9
[vo/gpu-next/vaapi] mapping VAAPI EGL image failed
[vo/gpu-next] Mapping hardware decoded surface failed.
[vo/gpu-next/libplacebo] Could not render image for frame mixing.. disabling!
Expected Behavior

Play videos correctly and display OSC/OSD correctly

Actual Behavior

Purple screen, OSC/OSD cannot be displayed

Log File

output.txt

Sample Files

No response

I carefully read all instruction and confirm that I did the following:
  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.

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

Reproduce with hardware decoding and Vulkan enabled on a video larger than 2560x2560, using the exact conditions from the issue. Start with output.txt and the repeated gpu-next/libplacebo and vaapi messages, then compare against hardware decoding disabled or the OpenGL API. Done means 4K playback and OSC/OSD render correctly without the mapping or image-size errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux, nixos
Domain
computer-graphics, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.