Convert videos to subtitles with AI-powered transcription powered by OpenAI's Whisper via faster-whisper.
- ๐ฅ Upload video files and auto-transcribe
- ๐ Multi-language support (auto-detection)
- ๐ Translate subtitles to English
- ๐ Real-time progress tracking
- ๐พ MongoDB persistence for job history
- ๐จ Modern, responsive web UI
- โก No automatic polling - manual status checks only
- ๐ View all jobs with filtering
- ๐๏ธ Delete completed/failed jobs
- ๐ฅ Download SRT subtitles
- Python 3.8+
- MongoDB 4.0+
- FFmpeg
- 2GB free disk space
cd /home/ubuntu/video-transcriber
# First time setup (install dependencies)
bash setup.sh
# Make sure MongoDB is running
mongod &
# Start the application
cd app
python3 main.pyThe app will be available at: http://localhost:8000 (web UI). If deployed, the Transcribe UI is available at https://subs.ayush.ltd and the Game UI at https://game.ayush.ltd.
# Navigate to app directory
cd app
# Install requirements
pip3 install -r requirements.txtOr use the automated setup script:
bash ../setup.shOption A: Local MongoDB
mongod &Option B: Docker
docker run -d -p 27017:27017 --name mongo mongo:latestOption C: Verify it's running
# Check if MongoDB is running
pgrep mongod
# Or connect to it
mongocd app
# Simple start
python3 main.py
# Or with auto-reload (development)
uvicorn main:app --reload
# Or customize host/port
python3 main.py --host 0.0.0.0 --port 8000The app starts at: http://localhost:8000 (web UI). If hosted, access the Transcribe UI at https://subs.ayush.ltd and the Game UI at https://game.ayush.ltd.
- Open http://localhost:8000 in your browser
- Select a video file (MP4, MKV, AVI, etc.)
- Optional: Choose language and enable translation
- Click "Upload & Transcribe"
- Click "Check Status" to see progress
- When done, click "Download Subtitles"
cd app
# List all jobs
python3 list_jobs.py
# List only running jobs
python3 list_jobs.py --status running
# List completed jobs
python3 list_jobs.py --status donecd app
# Delete a specific job
python3 delete_jobs.py job_abc123
# Delete all failed jobs
python3 delete_jobs.py --status failed
# Delete all done jobs
python3 delete_jobs.py --status done# Create job
curl -X POST http://localhost:8000/api/jobs \
-F "file=@video.mp4" \
-F "language=en" \
-F "translate=true"
# Response
# {
# "job_id": "job_xyzw",
# "status": "pending"
# }
# Check status
curl http://localhost:8000/api/jobs/job_xyzw
# Download subtitles
curl http://localhost:8000/api/jobs/job_xyzw/subtitles -o subtitles.srt
# List all jobs
curl http://localhost:8000/api/jobs
# List running jobs
curl http://localhost:8000/api/jobs?status=running
The Game API provides endpoints to create and manage multiplayer "Guess the Imposter" sessions. Base path: /api.
Create a game (creator):
POST /api/game/create
Body: { "player_name": "Alice", "game_category": "animals", "max_players": 8 }
Join a game:
POST /api/game/{session_id}/join
Body: { "player_name": "Bob" }
Start game (creator only):
POST /api/game/{session_id}/start
Body: { "player_id": "<creator_id>" }
Get game state (returns players, phase, your topic):
GET /api/game/{session_id}?player_id={player_id}
Transition to voting (end discussion):
POST /api/game/{session_id}/transition-voting
Submit a vote:
POST /api/game/{session_id}/vote
Body: { "player_id": "<you>", "voted_for_id": "<target>" }
End voting (server-side trigger):
POST /api/game/{session_id}/end-voting
Get reveal/result:
GET /api/game/{session_id}/result
Start a new round (creator only):
POST /api/game/{session_id}/new-round
Player heartbeat (keep player active):
POST /api/game/{session_id}/heartbeat
Body: { "player_id": "..." }
Maintenance endpoints:
POST /api/games/cleanup-inactive
POST /api/games/cleanup
DELETE /api/game/{session_id}
video-transcriber/
โโโ app/
โ โโโ main.py # FastAPI application
โ โโโ worker.py # Transcription worker
โ โโโ database.py # MongoDB operations
โ โโโ game.py # Guess the Imposter game logic
โ โโโ Gemini.py # Gemini API integration (if applicable)
โ โโโ logging_config.py # Logging configuration
โ โโโ storage.py # Job status enums
โ โโโ requirements.txt # Python dependencies
โ โโโ app.log # Application logs
โโโ run.sh # Start the application
โโโ video-transcriber.service # Systemd service file
Default: mongodb://localhost:27017
To change, edit database.py:
MONGODB_URL = "mongodb://localhost:27017"
DATABASE_NAME = "video_transcriber"Default: small (good balance of speed/accuracy)
Options in worker.py:
tiny- Fastest, less accuratebase- Fast, decent accuracysmall- Balanced (default)medium- Slower, better accuracylarge- Slowest, best accuracy
model = WhisperModel(
"small", # Change model size here
device="cpu",
compute_type="int8"
)POST /api/jobs
200 OK - Job created
400 Bad Request - Missing file
500 Server Error - Upload failed
GET /api/jobs/{job_id}
200 OK - Job found
404 Not Found - Job doesn't exist
GET /api/jobs/{job_id}/subtitles
200 OK - Subtitles ready for download
404 Not Found - Job not found
400 Bad Request - Transcription not complete
GET /api/jobs
200 OK - Returns list of jobs
DELETE /api/jobs/{job_id}
200 OK - Job deleted
404 Not Found - Job doesn't exist
500 Server Error - Deletion failed
- First time takes 1-2 minutes (model download)
- Large videos take longer (proportional to duration)
- Using CPU instead of GPU is slower
- Check app.log for progress:
tail -f app.log
- CORS Enabled - Currently allows all origins (fine for local use)
- File Size Limit - 1GB max per upload
- No Authentication - Add auth middleware for production (TODO)
- Directory Listing - Disabled by default
For production:
- Restrict CORS origins
- Add authentication/API keys
- Set up HTTPS/SSL
- Implement rate limiting
- Use environment variables for config
OPEN to contributions! To contribute:
- Fork the repo
- Create a new branch (
git checkout -b feature/my-feature) - Make your changes and commit (
git commit -m "Add my feature") - Push to the branch (
git push origin feature/my-feature) - Open a pull request should be well-documented and tested. Check existing issues for ideas or open a new one to discuss your idea.
This project uses:
- FastAPI (MIT License)
- faster-whisper (MIT License)
- MongoDB (SSPL)
- FFmpeg (LGPL)