Subway Surfers transforms articles or text into engaging gameplay videos with subtitles
4.2K
A comprehensive Flask web application that automatically generates engaging Subway Surfers-style videos with text-to-speech narration and synchronized captions from articles or text input.
Transform articles and text into captivating TikTok-style videos with Subway Surfers gameplay backgrounds. This application helps users absorb information more effectively by creating engaging video content that captures and maintains attention.

For complete version history, see version.pyā
# Pull and run the latest version
docker run -p 5000:5000 \
-e WHISPER_ASR_URL=http://your-whisper-server:9000 \
-v /path/to/videos:/app/static \
tebwritescode/subwaysurfers-text20:latest
# Or use Docker Compose
docker-compose up -d
# Clone the repository
git clone https://github.com/tebwritescode/subwaysurfers-text-multi.git
cd subwaysurfers-text-multi
# Set up Python environment
python3.12 -m venv .venv
source ./.venv/bin/activate
# Install dependencies
pip install -r requirements-pip.txt
# Download required models
# 1. Download Vosk English Model from:
# https://alphacephei.com/vosk/models/vosk-model-en-us-0.22.zip
# Extract to ./static/vosk-model-en-us-0.22/
# 2. Add background videos to ./static/
# Download sample: https://drive.google.com/file/d/1ZyFZKIB1HiZM_XDQPRRiiAIvU4sgl10k/view
# Start the application
python app.py
# Or with Flask
flask run
Access the application at http://localhost:5000
| Variable | Default | Description |
|---|---|---|
FLASK_PORT | 5000 | Web server port |
WHISPER_ASR_URL | http://localhost:9000 | WhisperASR service URL |
CAPTION_TIMING_OFFSET | 0.25 | Caption display offset in seconds |
SOURCE_VIDEO_DIR | ./static | Directory containing background videos |
MODEL_PATH | ./static/vosk-model-en-us-0.22 | Path to Vosk speech model |
DOCKER_ENV | false | Set to true when running in Docker |
# Using Docker Hub image
docker run -p 5000:5000 \
-e WHISPER_ASR_URL=http://your-whisper-server:9000 \
-e CAPTION_TIMING_OFFSET=-0.1 \
-v /path/to/videos:/app/static \
tebwritescode/subwaysurfers-text20:latest
# Using Docker Compose
docker-compose up -d
Docker Hub: https://hub.docker.com/r/tebwritescode/subwaysurfers-text20ā
The application randomly selects from:
subwaysurfers-text-multi/
āāā š app.py # Flask application and routes
āāā š sub.py # Core video generation logic
āāā š tiktokvoice.py # TikTok TTS integration
āāā š whisper_timestamper.py # WhisperASR timing sync
āāā š videomaker.py # Video composition and captioning
āāā š cleantext.py # Text preprocessing utilities
āāā š version.py # Version tracking and history
āāā š requirements-pip.txt # Python dependencies
āāā š requirements-docker.txt # Docker-specific dependencies
āāā š Dockerfile # Container configuration
āāā š docker-compose.yml # Docker composition
āāā š templates/ # HTML templates
ā āāā index.html # Main generation interface
ā āāā videos.html # Video browser
ā āāā progress.html # Progress tracking
ā āāā output.html # Video display page
āāā š static/ # Static assets
ā āāā styles.css # Application styles
ā āāā *.mp4 # Background videos
ā āāā vosk-model-en-us-0.22/ # Speech recognition model
āāā š final_videos/ # Generated video storage
# Run with test data
python app.py --test
# Clean generated videos
./clean.sh
# Process multiple texts
./concat.sh
# Build multi-arch image
docker buildx build --platform linux/amd64,linux/arm64 \
-t tebwritescode/subwaysurfers-text20:latest \
-t tebwritescode/subwaysurfers-text20:v1.1.22 \
--push .
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSEā file for details.
Created by: tebbydog0605ā
Docker Hub: tebwritescodeā
Website: teb.codesā
Content type
Image
Digest
sha256:240227851ā¦
Size
236.6 MB
Last updated
2 months ago
docker pull tebwritescode/subwaysurfers-text20