Skip to content

A high-performance REST API wrapper for FFprobe with local LLM powered media analysis. Get instant insights about any media file through a simple HTTP interface.

License

Notifications You must be signed in to change notification settings

rendiffdev/ffprobe-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FFprobe API - Enterprise Video Analysis

Production-ready video analysis platform with 49 quality control checks, AI insights, and broadcast compliance

Production Ready Quality Control Docker

Core Capabilities

  • πŸ“Ή Comprehensive Analysis: 49 quality control parameters with 83% industry standard coverage
  • πŸ€– AI-Powered Insights: Professional video engineering reports with local/cloud LLM integration
  • πŸ“Š Industry Metrics: VMAF, PSNR, SSIM analysis using Netflix-grade quality models
  • πŸ” Advanced Detection: Content analysis for blackness, freeze frames, clipping, broadcast compliance
  • πŸ—οΈ Enterprise Architecture: Scalable microservices with monitoring, security, and Docker optimization

Quick Start

# Start with Docker (recommended)
docker compose up -d

# Basic analysis (29 checks)
curl -X POST http://localhost:8080/api/v1/probe/file \
  -H "X-API-Key: demo-key" \
  -d '{"file_path": "/path/to/video.mp4"}'

# Enhanced analysis (49 checks)
curl -X POST http://localhost:8080/api/v1/probe/file \
  -H "X-API-Key: demo-key" \
  -d '{"file_path": "/path/to/video.mp4", "content_analysis": true}'

πŸ“‹ Complete Setup Guide β†’

System Architecture

Scalable microservices architecture with enterprise deployment options

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Client    │───▢│  FFprobe API │───▢│ PostgreSQL β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚   (Go/Gin)   β”‚    β”‚  Database   β”‚
                   β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
                   β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                   β”‚    Redis    β”‚    β”‚ Monitoring  β”‚
                   β”‚  (Caching)  β”‚    β”‚(Prometheus) β”‚  
                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ—οΈ Architecture Details β†’

Feature Overview

🎬 Professional Video Analysis

Complete metadata extraction with advanced quality control

  • FFprobe integration with 29 standard + 20 enhanced quality parameters
  • GOP analysis, chroma subsampling, bitrate mode detection
  • Content analysis: blackness, freeze frames, audio clipping detection
  • HLS/DASH streaming protocol support with batch processing

πŸ€– AI-Powered Engineering Reports

Professional insights with local and cloud LLM integration

  • Ollama local LLM support with configurable models
  • OpenRouter cloud AI fallback for enhanced capabilities
  • Quality recommendations and comparison analysis
  • Professional video engineering report generation

πŸ“Š Industry-Standard Quality Metrics

Netflix-grade quality assessment with broadcast compliance

  • VMAF (Video Multimethod Assessment Fusion) scoring
  • PSNR/SSIM objective quality measurements
  • EBU R128 loudness compliance validation
  • Frame-by-frame quality tracking and statistics

πŸ“‹ Complete Quality Checks (49 total) β†’

πŸ—οΈ Enterprise Production Features

Scalable, secure, and monitoring-ready architecture

  • Microservices with independent scaling capabilities
  • Security hardened with JWT/API key authentication
  • Prometheus monitoring with health checks and logging
  • Multi-stage Docker builds with resource optimization

Security & Authentication

Enterprise-grade security with multiple authentication methods

  • JWT token authentication with refresh tokens
  • API key authentication for service integration
  • Role-based access control (Admin, User, Pro, Premium)
  • Rate limiting with Redis and CORS configuration
  • Input validation and path traversal protection
  • Secure password hashing and database prepared statements

πŸ”’ Security Documentation β†’

API Overview

RESTful API with comprehensive video analysis endpoints

Endpoint Description Quality Checks
POST /api/v1/probe/file Analyze local video file 29 standard + 20 enhanced
POST /api/v1/probe/url Analyze video from URL 29 standard + 20 enhanced
POST /api/v1/probe/quick Fast basic analysis 29 standard only
POST /api/v1/batch/analyze Batch processing Configurable
GET /health System health check N/A

Enhanced Analysis

# Enable all 49 quality checks with content analysis
curl -X POST http://localhost:8080/api/v1/probe/file \
  -H "X-API-Key: your-api-key" \
  -d '{"file_path": "/path/to/video.mp4", "content_analysis": true}'

πŸ“– Complete API Documentation β†’

Production Deployment

Enterprise-ready with multiple deployment configurations

Deployment Resources Throughput Use Case
Development 4GB RAM, 2 cores 2-5 concurrent Testing, development
Production 8GB RAM, 4 cores 5-15 concurrent Medium-scale operations
Enterprise 16GB+ RAM, 8+ cores 15-50 concurrent High-volume processing

βš™οΈ Complete Deployment Guide β†’

Monitoring & Operations

Production-ready monitoring with Prometheus and structured logging

  • Health check endpoints with comprehensive system validation
  • Prometheus metrics for request rates, processing times, error tracking
  • Structured JSON logging with request IDs and audit trails
  • Optional Grafana Cloud integration for enterprise deployments

πŸ“Š Monitoring Setup β†’

Configuration

Comprehensive configuration with validation and environment-based settings

  • Server, database, and authentication configuration
  • Security settings with API keys and JWT token management
  • Storage configuration with upload and report directories
  • Optional LLM integration (Ollama local, OpenRouter cloud)
  • Production validation for all configuration parameters

βš™οΈ Configuration Reference β†’

Deployment Options

Multiple deployment strategies for different scales and requirements

  • Docker Compose: Recommended for development and production
  • Kubernetes: Enterprise-grade orchestration with scaling and monitoring
  • Cloud Providers: AWS, GCP, Azure deployment guides
  • Bare Metal: Traditional server deployment documentation

🐳 Deployment Guide β†’

Testing

Comprehensive test suite with unit, integration, and load testing

  • Unit tests for core business logic and utilities
  • Integration tests for database and external service operations
  • API endpoint testing with authentication and error handling
  • Load testing for performance validation

πŸ§ͺ Testing Guide β†’

Documentation

πŸ“– User Guides

πŸš€ Deployment

πŸ› οΈ Development

Troubleshooting

Common issues and performance optimization guidance

  • Authentication and database connection troubleshooting
  • FFmpeg and processing failure diagnostics
  • Performance tuning for database and memory management
  • Scaling recommendations for high-volume deployments

πŸ”§ Troubleshooting Guide β†’

Contributing

We welcome contributions from the community

  • Fork repository and create feature branches
  • Follow Go coding standards and security practices
  • Include comprehensive tests with all changes
  • Container-native development approach

πŸ‘₯ Contributing Guidelines β†’

License

MIT License - see LICENSE file for details.

Acknowledgments

  • FFmpeg Team - Excellent FFmpeg and FFprobe tools
  • Gin Framework - High-performance HTTP web framework
  • PostgreSQL - Robust database system
  • Netflix - VMAF quality assessment library
  • Go Community - Excellent ecosystem and tools

Support & Contact

Production Checklist

Pre-deployment validation checklist

  • Environment variables and secure API keys configured
  • SSL/TLS certificates and database security setup
  • Monitoring, alerting, and backup procedures enabled
  • Authentication, file uploads, and resource limits tested
  • Log rotation and storage configuration verified

πŸš€ Production Checklist β†’

About

A high-performance REST API wrapper for FFprobe with local LLM powered media analysis. Get instant insights about any media file through a simple HTTP interface.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Contributors 2

  •  
  •