This project provides an end-to-end pipeline for generating subtitles from video files. It includes preprocessing, subtitle extraction, and a web interface for user interaction.
-
Build the Docker image:
docker build -t subtitle_generation . -
Run the container:
docker run -p 8000:8000 -p 8501:8501 subtitle_generation
- Port 8000: FastAPI backend
- Port 8501: Streamlit frontend
-
To check where files are saved in DOCKER ```bash docker exec -it <container_name> bash
Where you can see all the files.
- Install Python 3.10+ and pip
- Install dependencies:
pip install torch torchvision torchaudio pip install -r requirement.txt
- Start the application:
bash start.sh
- dockerfile: Docker configuration to build and run the project in a containerized environment.
- front_end.py: Likely contains the Streamlit web interface for user interaction.
- main.py: Main entry point for the FastAPI backend server.
- requirement.txt: Lists all Python dependencies required for the project.
- start.sh: Shell script to start both backend and frontend services.
- readme.md: This documentation file.
Contains core Python scripts for processing videos and generating subtitles:
- full_movie_sub.py: Handles subtitle generation for full-length movies.
- functions.py: Utility functions used across the project.
- mail.py: Handles email notifications or sending results.
- subtitle.py: Main logic for subtitle extraction from video/audio.
- update_srt.py: Updates or merges SRT subtitle files.
Stores uploaded video files and generated subtitles, organized by unique session IDs:
- <session_id>/: Each session has its own folder.
- chunk/: Contains video chunks (e.g., 1.mp4, 2.mp4, ...).
- original_file/: Stores the original uploaded video file.
- srt/: Contains generated subtitle files (e.g., 1.srt, 2.srt, full.srt).
- The project exposes two ports: 8000 (FastAPI backend) and 8501 (Streamlit frontend).
- Make sure to have all dependencies installed as specified in
requirement.txt. - For any issues, check the logs