Skip to content

Player: allow setting mpv vf property for RTX Auto HDR / VSR support#43

Open
Aztup wants to merge 1 commit intoStremio:mainfrom
Aztup:feat/mpv-vf-filter
Open

Player: allow setting mpv vf property for RTX Auto HDR / VSR support#43
Aztup wants to merge 1 commit intoStremio:mainfrom
Aztup:feat/mpv-vf-filter

Conversation

@Aztup
Copy link
Copy Markdown

@Aztup Aztup commented May 2, 2026

Expose vf property over IPC

This PR adds backend support for updating vf (mpv's video filter chain) from the frontend — enabling things like NVIDIA RTX Auto HDR and RTX VSR (Video Super Resolution) once the corresponding toggles land in stremio-web.

Concretely: adds Vf to the StrProp allowlist in stremio_player::communication so the web UI can send ["mpv-set-prop", ["vf", "..."]] through the existing IPC path. No behavior changes by default.

Example

Once this lands, the web UI can wire up RTX Auto HDR and RTX VSR toggles by sending the matching mpv-set-prop messages. For example, to enable both at once:

// RTX Auto HDR + RTX VSR (NVIDIA RTX 30/40-series, Windows HDR on)
["mpv-set-prop", ["hwdec", "d3d11va"]]
["mpv-set-prop", ["vf",    "d3d11vpp=scaling-mode=nvidia:scale=1:format=x2bgr10:nvidia-true-hdr"]]

Or just RTX VSR (upscaling only, no HDR conversion):

["mpv-set-prop", ["hwdec", "d3d11va"]]
["mpv-set-prop", ["vf",    "d3d11vpp=scaling-mode=nvidia:scale=1"]]

Toggling off:

["mpv-set-prop", ["hwdec", "auto"]]
["mpv-set-prop", ["vf",    ""]]

hwdec and vo were already on the allowlist; vf was the missing piece. The existing vo special-case in player.rs already auto-appends gpu-next (which d3d11vpp requires), so the web UI doesn't need to manage that.

Note: updating the bundled libmpv is required. The current bundle (v0.40.0-465) produces purple frames when the d3d11vpp filter is engaged in embedded mode; this is fixed in mpv v0.41+.


AI was used to assist with this change (research, debugging, and drafting).

@kKaskak
Copy link
Copy Markdown
Member

kKaskak commented May 2, 2026

Ok but needs update in libmpv first

@Aztup
Copy link
Copy Markdown
Author

Aztup commented May 2, 2026

Yea I didn't ship it with this pr because that might be considered unsafe

@kKaskak
Copy link
Copy Markdown
Member

kKaskak commented May 2, 2026

Yea I didn't ship it with this pr because that might be considered unsafe

We are going to upgrade it soon and then merge your pr

@kKaskak kKaskak self-requested a review May 3, 2026 06:31
@kKaskak kKaskak added the feature label May 3, 2026
@kKaskak kKaskak added this to the v5.0.22 milestone May 3, 2026
@kKaskak kKaskak changed the title feat(player): allow setting mpv vf property for RTX Auto HDR / VSR support Player: allow setting mpv vf property for RTX Auto HDR / VSR support May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants