This generates captions for provided video and compares different models to do so
Python
0
7 commits
updated Nov 27, 2025
Generate video captions using Qwen3-Omni-30B on remote H100 cluster with a modern web interface.
Local Machine (MacBook)
โโโ Frontend (React+MUI - Port 3001)
โโโ Backend (FastAPI - Port 8001)
โโโ SSH Tunnels (localhost:8000, localhost:8080)
โ Encrypted SSH
Remote H100 Cluster (85.234.64.44)
โโโ vLLM Service (Qwen3-Omni-30B - Port 8000)
โโโ Video HTTP Server (Port 8080)
โโโ Videos: ~/datasets/videos/
โโโ Captions: ~/datasets/captions/
p_naresh with worker-9 nodeFirst time only - Set up the H100 cluster:
# See REMOTE_SETUP.md for complete guide
# Summary:
# 1. SSH to server: ssh [email protected]
# 2. Create directories: mkdir -p ~/datasets/{videos,captions}
# 3. Start vLLM service (see REMOTE_SETUP.md)
# 4. Start video HTTP server (see REMOTE_SETUP.md)
๐ Full instructions: REMOTE_SETUP.md
# Upload videos to remote server
rsync -avz --progress ./my-videos/ [email protected]:~/datasets/videos/
cd VideoCaptionService
cp .env.example .env
# .env is pre-configured for remote setup
In a separate terminal, run:
./scripts/start-tunnels.sh
This creates tunnels for:
Keep this terminal open!
./start.sh
This will:
VideoCaptionService/
โโโ backend/ # FastAPI backend (Docker)
โ โโโ app/
โ โ โโโ routers/ # API endpoints
โ โ โโโ services/ # Business logic (vLLM client)
โ โ โโโ utils/ # Helper functions
โ โโโ videos/ # (Not used - videos on remote)
โ โโโ captions/ # Generated captions (synced from remote)
โ
โโโ frontend/ # React frontend (Docker)
โ โโโ src/
โ โโโ components/ # UI components
โ โโโ services/ # API client
โ
โโโ scripts/ # Helper scripts
โ โโโ start-tunnels.sh # Establish SSH tunnels
โ โโโ sync-captions.sh # Sync captions from remote
โ
โโโ docker-compose.yml # Docker orchestration
โโโ start.sh # Startup script (checks tunnels)
โโโ stop.sh # Shutdown script
โโโ REMOTE_SETUP.md # Remote server setup guide
โโโ .env.example # Environment configuration
1. Start SSH Tunnels (if not already running):
./scripts/start-tunnels.sh
2. Start Local Services:
./start.sh
3. Use the Application:
4. Stop Local Services:
./stop.sh
Note: SSH tunnels and remote services remain running.
Upload videos to remote:
rsync -avz my_video.mp4 [email protected]:~/datasets/videos/
Sync captions to local:
./scripts/sync-captions.sh
View captions:
ls backend/captions/
cat backend/captions/my_video.mp4_qwen3-omni.json
Caption format:
{
"filename": "my_video.mp4",
"caption": "The video shows...",
"generated_at": "2025-11-05T10:30:00Z",
"processing_time_seconds": 45.2,
"model_name": "qwen3-omni",
"model_version": "Qwen/Qwen3-Omni-30B-A3B-Instruct"
}
Edit .env:
# Remote Server
[email protected]
REMOTE_VIDEOS_DIR=~/datasets/videos
REMOTE_CAPTIONS_DIR=~/datasets/captions
# SSH Tunnel Ports
VLLM_API_URL=http://localhost:8000
REMOTE_VIDEO_URL=http://localhost:8080
# Local Ports
BACKEND_PORT=8011
FRONTEND_PORT=3001
# Video Constraints
MAX_VIDEO_SIZE_MB=100 # Max file size
MAX_VIDEO_DURATION_SEC=300 # Max duration (5 min)
# Model
MODEL_NAME=qwen3-omni
# Check tunnel status
lsof -i :8000
lsof -i :8080
# Test vLLM connectivity
curl http://localhost:8000/v1/models
# Test video server
curl http://localhost:8080/
# Restart tunnels
lsof -ti:8000 | xargs kill
lsof -ti:8080 | xargs kill
./scripts/start-tunnels.sh
# Check container logs
docker-compose logs -f
# Check port conflicts
lsof -i :8001
lsof -i :3001
# Rebuild containers
docker-compose down
docker-compose up --build
Check:
./scripts/start-tunnels.shcurl http://localhost:8000/v1/modelsssh [email protected] "ls ~/datasets/videos/"curl http://localhost:8080/# SSH to remote server
ssh [email protected]
# Check vLLM status
squeue -u $USER
# View vLLM logs
tail -f qwen3-vllm-*.log
# Restart vLLM (see REMOTE_SETUP.md)
Once running, visit:
Key endpoints:
GET /api/videos - List all videos (from remote)POST /api/videos/{filename}/caption - Generate caption (via vLLM)GET /api/videos/{filename}/caption - Get existing captionGET /api/videos/{filename}/stream - Stream video (from remote)This is a prototype service. Improvements welcome!
See LICENSE file.
For issues:
./scripts/start-tunnels.shdocker-compose logs -fcurl http://localhost:8000/v1/modelsHappy Captioning! ๐ฌ
This generates captions for provided video and compares different models to do so
Python
0
7 commits
updated Nov 27, 2025
Generate video captions using Qwen3-Omni-30B on remote H100 cluster with a modern web interface.
Local Machine (MacBook)
โโโ Frontend (React+MUI - Port 3001)
โโโ Backend (FastAPI - Port 8001)
โโโ SSH Tunnels (localhost:8000, localhost:8080)
โ Encrypted SSH
Remote H100 Cluster (85.234.64.44)
โโโ vLLM Service (Qwen3-Omni-30B - Port 8000)
โโโ Video HTTP Server (Port 8080)
โโโ Videos: ~/datasets/videos/
โโโ Captions: ~/datasets/captions/
p_naresh with worker-9 nodeFirst time only - Set up the H100 cluster:
# See REMOTE_SETUP.md for complete guide
# Summary:
# 1. SSH to server: ssh [email protected]
# 2. Create directories: mkdir -p ~/datasets/{videos,captions}
# 3. Start vLLM service (see REMOTE_SETUP.md)
# 4. Start video HTTP server (see REMOTE_SETUP.md)
๐ Full instructions: REMOTE_SETUP.md
# Upload videos to remote server
rsync -avz --progress ./my-videos/ [email protected]:~/datasets/videos/
cd VideoCaptionService
cp .env.example .env
# .env is pre-configured for remote setup
In a separate terminal, run:
./scripts/start-tunnels.sh
This creates tunnels for:
Keep this terminal open!
./start.sh
This will:
VideoCaptionService/
โโโ backend/ # FastAPI backend (Docker)
โ โโโ app/
โ โ โโโ routers/ # API endpoints
โ โ โโโ services/ # Business logic (vLLM client)
โ โ โโโ utils/ # Helper functions
โ โโโ videos/ # (Not used - videos on remote)
โ โโโ captions/ # Generated captions (synced from remote)
โ
โโโ frontend/ # React frontend (Docker)
โ โโโ src/
โ โโโ components/ # UI components
โ โโโ services/ # API client
โ
โโโ scripts/ # Helper scripts
โ โโโ start-tunnels.sh # Establish SSH tunnels
โ โโโ sync-captions.sh # Sync captions from remote
โ
โโโ docker-compose.yml # Docker orchestration
โโโ start.sh # Startup script (checks tunnels)
โโโ stop.sh # Shutdown script
โโโ REMOTE_SETUP.md # Remote server setup guide
โโโ .env.example # Environment configuration
1. Start SSH Tunnels (if not already running):
./scripts/start-tunnels.sh
2. Start Local Services:
./start.sh
3. Use the Application:
4. Stop Local Services:
./stop.sh
Note: SSH tunnels and remote services remain running.
Upload videos to remote:
rsync -avz my_video.mp4 [email protected]:~/datasets/videos/
Sync captions to local:
./scripts/sync-captions.sh
View captions:
ls backend/captions/
cat backend/captions/my_video.mp4_qwen3-omni.json
Caption format:
{
"filename": "my_video.mp4",
"caption": "The video shows...",
"generated_at": "2025-11-05T10:30:00Z",
"processing_time_seconds": 45.2,
"model_name": "qwen3-omni",
"model_version": "Qwen/Qwen3-Omni-30B-A3B-Instruct"
}
Edit .env:
# Remote Server
[email protected]
REMOTE_VIDEOS_DIR=~/datasets/videos
REMOTE_CAPTIONS_DIR=~/datasets/captions
# SSH Tunnel Ports
VLLM_API_URL=http://localhost:8000
REMOTE_VIDEO_URL=http://localhost:8080
# Local Ports
BACKEND_PORT=8011
FRONTEND_PORT=3001
# Video Constraints
MAX_VIDEO_SIZE_MB=100 # Max file size
MAX_VIDEO_DURATION_SEC=300 # Max duration (5 min)
# Model
MODEL_NAME=qwen3-omni
# Check tunnel status
lsof -i :8000
lsof -i :8080
# Test vLLM connectivity
curl http://localhost:8000/v1/models
# Test video server
curl http://localhost:8080/
# Restart tunnels
lsof -ti:8000 | xargs kill
lsof -ti:8080 | xargs kill
./scripts/start-tunnels.sh
# Check container logs
docker-compose logs -f
# Check port conflicts
lsof -i :8001
lsof -i :3001
# Rebuild containers
docker-compose down
docker-compose up --build
Check:
./scripts/start-tunnels.shcurl http://localhost:8000/v1/modelsssh [email protected] "ls ~/datasets/videos/"curl http://localhost:8080/# SSH to remote server
ssh [email protected]
# Check vLLM status
squeue -u $USER
# View vLLM logs
tail -f qwen3-vllm-*.log
# Restart vLLM (see REMOTE_SETUP.md)
Once running, visit:
Key endpoints:
GET /api/videos - List all videos (from remote)POST /api/videos/{filename}/caption - Generate caption (via vLLM)GET /api/videos/{filename}/caption - Get existing captionGET /api/videos/{filename}/stream - Stream video (from remote)This is a prototype service. Improvements welcome!
See LICENSE file.
For issues:
./scripts/start-tunnels.shdocker-compose logs -fcurl http://localhost:8000/v1/modelsHappy Captioning! ๐ฌ