Skip to content

shreyas-kamat/hyperrender-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FFmpeg Parallel Renderer (HyperRender)

This utility splits a video into fixed-length segments, applies an FFmpeg video filter to each segment in parallel using Python's multiprocessing, and then merges the processed segments back together.

CLI Usage

python ffmpeg_parallel_render.py input.mp4 -d 10 -f "format=gray" -w 4 -o output.mp4

The script measures sequential processing time (Before) and parallel processing time (After) and prints a speedup value.

Flask API Usage

Start the API server:

python app.py

The server runs on http://localhost:5000.

Endpoints

POST /api/render - Submit a video for processing

  • Request: multipart form data with file and optional parameters
    • file: video file (required)
    • filter: FFmpeg filter string (default: "format=gray")
    • segment_duration: seconds per segment (default: 10)
    • workers: number of parallel workers (default: cpu_count-1)
  • Response: { "task_id": "...", "status": "queued", "message": "..." }

GET /api/status/<task_id> - Check processing status

  • Response: { "task_id": "...", "status": "...", "sequential_time": ..., "parallel_time": ..., "speedup": ..., "analytics": {...} }

GET /api/analytics/<task_id> - Get detailed analytics report (Before vs After timing, speedup, efficiency, time breakdown)

  • Response: Comprehensive analytics with before/after comparison

GET /api/download/<task_id> - Download processed video (when completed)

DELETE /api/task/<task_id> - Cancel a task

GET /api/tasks - List all tasks

GET /api/health - Health check

Analytics Features

The API tracks comprehensive timing metrics:

  • Before/After Comparison - Sequential vs Parallel processing times
  • Speedup Metrics - How many times faster parallel processing is
  • Efficiency Percentage - How well parallelism is being utilized
  • Time Breakdown - Split, process, and merge times
  • Segment Details - Per-segment processing metrics

See ANALYTICS.md for detailed documentation.

View Analytics with CLI

Use the analytics viewer to display results in a formatted table:

python analytics_viewer.py <task_id>

Requirements

  • ffmpeg and ffprobe must be installed and on your PATH.
  • Python 3.7+

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages