HLS Analyzer is an open-source tool that fetches .m3u8 files (HLS playlists), sends them to ChatGPT, and receives analysis on stream integrity.
It follows RFC-8216 (HLS standard) to detect errors and anomalies in the playlist structure.
- Downloads
.m3u8files dynamically from a given URL. - Validates stream integrity using ChatGPT (GPT-3.5 Turbo).
- Runs ffprobe on the .ts segment to verify stream properties.
- Fast & Lightweight, built with Java + Maven.
- API Key Management via
config.propertiesor environment variables. - Open Source under Apache License 2.0.
git clone https://github.com/serrss/hls-ai-analyzer.git
cd hls-ai-analyzerCheck Java:
java -versionCheck Maven:
mvn -versionJava 17+ is required!
You must provide an OpenAI API key.
Create a file src/main/resources/config.properties:
openai.api.key=sk-your-api-key-hereDO NOT commit this file! Add it to
.gitignore.
export OPENAI_API_KEY="sk-your-api-key-here"(For Windows: use set OPENAI_API_KEY="sk-your-api-key-here" in CMD.)
The tool requires ffprobe to analyze .ts media files.
Install on macOS (via Homebrew):
brew install ffmpegInstall on Ubuntu:
sudo apt update && sudo apt install ffmpegInstall on Windows: Download from FFmpeg official site and add it to your system PATH.
mvn clean packagejava -jar target/hls-analyzer-1.0-SNAPSHOT.jar✅ If the manifest is valid:
{"status": "OK", "message": "Manifest is correct"}❌ If errors are found:
{"status": "FAIL", "message": "Segment duration mismatch at #EXTINF:10.5 (should be 10.0)"}This project is licensed under Apache License 2.0.
See LICENSE for details.
Contributions are welcome! If you find a bug or have a feature request:
- Fork the repository on GitHub.
- Create a feature branch (
git checkout -b feature-new). - Commit your changes (
git commit -m "Add new feature"). - Push to GitHub (
git push origin feature-new). - Open a Pull Request.
Author: Serhii Romanov
Email: [email protected]
GitHub: serrss