mpv-player / mpv-player/mpv

Hardware acceleration (VAAPI) produces red-green video artifacts or on rare occasion due to incorrect use of NV12

Open
#16,674 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

mpv Information
mpv v0.40.0-dirty Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
 built on Jul 29 2025 22:35:55
libplacebo version: v7.351.0
FFmpeg version: n7.1.1
FFmpeg library versions:
   libavcodec      61.19.101
   libavdevice     61.3.100
   libavfilter     10.4.100
   libavformat     61.7.100
   libavutil       59.39.100
   libswresample   5.3.100
   libswscale      8.3.100
Other Information
- Linux version:
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"

- Kernel Version:
Linux Apsida 6.15.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 02 Aug 2025 01:20:06 +0000 x86_64 GNU/Linux

- GPU Model:
2d: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 c5)

- Mesa/GPU Driver Version:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 25.1.7-arch1.1

- Window Manager and Version:
wayland 1.24.0-1 (Arch repo)

- Source of mpv: Arch repo

- Latest known working version: - 

- Issue started after the following happened:
Video playback on specific video recorded on my phone
Reproduction Steps

Video playback on a specific video using VAAPI hardware acceleration causes weird green-red artifacts to show up. Here are some screenshots of both playback with hardware acceleration and not:

VAAPI

Image

Software

Image

Issue happens both with normal mpv execution and with --no-config. Weirdly, this has only happened once. No other video that I have recorded on my phone (that I have played back on my computer) has presented the same issue. I recorded a few videos to test if maybe the format that my camera app records to is incompatible, but all 5 of them had no errors/artifacts with both VAAPI and software decoding.

Expected Behavior

Normal video playback with no artifacts

Normal playback (Software decoding)

Image

Actual Behavior

Green-red lines during playback

VAAPI

Image

Log File

nv12_error.txt

Sample Files

https://www.mediafire.com/file/kvv1171b6278j58/NV12_problem.mkv/file

This is a portion of the original video file (cut with ffmpeg so the video stream is the same) that still presents the same problem. The original video was me recording myself opening a delivery due to the box being in a bad shape, so for obvious reasons, I can't provide the original.

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

Start by reproducing the artifact with the linked NV12_problem.mkv sample and the attached nv12_error.txt log, comparing VAAPI playback with software decoding. Trace the VAAPI/NV12 handling involved in the playback path. Done means the sample plays normally with hardware acceleration without the reported green-red artifacts.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
computer-graphics
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.