Skip to content

The goal of this project is to build a containerized web application that provides a graphical interface for FFmpeg. Users will be able to upload media files, configure advanced encoding/transcoding settings, launch jobs, and monitor their status.

License

Notifications You must be signed in to change notification settings

rendiffdev/ffmpeg-webgui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FFmpeg Web GUI in Docker

A containerized web application that serves as a full-featured web GUI for FFmpeg. This tool provides an intuitive interface for uploading media files, configuring advanced encoding/transcoding settings, and managing processing jobs. It also integrates VMAF (Video Multi-Method Assessment Fusion) scoring to evaluate the quality of each transcoded file.


FFmpeg WebGUI Screenshots

HLS Example

HLS Example

VP9 Example

VP9 Example

Table of Contents


Overview

This project provides a web-based interface for FFmpeg, enabling users to perform advanced encoding and transcoding tasks with ease. The application runs inside a Docker container, ensuring a consistent environment and simplified deployment. Users can monitor job status, view detailed logs, and even assess quality with integrated VMAF scoring.


Objectives

  • User-Friendly Web Interface: Offer an intuitive GUI suitable for both novice and advanced users.
  • Advanced FFmpeg Integration: Support a wide range of codecs, formats, filters, and custom parameters.
  • Job Management: Enable users to queue, monitor, and control transcoding jobs with real-time updates.
  • Quality Assessment: Automatically compute and display VMAF scores for each processed job.
  • Containerization: Deploy the application within Docker to guarantee consistency and ease of deployment.

Key Features

User Management

  • Authentication & Authorization: Secure login system with role-based access (admin vs. standard users).
  • Dashboard: A summary view of recent jobs, system status, and resource usage.

File Management

  • File Upload/Selection: Options to upload local files or specify file paths accessible by the container.
  • Input Validation: Checks for supported file formats and size limits before processing.

FFmpeg Job Configuration

  • Preset Options: Ready-to-use presets for common tasks (e.g., 1080p H.264, 4K HEVC).
  • Custom Command Builder:
    • Define advanced FFmpeg parameters including codecs (H.264, H.265, VP9, AV1) and formats (MP4, MKV, WebM, MOV).
    • Utilize filters for scaling, deinterlacing, denoising, color correction, etc.
    • Configure bitrate, CRF values, two-pass encoding, and other quality settings.
  • Advanced Options:
    • Integration with libraries like libx264, libx265, and libvmaf.
    • Custom audio/video stream mapping, subtitle overlays, and more.

VMAF Integration

  • Quality Analysis: Automatically compute VMAF scores post-encoding by comparing the source and encoded files.
  • Reporting: Detailed job reports with VMAF scores, quality graphs, and log data.

Job Management & Monitoring

  • Job Queue: Support for multiple concurrent or sequential encoding jobs.
  • Real-Time Status: Live updates showing progress, estimated completion time, and command status.
  • Logging & History: Detailed logs for each job, with error tracking and historical data.
  • Notifications: Email or in-app alerts on job completion or failures.

Administration & System Settings

  • Resource Management: Monitor CPU, memory, and disk usage during transcoding jobs.
  • Configuration Panel: Admin interface for system-wide FFmpeg defaults, Docker resource settings, and log management.
  • API Access: RESTful endpoints for integration with external systems or automation workflows.

Architecture

The application is built with a modern web stack:

  • Frontend: Built using a JavaScript framework (React, Vue, or Angular) for a dynamic user experience.
  • Backend: A RESTful API implemented in Python (Flask/Django) or Node.js (Express) to handle job submissions, process management, and integration with FFmpeg.
  • FFmpeg Integration: The backend constructs and executes FFmpeg commands based on user input while monitoring subprocess outputs.
  • VMAF Processing: Uses FFmpeg's built-in libvmaf filter or an external library for quality scoring.
  • Database: A lightweight database (SQLite or PostgreSQL) to track user data, job metadata, and logs.
  • Containerization: The entire application runs inside a Docker container, ensuring consistent deployment and operation.

System Diagram:


+------------------+      HTTP/HTTPS       +--------------------+
|    Web Browser   | <-------------------> |  Web Server (API)  |
+------------------+                        +---------+----------+
                                                     |
                                                     | Subprocess management
                                                     v
                                               +--------------+
                                               |    FFmpeg    |
                                               | (with VMAF)  |
                                               +--------------+
                                                     |
                                                     | File I/O (volumes)
                                                     v
                                               +--------------+
                                               |   Storage    |
                                               | (Docker Vol.)|
                                               +--------------+

Implementation Details

Dockerfile Sample

FROM ubuntu:22.04

# Install dependencies and FFmpeg with required libraries
RUN apt-get update && apt-get install -y \
    ffmpeg \
    python3 \
    python3-pip \
    nginx \
    # (Include additional libraries such as libx264, libx265, libvmaf if not bundled with ffmpeg)

# Copy application code
COPY ./app /opt/app

# Install Python dependencies
RUN pip3 install -r /opt/app/requirements.txt

# Expose port 80 for web access
EXPOSE 80

# Start the web server (using gunicorn, for example)
CMD ["gunicorn", "--bind", "0.0.0.0:80", "app:app"]

Job Management Module

  • Command Generation: Dynamically construct FFmpeg commands based on user inputs.
  • Process Management: Use a task queue (e.g., Celery for Python or Bull for Node.js) for managing long-running jobs.
  • Real-Time Updates: Implement WebSocket or long polling to provide live updates on job status.

VMAF Score Integration

Utilize FFmpeg’s libvmaf filter to compute quality scores:

ffmpeg -i input.mp4 -i encoded.mp4 -lavfi libvmaf="log_path=./vmaf_log.json" -f null -

Parse the resulting JSON output to display quality metrics in the job report.


Testing and Quality Assurance

  • Unit & Integration Tests: Test individual modules (job scheduler, command builder, VMAF integration).
  • User Acceptance Testing: Conduct pilot tests with target users to refine UI/UX.
  • Performance Testing: Benchmark under load to ensure robust concurrent job handling.

Deployment and Maintenance

  • CI/CD: Automate building, testing, and deployment using continuous integration pipelines.
  • Documentation: Provide comprehensive user guides, API documentation, and developer setup instructions.
  • Monitoring: Integrate logging and monitoring tools (e.g., Prometheus/Grafana) for ongoing system performance and resource usage tracking.

License

Distributed under the MIT License. See LICENSE for more information.

About

The goal of this project is to build a containerized web application that provides a graphical interface for FFmpeg. Users will be able to upload media files, configure advanced encoding/transcoding settings, launch jobs, and monitor their status.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •