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.
- Overview
- Objectives
- Key Features
- Architecture
- Implementation Details
- Testing and Quality Assurance
- Deployment and Maintenance
- License
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.
- 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.
- 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 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.
- 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.
- 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 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.
- 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.
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.)|
+--------------+
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"]
- 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.
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.
- 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.
- 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.
Distributed under the MIT License. See LICENSE
for more information.