CMCD
The CMCD request headers carry Common Media Client Data, a set of playback measurements a video player attaches to each media request so the CDN serving the segment knows the player's buffer, bitrate and session state. Four headers share the data: CMCD-Object, CMCD-Request, CMCD-Session and CMCD-Status. The Consumer Technology Association's WAVE project defines the headers together with the Streaming Video Technology Alliance, and all four hold provisional entries in the IANA HTTP field name registry.
The same key/value payload also travels as a CMCD
query parameter, which browser players prefer because
custom request headers force a CORS preflight
on every segment URL. Servers accept both forms and read
the headers when a request carries both.
Usage
A player knows more about playback than a CDN sees in its own access logs: how many seconds of buffer remain, the bitrate of the rendition in play, whether a stall happened since the last request, and which segment comes next. CMCD moves a compact version of those facts onto each request for a manifest, segment, init file, caption file or license. The CDN logs the values beside its own fields, so one session identifier ties thousands of segment requests to a single viewer, and a buffer starvation flag arriving from many players at once points at a delivery problem in near real time. A prefetch hint names the next object, so an edge with spare capacity fetches the segment before the player asks for it.
Every key is optional, with one exception described
under CMCD v2. Players send only the keys with known
values and omit the rest, so a server stays robust
against any key being absent and ignores unknown keys
and malformed values. The specification reserves the
short key names and lets players add custom keys under
a reverse-DNS prefix such as com.example-mykey. Keys
are sorted alphabetically within each payload to keep
the player's fingerprinting surface small, and values
for throughput, buffer length and deadline are rounded
to coarse buckets for the same reason. Personal data
such as IP addresses, cookies and location stays out of
the payload by design.
Origins and caches treat CMCD as metadata about the
request, never as part of the cache key. The payload
changes on every request, so a cache keying on the full
query string stores one copy per segment per request
and sends every miss to the origin. Excluding the CMCD
parameter from the cache key fixes the miss rate, and
the specification advises origins to keep the four
header names out of Vary as well.
Headers
The payload is split across four headers by how often the values change. The split helps HPACK and QPACK header compression in HTTP/2 and HTTP/3, since a header whose value repeats across requests compresses to a few bytes. The header names are case-insensitive, and the keys inside are case-sensitive. The lists below follow the original specification, which is the version CDNs log on segment requests.
CMCD-Object
Keys whose values change with the object being
requested. br is the encoded bitrate of the requested
rendition in kbps, d the object duration in
milliseconds, ot the object type as a token (m
manifest, a audio, v video, av muxed, i init
segment, c caption, tt timed text, k key or
license, o other) and tb the top bitrate in the
manifest for the requested object type.
CMCD-Request
Keys whose values change with every request. bl is
the buffer length in milliseconds rounded to 100 ms, dl
the deadline in milliseconds before the first sample is
needed, mtp the measured throughput in kbps rounded to
100 kbps, nor the relative path of the next object the
player expects to request, nrr the byte range of a
partial next request in the form start-end, and su a
boolean flag present during startup, seeking or recovery
from an empty buffer.
CMCD-Session
Keys whose values stay constant across the session.
cid is a content identifier string chosen by the
service, sid a session identifier string, by
recommendation a UUID, sf the streaming format token
(d DASH, h HLS, s Smooth Streaming, o other),
st the stream type (v for on-demand, l for live),
pr the playback rate as a decimal sent only when the
rate differs from 1, and v the specification version,
omitted for version 1.
CMCD-Status
Keys whose values change less often than per request.
bs is a boolean flag present when the buffer starved
since the previous request, and rtp the requested
maximum throughput in kbps the player considers enough
for the asset, which a CDN uses for pacing at its own
discretion.
Syntax
Each header value is a comma-separated list of
key=value pairs following the
structured fields dictionary
syntax. Integers and decimals appear bare, tokens appear
bare, strings sit inside double quotes with backslash
escaping, and a boolean true is written as the key alone
with no equals sign, so bs means the buffer starved
and su means startup. A false boolean is omitted.
Header payloads are never URL-encoded.
The query form concatenates the same pairs into one
string, URL-encodes the whole string and places it in a
parameter named CMCD with exact capitalization. A
request already carrying a query string appends the
parameter after an ampersand. A single request carries
either the headers or the query parameter. When both
appear, the server reads the headers and ignores the
parameter.
Transports
Three transports exist for the data. The first two attach to the media request itself and the third runs out of band.
Request headers are the preferred transport outside the browser. Native players such as ExoPlayer on Android send headers by default, and the four-way split compresses well on long-lived connections. Headers reach the CDN and the origin without touching the URL, so caches keep their keys clean without configuration.
The query parameter is the preferred transport for browser players. A custom request header on a cross-origin fetch triggers a preflight OPTIONS request before each unique segment URL, which doubles the request rate against the CDN. The query form avoids the preflight entirely, which is why dash.js, hls.js and Shaka Player all default to query mode and offer headers as an opt-in. Akamai gives the same guidance: query arguments for browser clients, headers for everything else.
The out-of-band transport sends the payload to a
separate collection endpoint. The original specification
defined this as a JSON object. The second revision
replaced the JSON object with an HTTP POST body
of newline-separated CMCD records with the media type
application/cmcd, used by the event reporting mode
described below.
CORS
Browser players sending CMCD headers to a CDN on another origin need the CDN to answer the preflight. The browser lists the four header names in Access-Control-Request-Headers, and the server allows them with Access-Control-Allow-Headers naming all four plus Access-Control-Allow-Methods including GET. A long Access-Control-Max-Age lets the browser reuse one preflight result per URL, although each segment is a new URL, so the saving is small for a long stream. The specification spells out the two response headers as the minimum a CMCD-aware server returns.
Example
A browser player in header mode fetches a video segment from a media host on another origin. The preflight names the four CMCD headers, and the server allows them.
OPTIONS /vod/movie-2041/video/seg-12.m4s HTTP/1.1
Host: media.example.re
Origin: https://www.example.re
Access-Control-Request-Method: GET
Access-Control-Request-Headers: cmcd-object,cmcd-request,cmcd-session,cmcd-status
HTTP/1.1 204 No Content
Access-Control-Allow-Origin: https://www.example.re
Access-Control-Allow-Methods: GET
Access-Control-Allow-Headers: CMCD-Request, CMCD-Object, CMCD-Status, CMCD-Session
Access-Control-Max-Age: 86400
The segment request follows. The player has about 21 seconds of buffer, measures roughly 25 Mbps of throughput, plays a 3.2 Mbps rendition out of a ladder topping at 6 Mbps, expects to fetch segment 13 next and asks the CDN to pace delivery at 15 Mbps. The session and content identifiers are strings, so they sit in quotes, and the boolean keys are absent because the player is past startup and has not stalled.
GET /vod/movie-2041/video/seg-12.m4s HTTP/1.1
Host: media.example.re
Origin: https://www.example.re
CMCD-Object: br=3200,d=4004,ot=v,tb=6000
CMCD-Request: bl=21300,dl=21300,mtp=25400,nor="seg-13.m4s"
CMCD-Session: cid="movie-2041",sf=d,sid="6e2fb550-c457-11e9-bb97-0800200c9a66",st=v
CMCD-Status: rtp=15000
The same payload in query mode is one URL-encoded
string sorted by key. Commas become %2C, equals signs
become %3D and the quotes around strings become %22.
GET /vod/movie-2041/video/seg-12.m4s?CMCD=bl%3D21300%2Cbr%3D3200%2Ccid%3D%22movie-2041%22%2Cd%3D4004%2Cdl%3D21300%2Cmtp%3D25400%2Cnor%3D%22seg-13.m4s%22%2Cot%3Dv%2Crtp%3D15000%2Csf%3Dd%2Csid%3D%226e2fb550-c457-11e9-bb97-0800200c9a66%22%2Cst%3Dv%2Ctb%3D6000 HTTP/1.1
Host: media.example.re
The response carries the segment plus CMSD headers from
the origin and the edge. The CDN excluded the CMCD
parameter from its cache key, so the segment served from
cache regardless of the payload.
HTTP/1.1 200 OK
Content-Type: video/mp4
Cache-Control: public, max-age=31536000
Access-Control-Allow-Origin: https://www.example.re
Access-Control-Expose-Headers: CMSD-Static, CMSD-Dynamic
CMSD-Static: ot=v,sf=d,st=v,d=4004,br=3200,n="OriginA"
CMSD-Dynamic: "CDNA-312.663";etp=11500;rtt=16;mb=5000
CMSD response headers
Common Media Server Data is the companion specification running in the other direction. Origins and CDN edges add two response headers so the player learns what the servers know: CMSD-Static for values persisting across requests for the object, and CMSD-Dynamic for values valid only for the current hop. Both headers hold provisional IANA registrations alongside the CMCD set.
CMSD-Static is a structured
fields dictionary. Its keys include n for the
identifier of the server writing the data, br
encoded bitrate, d object duration, ot object type,
sf streaming format as an inner list of tokens, st
stream type, su for a startup object, at the
availability time of the object at the origin in
milliseconds since the Unix epoch, ht the time a
low-latency HLS response was held at the origin, and
nor and nrr naming the objects and ranges the origin
expects the player to request next.
CMSD-Dynamic is a structured fields list in which
each item is a quoted server identifier carrying
parameters separated by semicolons. Every server on the
path appends one item or one further header line, so
the first item is closest to the origin and the last is
the edge the player talked to. The parameters are etp
estimated throughput in kbps, rtt round trip time in
milliseconds, rd response delay in milliseconds, mb
the maximum bitrate the server suggests the player
select, and du a boolean marking a server under
duress. The server identifier matches the one the same
server uses in Proxy-Status and
Cache-Status.
Intermediaries persist upstream CMSD values, and only a
server adding data responds with a CMSD-Dynamic
header. Dynamic values cached with the object describe
an earlier response, so a distributor expecting players
to trust the data asks its CDN to rewrite or strip
CMSD-Dynamic at the edge. An origin computes
ETag on the body alone and excludes the dynamic
header, so a changed throughput estimate never forces a
retransmission of an unchanged segment. For a browser
player to read the headers from a cross-origin response,
the server lists them in
Access-Control-Expose-Headers.
dash.js and Shaka Player read etp and mb, weighting
the server's throughput estimate against their own and
capping the bitrate ladder at the suggested maximum.
Amazon CloudFront reads a media quality score from the
CMSD headers of MediaPackage origins to pick the
healthier origin in an origin group.
Player support
dash.js attaches CMCD to segment and manifest requests
once enabled, defaulting to query mode with header mode
as a setting, with a key allow list, a session
identifier, a content identifier derived from the
manifest URL when unset, and a dynamic rtp computed
from the buffer level. hls.js carries the data on
manifests, playlists, segments and timed text once a
cmcd configuration object exists, generating a session
identifier when none is given, and switches from query
arguments to headers through a useHeaders flag that
defaults to off. Shaka Player exposes the same shape:
disabled by default, query mode unless useHeaders is
set, an includeKeys filter and a configurable rtp
safety factor.
ExoPlayer, shipped as part of Android's Media3 library,
enables CMCD for DASH, HLS and Smooth Streaming through a
CmcdConfiguration factory and sends request headers by
default, with a query parameter mode as the alternative
and a per-key allow list. On iOS and tvOS, CMCD comes
from vendor player SDKs rather than from the system
player. THEOplayer turns on request mode per source and
posts event reports to configured endpoints, and Mux
Player exposes a prefer-cmcd attribute choosing query,
header or none, with none as the default for
performance.
CDN support
Akamai Adaptive Media Delivery reads CMCD from either
headers or the query argument, prefers headers when both
arrive, and uses bl, nor and nrr to prefetch the
next segment from the origin while the player's buffer
sits below a threshold. The behavior is enabled per
property, the data flows into DataStream 2 log streams,
and Akamai recommends excluding the query parameters from
the cache key so the changing payload never fragments
the cache.
Amazon CloudFront exposes the keys as named real-time
log fields such as cmcd-encoded-bitrate,
cmcd-buffer-length and cmcd-session-id, filled from
the headers or the query string of each viewer request
and present only when the player sent them. A single
option selects every CMCD field at once. Fastly documents
CMCD through its blog and a public VCL example: the edge
concatenates the four headers into one internal header,
falls back to the CMCD query parameter when no header
is present, validates the version, and writes sampled
records to a logging endpoint, with Beacon Termination
offered for the event reports of the second revision.
Cloudflare Stream collects CMCD from its built-in and
supported custom players and surfaces the fields as a
quality-of-experience dataset in its GraphQL analytics,
with dimensions such as session identifier, buffer
starvation, measured throughput and encoded bitrate.
CMCD v2
The second revision of the specification keeps the
request mode above intact and adds an event mode, in
which the player posts reports to one or more collection
endpoints on play state changes, errors, ad boundaries,
received responses or a heartbeat interval. Event
reports travel as a POST body of newline-separated
records with the application/cmcd media type, carry a
mandatory ts timestamp and e event key, and support
batching with back-off on a 429 response and a stop
on 410. The v key becomes mandatory and is set to
2. Players are advised to keep sending version 1
syntax on segment requests while CDNs catch up, and to
reserve version 2 syntax for event mode.
Request mode gains keys for live latency (ltc), media
start delay (msd), playhead time (pt), player state
(sta), dropped frames, buffer starvation counts and
durations, a sequence number and a content signature.
Several keys turn into inner lists with per-object-type
parameters, so br=(3000;v 164;a) reports video and
audio bitrates in one value, and nor becomes an inner
list of strings with the byte range folded in as an r
parameter, replacing nrr. The pr key moves from
CMCD-Session to CMCD-Status, and the content
identifier grows to 128 characters. dash.js, hls.js and
Shaka Player expose a version setting and default to
version 1, and Akamai logs the version 2 request keys.
History
CMCD grew out of the CTA WAVE project's work on interoperable web video. The Consumer Technology Association published the original specification, CTA-5004, in September 2020, with CMCD-Object, CMCD-Request, CMCD-Session and CMCD-Status registered as provisional HTTP fields. The companion Common Media Server Data specification, CTA-5006, followed in November 2022 and registered CMSD-Static and CMSD-Dynamic the same way.
A second revision, CTA-5004-A, replaced the JSON
transport with the POST body, introduced event mode and
widened the key set, and a maintenance revision,
CTA-5004-B, published on 14 April 2026, changed the body
media type from text/cmcd to application/cmcd and
registered the latter with IANA. The revised
specification is developed jointly with the Streaming
Video Technology Alliance, whose Common Media Library
provides the shared CMCD and CMSD code dash.js builds
its version 2 support on.
See also
- HTTP structured fields
- CORS
- Access-Control-Allow-Headers
- Access-Control-Request-Headers
- Access-Control-Expose-Headers
- Access-Control-Max-Age
- HTTP streaming
- Range requests
- Media types
- Cache-Control
- Vary
- Proxy-Status
- Cache-Status
- Akamai-GRN
- X-Amz-Cf-Id
- HTTP headers
- CTA-5004-B: Common Media Client Data
- CTA-5004 standard page
- CTA-5006: Common Media Server Data
- IANA HTTP Field Name Registry
- IANA media type application/cmcd
- CTA-Common-Access-Token, the CTA access token header in the IANA registry
- dash.js CMCD documentation
- dash.js CMSD documentation
- hls.js API: cmcd
- Shaka Player CmcdConfiguration
- ExoPlayer: Common Media Client Data
- THEOplayer iOS: CMCD getting started
- Mux Player API reference
- Akamai: Common Media Client Data
- Amazon CloudFront: CMCD fields in real-time logs
- Amazon CloudFront: Media quality-aware resiliency
- Fastly: CMCDv2, leveling up your video streaming telemetry
- Fastly Fiddle: CMCD log collection
- Cloudflare Stream: GraphQL Analytics API
- SVTA Common Media Library