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

    Interface PlaybackStats

    What Player.stats reports. Every field is the backend's own value (libmpv properties), null when it has none; nothing is converted.

    1.0.0

    interface PlaybackStats {
        backend: string;
        session: number;
        framesShown: number;
        framesDropped: number | null;
        presentedFps: number | null;
        video:
            | {
                codec: string
                | null;
                width: number | null;
                height: number | null;
                fps: number | null;
                decoder: string | null;
                pixelFormat: string | null;
                colorspace: string | null;
                displayWidth: number | null;
                displayHeight: number | null;
                displayFps: number | null;
                bitrate: number | null;
                hwdec: string | null;
                decoding: "software" | "hardware" | null;
                transfer: string | null;
            }
            | null;
        audio: | {
            codec: string
            | null;
            sampleRate: number | null;
            channels: number | null;
            decoder: string | null;
            format: string | null;
            channelLayout: string | null;
            bitrate: number | null;
        }
        | null;
        avSyncMs: number
        | null;
        cacheSeconds: number | null;
    }
    Index
    backend: string

    The rendering path: "libmpv · GPU 渲染(OpenGL)" (GPU on macOS, the default there), "libmpv · GPU 渲染(Direct3D)" (GPU on Windows, when turned on; version 0.5.14 and later) or "libmpv · 软件渲染" (software: Windows by default, Linux, headless, fallback). The strings are the player's display text in the interface language (shown here in Chinese).

    session: number

    The playback session number.

    framesShown: number

    Frames the video renderer produced. Not all of them reach the screen: a busy window shows only the newest one, so compare presentedFps.

    framesDropped: number | null

    Frames dropped by the backend (mpv), null when unknown.

    presentedFps: number | null

    New video frames the player window showed per second over the last second, measured by the player itself: draws of the main window that put a new picture on screen. Lower than video.fps when frames are lost after decoding and rendering (the window could not keep up with the source, or the display refreshes slower); 0 while paused. null when the player cannot measure it (no window, the first second).

    0.5.1

    1.5.15

    video:
        | {
            codec: string
            | null;
            width: number | null;
            height: number | null;
            fps: number | null;
            decoder: string | null;
            pixelFormat: string | null;
            colorspace: string | null;
            displayWidth: number | null;
            displayHeight: number | null;
            displayFps: number | null;
            bitrate: number | null;
            hwdec: string | null;
            decoding: "software" | "hardware" | null;
            transfer: string | null;
        }
        | null

    Every field is the backend's own value, null when it has none.

    Type Declaration

    • {
          codec: string | null;
          width: number | null;
          height: number | null;
          fps: number | null;
          decoder: string | null;
          pixelFormat: string | null;
          colorspace: string | null;
          displayWidth: number | null;
          displayHeight: number | null;
          displayFps: number | null;
          bitrate: number | null;
          hwdec: string | null;
          decoding: "software" | "hardware" | null;
          transfer: string | null;
      }
      • codec: string | null

        Codec name.

      • width: number | null

        Coded width.

      • height: number | null

        Coded height.

      • fps: number | null

        Frames per second (after a frameBlend node: the output rate; motion smoothing's doubling is not counted).

      • decoder: string | null

        Short decoder name, e.g. "h264".

      • pixelFormat: string | null

        e.g. "yuv420p".

      • colorspace: string | null

        Colour matrix, e.g. "bt.709".

      • displayWidth: number | null

        Size after aspect correction and filters.

      • displayHeight: number | null

        Size after aspect correction and filters.

      • displayFps: number | null

        Measured display refresh; only with display-synced output (usually null).

      • bitrate: number | null

        Bits per second, updated per keyframe.

      • hwdec: string | null

        Hardware decoder in use, e.g. "videotoolbox", "d3d11va-copy"; "no" = software decoding.

      • decoding: "software" | "hardware" | null

        How the video is decoded, from hwdec: "hardware" (the method is in hwdec) or "software"; null before a decoder runs.

        1.5.15 (with older players the SDK derives it from hwdec)

      • transfer: string | null

        Transfer characteristic as mpv names it, e.g. "bt.1886", "pq", "hlg".

    • null
    audio:
        | {
            codec: string
            | null;
            sampleRate: number | null;
            channels: number | null;
            decoder: string | null;
            format: string | null;
            channelLayout: string | null;
            bitrate: number | null;
        }
        | null

    null without audio.

    Type Declaration

    • {
          codec: string | null;
          sampleRate: number | null;
          channels: number | null;
          decoder: string | null;
          format: string | null;
          channelLayout: string | null;
          bitrate: number | null;
      }
      • codec: string | null

        Codec name.

      • sampleRate: number | null

        Hz.

      • channels: number | null

        Channel count.

      • decoder: string | null

        Short decoder name, e.g. "aac".

      • format: string | null

        Sample format, e.g. "floatp".

      • channelLayout: string | null

        Readable layout, e.g. "stereo", "5.1(side)".

      • bitrate: number | null

        Bits per second.

    • null
    avSyncMs: number | null

    Last audio/video difference in milliseconds (signed).

    cacheSeconds: number | null

    Seconds of media buffered ahead by the demuxer.