Nicolás Levy
The CMCD Toolkit is an open-source project developed by Qualabs designed to collect, process, and analyze CMCD v2 data, with a strong focus on the new Event Mode.
It serves as a reference implementation to help developers prototype quickly and deploy scalable monitoring solutions. The toolkit supports both local environments (via Docker) and cloud-native deployments (specifically Google Cloud).
Event Mode is a new data transmission method introduced in CMCD v2 that decouples the reporting of metrics from the media object requests. Unlike the traditional "Request Mode" (where data is attached to the CDN request via headers or query parameters), Event Mode allows the player to send telemetry directly to specific collectors, such as an analytics server or a multi-CDN performance service.
Here is how the data is sent in Event Mode:
Protocol & Method: Data is sent via an HTTP POST request.
Content-Type: The request uses the MIME type text/cmcd.
Body Format: The body consists of CMCD objects (structured fields) separated by a newline character. This format allows for batching multiple reports in a single request and supports streaming data in chunks within an open connection.
Mandatory Key: The e (Event) key is mandatory in this mode to identify the type of event (e.g., e=t for a time interval heartbeat, e=rr for request received, or e=e for an error).
Multiple Targets: Because it is decoupled from the content request, the player can send this data to multiple different backend services simultaneously (e.g., one for ads, one for errors).
The CMCD Toolkit leverages a serverless Google Cloud pipeline to ingest, store, and visualize video telemetry in real-time, moving data from the player to the dashboard efficiently.
Video Player: Captures playback metrics in Event Mode and transmits them as text/cmcd payloads via HTTP POST.
Cloud Run Function: Acts as the public ingestion point that receives player requests and publishes them to a message queue.
Pub/Sub: Buffers the incoming event stream to handle traffic spikes and decouple ingestion from storage.
Bucket (Cloud Storage): Acts as a "dead letter queue" storage, permanently archiving the error logs captured by the Errors Pub/Sub topic.
BigQuery: Stores the structured telemetry data efficiently for long-term retention and SQL-based analysis.
Grafana: Queries the data warehouse to render real-time dashboards for monitoring network and playback performance.
Looker Sudio
Grafana
Jupyter Notebooks
The analytics layer of the CMCD Toolkit is designed to be modular and flexible, decoupling the data storage from the presentation layer to serve different stakeholders—from engineering teams debugging low-level network issues to product managers monitoring high-level KPIs.
Google BigQuery: Serves as the central serverless data warehouse, capable of ingesting high-frequency telemetry events (like individual segment requests) and allowing for complex, granular analysis using standard SQL without the need for index management.
Grafana: Acts as the primary operational dashboard for engineering, connecting directly to BigQuery to visualize time-series data, monitor real-time metrics (such as buffer starvation or throughput), and trigger alerts when performance thresholds are breached.
Looker Studio: Provides a business intelligence interface for non-technical stakeholders, enabling the creation of interactive, drag-and-drop reports to track long-term trends, user engagement, and session quality across different regions or device types.
Jupyter Notebooks: Facilitates deep-dive research and data science workflows, allowing analysts to connect to the dataset via Python to perform advanced statistical modeling, anomaly detection, or ad-hoc investigations that go beyond standard dashboarding.
This presentation offers a high-level overview of Common Media Client Data (CMCD) version 2, focusing on how to transform raw streaming data into actionable insights for video quality monitoring. It highlights the introduction of "Event Mode," which decouples data reporting from content delivery, and outlines the general workflow for implementing these updates across different players. The slides also briefly touch upon the infrastructure required for data collection and analysis, illustrating how modern tools and AI can be leveraged to better understand and visualize the quality of the streaming experience.