---
title: "Live stream numbers - fps, bitrate, viewer lag, ABR rung (a read key is enough)"
method: GET
path: "/devices/{name}/stream"
tags: ["Screen and input"]
---

# Live stream numbers - fps, bitrate, viewer lag, ABR rung (a read key is enough)

`GET /devices/{name}/stream`

## Request

- Base URL: `https://api.clousd.com/v1`
- URL: `https://api.clousd.com/v1/devices/{name}/stream`
- Auth: HTTP bearer

## Response `200`

Stream stats

- StreamStats: Live picture quality of one device: what came in from the phone, what went out to each viewer and what the browsers last said about themselves.
  - `phone` string
  - `running` boolean: The phone screen is being captured right now
  - `viewers` integer: Browsers watching right now
  - `encoder` string: Phone encoder doing the capture; empty means scrcpy picked one
  - `fps_in` number: Frames from the phone over the last second (0 when no frame arrived for 2 s)
  - `kbps_in` number: Kbit/s from the phone over the last second
  - `last_frame_age_ms` integer: Age of the last frame, ms; -1 means there were no frames at all
  - `pli_per_min` number: Key frame requests from viewers per minute: it grows when the picture falls apart
  - `dropped` integer: Frames the gateway dropped since start (a viewer could not keep up)
  - `up_s` integer: Seconds the capture has been running
  - `g2g_ms_last` number: Last glass-to-glass measurement (phone screen to browser), ms
  - `g2g_age_s` integer: Seconds since that measurement; -1 means it was never measured
  - `bitrate_kbps` integer: Bitrate the encoder runs at right now
  - `abr` object: Quality ladder: 4000 -> 2500 -> 1500 -> 800 kbit/s (the top rung is the gateway -bitrate, 4 Mbit/s by default)
    - `mode` string
    - `rung` integer: Current rung, 0 is the top one
    - `rungs` integer
    - `ladder_kbps` integer[]
    - `reason` string: Why the ladder sits on this rung
    - `changed_at` string: When the rung last changed (RFC3339; empty if it never did)
  - `peers` object[]: What went out to each viewer (gateway counters)
    - `id` integer
    - `frames` integer
    - `keys` integer: Key frames sent
    - `pli` integer
    - `dropped` integer
    - `kbps` number
    - `age_s` integer: Seconds this viewer has been connected
    - `rtt_ms` integer: From RTCP; -1 means the viewer has never answered over RTCP yet
    - `loss_pct` number
  - `clients` object[]: What the browser last said about itself (one sample per viewer, sent every 10 s)
    - `viewer` string
    - `rtt_ms` number
    - `fps` number
    - `kbps` number
    - `jitter_ms` number
    - `dropped` integer
    - `g2g_ms` number
    - `g2g_age_s` integer: -1 means this viewer never measured glass-to-glass
    - `age_s` integer: Seconds since the sample

---

[API](https://skmtc.dev/clousd/apis/clousd-api.md) · [All operations](https://skmtc.dev/clousd/apis/clousd-api/llms.txt) · [OpenAPI document](https://skmtc.dev/clousd/apis/clousd-api/revisions/0291ffd26ae3?raw)
