mpv-player / mpv-player/mpv

Libmpv hwdec uses dxva2-copy instead of dxva2

Open
#6,386 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core:libmpv hwdec:dxva os:win
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

mpv version and platform

0.29.1 windows 10x64

Reproduction steps

Run the SDL example from https://github.com/mpv-player/mpv-examples/blob/master/libmpv/sdl/main.c

When I add
mpv_set_option_string(mpv, "hwdec", "dxva2");

mpv_get_property_string(mpv, "hwdec-current") says its using dxva2-copy which uses more cpu then dxva2 (zero copy)

I tried adding

mpv_set_option_string(mpv, "gpu-context", "angle");
mpv_set_option_string(mpv, "vd-lavc-dr", "yes");

but still shows dxva2-copy

Expected behavior

To use dxva2 hwdec

Actual behavior

Uses dxva2-copy

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 with the libmpv SDL example in libmpv/sdl/main.c and the hwdec, gpu-context, and vd-lavc-dr options shown in the report. Trace why requesting dxva2 results in dxva2-copy, then verify the behavior through mpv_get_property_string(mpv, "hwdec-current"). Done means the example can request dxva2 and reports dxva2 rather than dxva2-copy.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop
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.