Open-Source Video Quality of Experience (QoE) Monitoring Platform
Production-grade video quality monitoring for web video players with comprehensive business and technical metrics, accurate percentile calculations, and real-time alerting.
This project needs active contribution from the experts in video tech, players and opensource developers. Let's build it together
- Overview
- Features
- Architecture
- Quick Start
- Documentation
- Deployment Options
- Metrics & Dashboards
- Contributing
- License
- Support
OpenQoE is a complete, production-ready observability platform for video streaming that helps you:
- Monitor Quality: Track video startup time, rebuffering, errors, and playback quality
- Understand Engagement: Measure watch time, completion rates, and viewer behavior
- Optimize Performance: Identify bottlenecks with P50/P95/P99 percentile analysis
- Alert Proactively: Get notified when quality degrades or business metrics drop
- Scale Globally: Deploy on Cloudflare's edge network or self-host
| Component | Description | Status |
|---|---|---|
| JavaScript SDK | 5 player adapters capturing 12 event types | β Production Ready |
| Cloudflare Worker | Edge ingestion with validation & routing | β Production Ready |
| Grafana Dashboards | 4 comprehensive dashboards (58 panels total) | β Production Ready |
| Recording Rules | 25 pre-aggregated metrics for performance | β Production Ready |
| Alert Rules | 18 production-ready alerts | β Production Ready |
| Docker Stack | Self-hosted Mimir + Loki + Grafana | β Production Ready |
- β Multi-Player Support: HTML5, Video.js, HLS.js, dash.js, Shaka Player
- β Comprehensive Events: 12 event types with full context capture
- β Privacy-First: SHA-256 hashing, configurable PII controls
- β Offline Support: LocalStorage-backed queue with exponential backoff retry
- β Lightweight: ~10KB gzipped per adapter
- β TypeScript: Full type definitions included
- β Framework Agnostic: Works with React, Vue, Angular, vanilla JS
- β Histogram Metrics: Accurate P50/P95/P99 percentile calculations
- β Dual Destinations: Self-hosted (Mimir/Loki) or Grafana Cloud
- β Authentication: Secure header-based API key auth
- β Validation: Comprehensive event schema validation with whitelisting
- β Cardinality Governance: Automatic high-cardinality dimension management
- β Timeout Protection: 10-second timeout on all HTTP requests
- β Configuration Validation: Fails fast with clear error messages
- β Edge Deployment: Runs on Cloudflare's global network
- β 4 Production Dashboards: VOD, Live Streaming, Quality & Delivery, Impact Explorer
- β 58 Dashboard Panels: Comprehensive business + technical coverage
- β 25 Recording Rules: Pre-aggregated metrics for 10-50x faster queries
- β 18 Alert Rules: Critical quality, business impact, performance, live streaming alerts
- β Histogram Support: Accurate percentile calculations (not approximations)
- β Multi-Tenancy: Full Grafana Cloud support with X-Scope-OrgID header
- β Self-Hosted: Complete Docker Compose stack included
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Your Application β
β βββββββββββ βββββββββββ βββββββββββ βββββββββββ β
β β HTML5 β βVideo.js β β HLS.js β βdash.js/ β β
β β Player β β Player β β Player β β Shaka β β
β ββββββ¬βββββ ββββββ¬βββββ ββββββ¬βββββ ββββββ¬βββββ β
β ββββββββββββββ΄ββββββββββββββ΄βββββββββββββ β
β β β
β βββββββββΌβββββββββ β
β β OpenQoE SDK β β
β β (12 events) β β
β βββββββββ¬βββββββββ β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ
β HTTPS POST /v1/events
βΌ
ββββββββββββββββββββββββββββββββββ
β Cloudflare Worker (Edge) β
β β’ Authentication β
β β’ Validation & Sanitization β
β β’ Cardinality Governance β
β β’ Transform to Histograms β
ββββββββββ¬ββββββββββββββββ¬ββββββββ
β β
Metrics β β Logs
βΌ βΌ
ββββββββββββββββ ββββββββββββββββ
β Mimir β β Loki β
β (Metrics) β β (Logs) β
β Prometheus- β β Log β
β compatible β β Aggregation β
ββββββββ¬ββββββββ ββββββββ¬ββββββββ
β β
ββββββββββ¬ββββββββββ
βΌ
ββββββββββββββββββββββ
β Grafana β
β β’ 4 Dashboards β
β β’ 58 Panels β
β β’ Recording Rules β
β β’ Alert Rules β
ββββββββββββββββββββββ
Flow:
- SDK captures events from video players (all major web players supported)
- Events batched and sent to Cloudflare Worker edge endpoint
- Worker validates, enriches, and transforms to histogram metrics
- Metrics sent to Mimir (Prometheus-compatible), logs to Loki
- Grafana visualizes with pre-built dashboards and alerts
- Node.js 18+
- Docker & Docker Compose v2
- Cloudflare account (for worker deployment)
- OR Grafana Cloud account (alternative to self-hosting)
git clone https://github.com/openqoe/openqoe-dev.git
cd openqoe# Start Mimir, Loki, and Grafana
docker compose up -d
# Verify all services are healthy
docker compose ps
# Access Grafana at http://localhost:3000 (admin/admin)cd observability/prometheus/rules
# Load recording rules
./load-rules.sh http://localhost:9009
# Load alert rules
curl -X POST \
"http://localhost:9009/prometheus/config/v1/rules/anonymous" \
-H "Content-Type: application/yaml" \
--data-binary "@openqoe-alert-rules.yml"cd worker
# Install dependencies
npm install
# Create local config
cp .dev.vars.example .dev.vars
# Edit .dev.vars with localhost URLs:
# MIMIR_URL=http://localhost:9009/api/v1/push
# LOKI_URL=http://localhost:3100/loki/api/v1/push
# Run locally
npm run dev
# Worker available at http://localhost:8787<!DOCTYPE html>
<html>
<head>
<title>Video Player Example</title>
</head>
<body>
<video id="myVideo" controls width="640">
<source src="https://example.com/video.mp4" type="video/mp4">
</video>
<script type="module">
import { OpenQoE } from './sdk/dist/index.js';
// Initialize SDK
const qoe = new OpenQoE({
orgId: 'my-org',
playerId: 'my-website',
endpointUrl: 'http://localhost:8787/v1/events',
debug: true
});
// Attach to player
const video = document.getElementById('myVideo');
qoe.attachPlayer('html5', video, {
videoId: 'demo-video-123',
videoTitle: 'Demo Video'
});
// SDK will now automatically track all events!
</script>
</body>
</html>- Open Grafana: http://localhost:3000
- Navigate to Dashboards β OpenQoE folder
- Open VOD Monitoring dashboard
- Play a video and watch metrics appear in real-time!
That's it! Your video QoE monitoring is now live. π
| Document | Description |
|---|---|
| Deployment Guide | Complete deployment instructions for all environments |
| Deployment Checklist | Step-by-step validation checklist |
| SDK Integration Guide | SDK setup for all 5 supported players |
| API Reference | Complete API documentation and event schemas |
| Document | Description |
|---|---|
| Architecture Overview | System architecture and component design |
| Technical Specification | Detailed technical specifications |
| Data Model | Event schemas and data structures |
| Production Ready Status | Complete production readiness report |
| Document | Description |
|---|---|
| Observability README | Stack overview, metrics, queries, troubleshooting |
| Dashboard Documentation | Dashboard specifications and panel details |
| Recording Rules | 25 pre-aggregated metrics |
| Alert Rules | 18 production alerts |
| Component | README |
|---|---|
| SDK | sdk/README.md |
| Worker | worker/README.md |
| Examples | examples/README.md |
Best for: On-premise deployments, full control, data sovereignty
# Start complete stack
docker compose up -d
# Configure worker for localhost
cd worker && npm run devIncludes: Mimir (metrics), Loki (logs), Grafana (dashboards)
Docs: Self-Hosted Deployment
Best for: Managed service, zero infrastructure, global scale
# Configure worker with Grafana Cloud credentials
cd worker
wrangler secret put GRAFANA_CLOUD_INSTANCE_ID
wrangler secret put GRAFANA_CLOUD_API_KEY
wrangler secret put GRAFANA_CLOUD_METRICS_URL
wrangler secret put GRAFANA_CLOUD_LOGS_URL
# Deploy to Cloudflare
wrangler deployDocs: Grafana Cloud Deployment
Best for: Edge ingestion with on-premise storage
Combine Cloudflare Worker for global edge ingestion with self-hosted observability stack.
Docs: Hybrid Deployment
| Dashboard | Panels | Purpose | Key Metrics |
|---|---|---|---|
| VOD Monitoring | 21 | Real-time VOD quality | VST, rebuffering, completion, quartiles |
| Live Streaming | 11 | Live event monitoring | Concurrent viewers, join time, geographic |
| Quality & Delivery | 12 | Technical deep-dive | Seek latency, dropped frames, ABR |
| Impact Explorer | 14 | Business analysis | Watch time, engagement, revenue |
Business Metrics:
- Total views, completion rate, watch time
- Revenue impact calculations
- Engagement by quartile (25/50/75/100%)
- Content performance comparison
Technical Metrics:
- Video Startup Time (P50/P95/P99 via histograms)
- Rebuffer rate, duration, and frequency
- Seek latency and performance
- Error rates by type and family
- Bitrate distribution and ABR behavior
- Dropped frames and rendering quality
- Resolution distribution (360p-8K)
- Buffer health
Live Streaming:
- Concurrent viewers (real-time)
- Join time (P95)
- Geographic distribution
- Viewer drop detection
OpenQoE uses true histograms (not gauges) for accurate percentile calculations:
# Accurate P95 Video Startup Time
histogram_quantile(0.95,
sum(rate(openqoe_video_startup_seconds_bucket[5m])) by (le)
)
# Using pre-aggregated recording rule (10-50x faster)
openqoe:video_startup_seconds:p95
Histogram buckets configured:
- VST: [0.5, 1, 2, 3, 5, 10, 15, 30] seconds
- Rebuffer Duration: [0.5, 1, 2, 3, 5, 10, 30] seconds
- Seek Latency: [0.1, 0.25, 0.5, 1, 2, 5] seconds
| Player | Version | Adapter | Events | Status |
|---|---|---|---|---|
| HTML5 Video | Native | HTML5Adapter |
11/12* | β Production |
| Video.js | 7.0+ | VideoJsAdapter |
12/12 | β Production |
| HLS.js | 1.0+ | HlsJsAdapter |
12/12 | β Production |
| dash.js | 4.0+ | DashJsAdapter |
12/12 | β Production |
| Shaka Player | 4.0+ | ShakaAdapter |
12/12 | β Production |
*HTML5 doesn't support quality_change events (no native ABR)
| Event | Description | Business Value |
|---|---|---|
playerready |
Player initialized | Time to interactive |
viewstart |
Video load started | View funnel entry |
playing |
Playback started | Video Startup Time (VST) |
pause |
User paused | Engagement analysis |
seek |
User scrubbed | Navigation behavior |
stall_start |
Buffering started | Rebuffering detection |
stall_end |
Buffering ended | Rebuffer duration |
ended |
Video completed | Completion rate |
error |
Playback error | Error tracking |
quartile |
25/50/75/100% reached | Drop-off analysis |
heartbeat |
Periodic update (10s) | Watch time tracking |
quality_change |
ABR switch | Bitrate adaptation |
openqoe/
βββ sdk/ # JavaScript SDK
β βββ src/
β β βββ adapters/ # Player adapters (5 total)
β β βββ core/ # Core SDK modules
β β β βββ EventCollector.ts
β β β βββ SessionManager.ts
β β β βββ BatchManager.ts
β β β βββ Transport.ts
β β βββ utils/ # Privacy, device detection
β β βββ OpenQoE.ts # Main SDK class
β βββ dist/ # Built bundles
β βββ package.json
β
βββ worker/ # Cloudflare Worker
β βββ src/
β β βββ index.ts # Main handler
β β βββ config.ts # Configuration
β β βββ destinations.ts # Destination manager
β β βββ validation.ts # Event validation
β β βββ prometheus.ts # Histogram metrics
β β βββ loki.ts # Log transformation
β β βββ cardinality.ts # Cardinality governance
β β βββ auth.ts # Authentication
β βββ wrangler.toml # Worker configuration
β βββ validate.sh # Pre-deployment validation
β βββ package.json
β
βββ observability/ # Observability stack
β βββ dashboards/ # 4 Grafana dashboards (58 panels)
β β βββ vod-monitoring.json
β β βββ live-streaming.json
β β βββ quality-delivery.json
β β βββ impact-explorer.json
β βββ prometheus/
β β βββ rules/
β β βββ openqoe-recording-rules.yml # 25 rules
β β βββ openqoe-alert-rules.yml # 18 alerts
β β βββ load-rules.sh
β βββ mimir/
β β βββ mimir-config.yml
β β βββ runtime.yml
β βββ loki/
β β βββ loki-config.yml
β βββ grafana/
β βββ provisioning/
β
βββ examples/ # Example/demo pages for all 5 players
βββ docs/ # Documentation
β βββ deployment-guide.md
β βββ deployment-checklist.md
β βββ production-ready.md
β βββ sdk-integration.md
β βββ api-reference.md
β βββ architecture.md
β βββ data-model.md
β βββ technical-spec.md
β βββ contributing.md
β βββ observability/
β βββ README.md
β βββ dashboards.md
βββ compose.yml # Docker Compose stack
βββ LICENSE # Apache 2.0
βββ README.md # This file
cd sdk
npm install
npm run build
npm testcd worker
npm install
npm run dev
# Available at http://localhost:8787npm run type-checkcd examples
npx http-server -p 8080
# Open http://localhost:8080We welcome contributions! Whether it's:
- π Bug reports
- β¨ Feature requests
- π Documentation improvements
- π§ Code contributions
Please read our Contributing Guide for guidelines.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Commit with clear messages (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Copyright 2024 OpenQoE Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- π Website: https://openqoe.dev
- π Documentation: Start with docs/deployment-guide.md
- π Bug Reports: GitHub Issues
- π‘ Feature Requests: GitHub Discussions
- π¬ Questions: GitHub Discussions Q&A
- Check the documentation
- Search existing issues
- Check troubleshooting guide
- Ask in Discussions
OpenQoE is built with:
- TypeScript - Type-safe development
- Cloudflare Workers - Edge compute platform
- Grafana Mimir - Prometheus-compatible metrics storage
- Grafana Loki - Log aggregation
- Grafana - Visualization platform
- Docker - Containerization
Inspired by commercial QoE monitoring solutions for continuous improvement and industry best practices.
Current Version: 1.0.0 Status: β Production Ready Last Updated: November 2024
See docs/production-ready.md for complete production readiness report.
- β SDK for all 5 major web players
- β Cloudflare Worker with histogram support
- β 4 comprehensive Grafana dashboards (58 panels)
- β 25 recording rules for performance
- β 18 production-ready alerts
- β Self-hosted Docker stack
- β Grafana Cloud support
- β Complete documentation
Phase 2 (Optional):
- Worker Health Dashboard (pipeline monitoring)
- Advanced cardinality analytics
- Custom metric extensions
- Load testing framework
If you find OpenQoE useful, please consider giving us a star β on GitHub. It helps others discover the project!
Made with β€οΈ by the OpenQoE Community