`vaapi-copy` is unavailable when `vaapi` support is enabled
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
I see a rather contradictory behavior: when vaapi feature is enabled, mpv for some reason loses ability to fall back to vaapi-copy.
The thing is, I have some newer AMD GPUs which can use vaapi, but also have older GPUs which don't support drm modifiers and only able to use vaapi-copy. So I want to use vaapi when possible and fall back to vaapi-copy, but I can't make them both working in the same mpv build.
When vaapi feature is disabled, vaapi-copy works just fine:
[ 0.018][v][vd] Looking at hwdec h264-vaapi-copy...
[ 0.018][d][ffmpeg] VAAPI: Trying to use DRM render node for device 0.
[ 0.019][d][ffmpeg] VAAPI: libva: VA-API version 1.23.0
[ 0.019][d][ffmpeg] VAAPI: libva: Trying to open /usr/lib/dri/radeonsi_drv_video.so
[ 0.019][d][ffmpeg] VAAPI: libva: Found init function __vaDriverInit_1_23
[ 0.020][d][ffmpeg] VAAPI: libva: va_openDriver() returns 0
[ 0.020][d][ffmpeg] VAAPI: Initialised VAAPI connection: version 1.23
[ 0.020][d][ffmpeg] VAAPI: VAAPI driver: Mesa Gallium driver 26.0.3 for AMD Radeon RX 7700 XT (radeonsi, navi32, ACO, DRM 3.64, 7.0.0-rc6).
[ 0.020][d][ffmpeg] VAAPI: Driver not found in known nonstandard list, using standard behaviour.
[ 0.020][v][vd] Trying hardware decoding via h264-vaapi-copy.
But when when vaapi feature is enabled, vaapi-copy fails:
[ 0.018][v][vd] Looking at hwdec h264-vaapi-copy...
[ 0.018][v][vd] Could not create device.
[ 0.018][v][vd] Using software decoding.
Attached both full logs below.
mpv Information
mpv v0.41.0 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.360.1
FFmpeg version: 8.1
FFmpeg library versions:
libavcodec 62.28.100
libavfilter 11.14.100
libavformat 62.12.100
libavutil 60.26.100
libswresample 6.3.100
libswscale 9.5.100
Reproduction Steps
Build mpv with vaapi support enabled.
Expected Behavior
vaapi-copy should work.
Actual Behavior
vaapi-copy doesn't work.
Log File
vaapi-disabled.log
vaapi-enabled.log
Sample Files
No response
I carefully read all instruction and confirm that I did the following:
- I tested and confirmed that the issue exists with the latest release version or newer.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the vaapi-disabled.log and vaapi-enabled.log outputs and tracing the build-time vaapi and vaapi-copy hardware-decoding paths. Reproduce the issue by building mpv with vaapi support enabled; the fix is complete when vaapi-copy works while vaapi remains available for compatible GPUs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- cli, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100