@vestra-player/sdk - v1.11.3
    Preparing search index...

    Interface UpscalingState

    What VideoUpscaling.state and VideoUpscaling.set report: whether the upscaler works now and why not, whether this plugin turned it on, and whether the player asked the GPU to upscale.

    requested is as far as the player can see. The player puts the upscaler last in the video filter chain, scaling the video to the area it is shown in; the driver gives no sign that it upscales. On Windows the user must also turn on Super Resolution in the NVIDIA app (System ▸ Video ▸ RTX Video Enhancement), which no program can read: say so next to the switch.

    The plugin's menu item says whether upscaling is on and whether the video is being upscaled. enabled is this plugin's own request; requested is true while the player has the upscaler in the filter chain, which needs a video shown larger than its own size (factor above 1).

    const state = await plugin.video.upscaling.state();
    // `enabled`: this plugin's request; `requested`: in the filter chain now.
    const label = !state.enabled
    ? "AI Upscaling: Off"
    : state.requested
    ? `AI Upscaling: On (×${state.factor?.toFixed(2)})`
    : "AI Upscaling: On (not needed for this video)";
    console.log(label);

    0.5.16

    1.5.37

    interface UpscalingState {
        available: boolean;
        reason: UpscalingReason | null;
        enabled: boolean;
        requested: boolean;
        factor: number | null;
        video?: UpscalingVideoSize | null;
        area?: { width: number; height: number } | null;
        gpu?: string | null;
        hwdecCurrent?: string | null;
        inChain?: boolean;
    }
    Index
    available: boolean

    Whether the upscaler works now; false with UpscalingState.reason.

    reason: UpscalingReason | null

    Why it does not work now; null while it does.

    enabled: boolean

    This plugin asked for upscaling (VideoUpscaling.set) and has not turned it off.

    requested: boolean

    The player has the upscaler in the video filter chain now, for this plugin or another one: upscaling is enabled and available and the video is shown larger than its own size. Not a sign that the GPU upscales (see the remarks).

    factor: number | null

    The scale factor the upscaler was asked for (the area the video is shown in over the video's size, in hundredths, above 1); null while nothing is requested.

    video?: UpscalingVideoSize | null

    The video's size as the upscaler gets it; null while no video decodes. With UpscalingState.area it explains the factor. Absent from players before 0.5.25.

    0.5.25

    1.5.43

    area?: { width: number; height: number } | null

    The area the video is shown in, in pixels (the upscaler scales the video to fit it); null while the player shows no video area. Absent from players before 0.5.25.

    Type Declaration

    • { width: number; height: number }
      • Readonlywidth: number

        Width in physical pixels.

      • Readonlyheight: number

        Height in physical pixels.

    • null

    0.5.25

    1.5.43

    gpu?: string | null

    The name of the GPU that renders, for example NVIDIA GeForce RTX 4070 Laptop GPU; null in software rendering and where the player does not know it (macOS, Linux). Absent from players before 0.5.25.

    0.5.25

    1.5.43

    hwdecCurrent?: string | null

    The hardware decoder in use for this video, as mpv names it (d3d11va, d3d11va-copy; no for software decoding); null while no video decodes. For people and logs: branch on UpscalingReason.cause. Absent from players before 0.5.25.

    0.5.25

    1.5.43

    inChain?: boolean

    The upscaler is in the player's video filter chain now, read from the chain itself (requested is what the player asked for; they differ only for a moment, while the chain changes). Still not a sign that the GPU upscales: the driver gives none (see the remarks). Absent from players before 0.5.25.

    0.5.25

    1.5.43