This is a comprehensive Flask web application designed to process, stream, and automatically generate subtitles for video files. Users can either upload local videos or provide a URL for a video to be downloaded using yt-dlp. The application then generates subtitles using the powerful faster-whisper library, converts the video to HLS for efficient streaming, and provides a modern web player.
This project provides a user-friendly web interface for the core technology found in the faster-auto-subtitle project.
-
Dual Input Methods:
-
Upload local video files directly through the browser.
-
Paste a URL from any
yt-dlpsupported site.
-
-
Automatic Subtitle Generation:
-
Uses the
faster-whisperlibrary, a highly optimized implementation of OpenAI's Whisper model. -
Option to upload a custom
.srtfile. -
Advanced Control:
-
Choose from a wide range of Whisper models (from
mediumtolarge-v3-turbo). -
Select the processing task:
translate(to English) ortranscribe(keep original language).
-
-
-
Efficient Streaming:
- Automatically converts videos to HTTP Live Streaming (HLS) format for adaptive bitrate streaming.
-
Modern Web Interface:
-
Clean UI built with TailwindCSS and Alpine.js.
-
Automatic thumbnail generation for video previews.
-
List, play, and delete processed videos.
-
-
Feature-Rich Player:
-
Modern Video.js player.
-
Tap/click on the sides of the player to seek forward or backward.
-
Subtitle support (
.vttformat, converted on-the-fly).
-
Before you begin, ensure you have the following installed on your system:
-
Python 3.11 or newer:
- This is required by the underlying
faster-whisperlibrary. Check your version withpython --version.
- This is required by the underlying
-
FFmpeg: This is essential for video processing (thumbnailing, HLS conversion).
-
Windows: Download the binaries from the FFmpeg website and add the
binfolder to your system's PATH. -
macOS (using Homebrew):
brew install ffmpeg -
Linux (Debian/Ubuntu):
sudo apt update && sudo apt install ffmpeg
-
-
(Optional, but Highly Recommended) NVIDIA GPU with CUDA 12:
-
To significantly speed up subtitle generation,
faster-whisperrequires CUDA 12 to run on a GPU. -
You must install the NVIDIA CUDA Toolkit 12.x. Make sure the version is compatible with your GPU driver. For more details, see the faster-whisper installation guide.
-