A real-time pattern and anomaly detection system for streaming media logs, particularly focused on CMCD (Common Media Client Data) logs from video players.
- Real-time monitoring of streaming video playback quality
- Anomaly detection based on CMCD metrics
- Detection of buffering issues, quality degradation, network problems
- RESTful API for log submission and configuration
- Socket.io real-time notifications of detected anomalies
- Web interface for visualization and monitoring
- Test data generation for development and demonstration
- Node.js and TypeScript
- Express.js for API
- Socket.io for real-time communication
- Winston for logging
- CTA-5004 CMCD standard compliance
- Node.js 18+
- npm or yarn
- Clone the repository
git clone https://github.com/coderjun/vse-cmcd-monitor.git
cd vse-cmcd-monitor
- Install dependencies
npm install
-
Configure environment variables (or use the defaults in
.env
) -
Start the development server
npm run dev
- Access the web interface at http://localhost:3000
- Use the "Generate Test Data" button to simulate streaming logs
- View detected anomalies in real-time
- Submit custom logs via the API or web interface
GET /health
- Health check endpointGET /api
- API documentationPOST /api/logs
- Submit CMCD logs for analysisGET /api/config
- Get current anomaly detection configurationPUT /api/config
- Update anomaly detection configurationPOST /api/test/generate
- Generate test data
This project uses the CTA-5004 CMCD (Common Media Client Data) standard for streaming media metrics. The CMCD specification defines a standard set of media player performance metrics to be sent from clients to servers during streaming media playback.
Key CMCD metrics used in this project include:
br
- Encoded bitrate in kbpsbl
- Buffer length in millisecondsbs
- Buffer starvation flagmtp
- Measured throughput in kbpsd
- Object duration in millisecondsdl
- Deadline in millisecondssu
- Startup flagsid
- Session IDot
- Object type
The system can detect several types of anomalies:
-
Buffering Issues
- Buffer starvation events
- Low buffer levels
-
Quality Degradation
- Significant bitrate drops
- Rapid bitrate fluctuations
-
Startup Issues
- Multiple startup events in the same session
- Long startup delays
-
Network Issues
- Throughput fluctuations
- Insufficient bandwidth for selected quality
- CTA-5004 CMCD specification
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Please see CONTRIBUTORS.md for a list of contributors.