CMCD version 2
Advances in client analytics
Advances in client analytics
The geeky primates at WAVE are releasing version 2 of the popular CMCD standard. While CMCD v1 was restrained to a CDN (data) relationship, v2 gives you three different modes for concurrently sharing data.
Now you can date a content steering service, and an analytics service, at the same time as maintaining a committed relationship with your CDN 🙂 This talk highlights the new features and capabilities of CMCD v2. In addition to the reporting mode enhancements, we'll investigate the host of news keys being offered: media start delay, target buffer length, buffer starvation duration, prefetching multiple objects at once, player state, response code, TTFB, timestamps, request URLS and many more.
We'll explore how v2 can be used to drive lightweight data for content steering decisioning, rich collection for analytics providers that is decoupled from the delivery and even improved prefetching performance and visibility for the CDN. We'll show it all working and release some code so that you too can experiment. Join us!
CMCD Main Contributors
CMCD v2 is a specification built by many dedicated individuals who contribute their effort and expertise to create a standard for the entire industry! During MHV-2025, if you have any questions or ideas, don’t hesitate to reach out to us and help build an even better spec!
Three CMCD modes?
In CMCD v2, there are three operating modes, making it possible to send data to a server other than the CDN.
The request mode is the same as CMCD v1, send the CMCD keys to the CDN with the request of the segment.
The response mode is designed to send CMCD data every time we receive a response from the CDN. This new mode allows for adding detailed information about the received segment. New key/values are added, such as the segment's URL, response code (rc), time to first byte (ttfb), and time to last byte (ttlb), which are exclusive to this mode.
CMCD v2 also introduces a new key/value, event (e), which contains a player event. Each time a event is triggered, or at intervals defined by the application, it is possible to send certain CMCD key/values to a server. Also, in this mode called event mode, a new key timestamp (ts) is also added to indicate the moment the state change occurred.
CMCD version 2 at Demuxed 2024
This presentation by Will Law at Demuxed 2024 explores the latest developments in the Common Media Client Data (CMCD) specification, focusing on the enhancements introduced in version 2.
Keep in mind that at the time of this presentation, Event mode was called "State-Interval" Mode.
CMCD v2 for SGAI tracking
The new Event Mode can also be used to track ads on players, whether using Client-Side Ad Insertion, Server-Side Ad Insertion, or Server-Guided Ad Insertion.
The new events—ad start, ad end, interstitial started, and interstitial ended—are used to enable this tracking. The user session (sid key) remains the same even if the content (cid key) changes due to the insertion of an interstitial, an ad, or any other type of alternative content.
In the following demo, you can see a prototype version of dash.js with AlternativeMPD sending CMCD v2. By opening the Network tab in the developer tools, you will be able to see all the information sent when the interstitial initializes.
CMCD Analyzer
CMCD v2 is currently in full development, and we have created a quick and dirty implementation to gather insights and identify potential implementation issues based on the preliminary version of CMCD v2.
The CMCD v2 Analyzer is a proof of concept is based on a modified version of dash.js that allows enabling the three CMCD v2 modes simultaneously. Additionally, a small server has been created to collect the data sent by the three modes. Specifically, to collect data from the request mode, the server acts as a proxy to the CDN in order to extract the necessary information.
Keep in mind that this is not a full CMCD v2 player as the spec is still under development and some issues has been already identified.
Feel free to try this project and give us feedback!
Try the demo online!
During MHV 2025 week, the demo hosted by Qualabs will be available, allowing you to generate and analyze data with this project effortlessly! In this demo, you can play any DASH content you want and analyze the data received by the three CMCD v2 modes simultaneously in Kibana.
Keep in mind that it works with dash.js, so the demo runs smoothly on Android and PC/MAC.
Kibana user: elastic
Kibana password: changeme
How to install the CMCD v2 demo in localhost
The only requirement is to have Docker and Docker Compose already installed
Step by step instructions:
Clone the github repo https://github.com/montevideo-tech/cmcd-analyzer.git with git clone https://github.com/montevideo-tech/cmcd-analyzer.git
Go to the demo branch git checkout poc/mhv-2025
Start the containers with docker compose up
Wait until all the services are up and running, this can take some minutes.
Open http://localhost:5173/ in a browser to play a video.
Open Kibana http://localhost:5601/ in a browser
Login with user/password: elastic/changeme
Start playing with CMCD v2 data!!
How to use the CMCD v2 Demo
In this video, Nicolas Levy shows us how to use Kibana to search for CMCD v2 data stored in Elasticsearch, as well as how to create some basic charts.
Key insights from the video:
In the Discover view you can search for the CMCD records stored in Elasticsearch
You can filter by time or key values with the upper filter bar
Create any chart in the Dashboard view and remember to select the agregation mode of the data when creating a new visualization.