Blame
|
1 | # 🎮 Subway Surfers Text-to-Video Generator |
||||||
| 2 | > Behold: a Flask-powered monstrosity that slaps together gameplay footage, TikTok voices, and on-point captions—giving your boring text the glow-up it never knew it needed. |
|||||||
| 3 |  |
|||||||
| 4 |  |
|||||||
| 5 |  |
|||||||
| 6 |  |
|||||||
| 7 |  |
|||||||
|
8 | |||||||
|
9 | ## ⚡ What the Heck Is This? |
||||||
| 10 | Turn your articles—or your random stream-of-consciousness into short-form crack. With Subway Surfers gameplay. Because apparently, our brains now need dopamine and parkour to learn a damn thing. This app makes it fast, fun, and freakishly effective. Get that sweet virality hit. |
|||||||
|
11 | |||||||
|
12 | --- |
||||||
|
13 | |||||||
| 14 | ## 📸 Screenshots |
|||||||
| 15 | ||||||||
| 16 | ||||||||
|
17 | ## 🆕 Version 1.1.22 — We’re Not in Beta Anymore, Baby |
||||||
| 18 | 🏁 It’s production-ready, polished, and packs some serious features: |
|||||||
| 19 | - ✅ WhisperASR joins the party for laser-accurate captions |
|||||||
| 20 | - ✅ Will chew through long text like a pro—no irritating cutoffs |
|||||||
| 21 | - ✅ Fine-tuned caption timing for when milliseconds matter |
|||||||
| 22 | - ✅ Docker build now squeaky clean and snappy |
|||||||
| 23 | - ✅ Wiped all temps and test outputs—Marie Kondo would be proud |
|||||||
| 24 | ||||||||
| 25 | ### 🚀 Previously on "Holy Hell, This App Got Stuff" |
|||||||
| 26 | - ✅ Watch your video generate in real time like it's 1999 |
|||||||
| 27 | - ✅ Choose your favorite TikTok voice—Brian or bust |
|||||||
| 28 | - ✅ Browse your masterpieces in-app like a proper social media producer |
|||||||
| 29 | - ✅ Survives crashes like a cockroach in an apocalypse |
|||||||
|
30 | |||||||
|
31 | 📜 Wanna see the full changelog? It’s hanging out in [version.py](version.py). |
||||||
|
32 | |||||||
|
33 | --- |
||||||
|
34 | |||||||
| 35 | ## ✨ Magical Powers (aka Features) |
|||||||
| 36 | ### 🎬 Video Generation Wizardry |
|||||||
| 37 | - Scrape the useful text from pages or input it directly |
|||||||
| 38 | - Narration via TikTok’s vocal besties |
|||||||
| 39 | - Subtitles locked in like clockwork—with tweakable timing |
|||||||
| 40 | - Auto-looping gameplay on repeat while your message goes viral |
|||||||
| 41 | - See every glorious progress bar along the way |
|||||||
| 42 | ||||||||
| 43 | ### 🎙️ Text-To-Speech Goodness |
|||||||
| 44 | - TikTok voices so real, it’s uncanny |
|||||||
| 45 | - Plays nice with long texts, even War and Peace levels |
|||||||
| 46 | - Strip-clean text for pronunciation perfection |
|||||||
| 47 | - Adjustable speed so you can go Morgan Freeman slow or auctioneer fast |
|||||||
| 48 | ||||||||
| 49 | ### 📱 Sleek, Sexy UI |
|||||||
| 50 | - Modern, mobile-ready, and not hideous to look at |
|||||||
| 51 | - Watch your progress *actually* progress |
|||||||
| 52 | - Full-on video manager and preview |
|||||||
| 53 | - Flash messages for feedback, because silence is for losers |
|||||||
| 54 | ||||||||
| 55 | ### 🔧 Under-the-Hood Insanity |
|||||||
| 56 | - WhisperASR makes sure your captions don’t miss a beat |
|||||||
| 57 | - Dockerified for painless deployment |
|||||||
| 58 | - Configuration heaven (caption offsets, model paths, the works) |
|||||||
| 59 | - Doesn’t crash when life gives you lemons |
|||||||
| 60 | ||||||||
| 61 | --- |
|||||||
| 62 | ||||||||
| 63 | ## 🚀 Quickstart: Make It Go Brrr |
|||||||
| 64 | ### 🧙 You Will Need |
|||||||
| 65 | - Python 3.12+ and pip (no dinosaurs allowed) |
|||||||
| 66 | - FFmpeg (the secret sauce) |
|||||||
| 67 | - OR Docker (the easy button) |
|||||||
| 68 | ||||||||
| 69 | ### Installation Path #1: Docker All the Damn Way (Recommended) |
|||||||
| 70 | ```bash |
|||||||
| 71 | docker run -p 5000:5000 \ |
|||||||
| 72 | -e WHISPER_ASR_URL=http://your-whisper-server:9000 \ |
|||||||
| 73 | -v /path/to/videos:/app/static \ |
|||||||
|
74 | tebwritescode/subwaysurfers-text20:latest |
||||||
| 75 | ``` |
|||||||
|
76 | |||||||
| 77 | Or slap it up with Docker Compose: |
|||||||
| 78 | ```bash |
|||||||
| 79 | docker-compose up -d |
|||||||
|
80 | ``` |
||||||
|
81 | |||||||
|
82 | ### Installation Path #2: Do It Yourself, You Brave Nerd |
||||||
| 83 | ```bash |
|||||||
| 84 | git clone https://github.com/tebwritescode/subwaysurfers-text-multi.git |
|||||||
| 85 | cd subwaysurfers-text-multi |
|||||||
| 86 | python3.12 -m venv .venv |
|||||||
| 87 | source ./.venv/bin/activate |
|||||||
| 88 | pip install -r requirements-pip.txt |
|||||||
| 89 | ``` |
|||||||
|
90 | |||||||
|
91 | Now for the secret ingredients: |
||||||
| 92 | - 👂 Get the Vosk model: |
|||||||
| 93 | https://alphacephei.com/vosk/models/vosk-model-en-us-0.22.zip |
|||||||
| 94 | Unzip that sucker into `./static/vosk-model-en-us-0.22/` |
|||||||
| 95 | - 🎮 Add background gameplay to `./static/` (grab a sample: |
|||||||
| 96 | https://drive.google.com/file/d/1ZyFZKIB1HiZM_XDQPRRiiAIvU4sgl10k/view) |
|||||||
|
97 | |||||||
|
98 | Fire. It. Up: |
||||||
| 99 | ```bash |
|||||||
| 100 | python app.py |
|||||||
| 101 | # Or the Flask way |
|||||||
| 102 | flask run |
|||||||
|
103 | ``` |
||||||
| 104 | ||||||||
|
105 | Then slide into `http://localhost:5000` and get generating. |
||||||
| 106 | ||||||||
| 107 | --- |
|||||||
| 108 | ||||||||
| 109 | ## 🛠️ Tweaky Settings (Because You’re Fancy) |
|||||||
| 110 | | Name | Default | What It Does | |
|||||||
| 111 | |------|---------|---------------| |
|||||||
| 112 | | `FLASK_PORT` | 5000 | Port for your web wizardry | |
|||||||
| 113 | | `WHISPER_ASR_URL` | http://localhost:9000 | Caption whisperer’s URL | |
|||||||
| 114 | | `CAPTION_TIMING_OFFSET` | 0.25 | Controls how early/late your captions appear | |
|||||||
| 115 | | `SOURCE_VIDEO_DIR` | ./static | Folder where your gaming chaos lives | |
|||||||
| 116 | | `MODEL_PATH` | ./static/vosk-model-en-us-0.22 | Location of Vosk’s big brain | |
|||||||
| 117 | | `DOCKER_ENV` | false | Flip to true when running in a container | |
|||||||
|
118 | |||||||
|
119 | Quick Docker deploy reminder: |
||||||
| 120 | ```bash |
|||||||
| 121 | docker run -p 5000:5000 \ |
|||||||
| 122 | -e WHISPER_ASR_URL=http://your-whisper-server:9000 \ |
|||||||
| 123 | -e CAPTION_TIMING_OFFSET=-0.1 \ |
|||||||
| 124 | -v /path/to/videos:/app/static \ |
|||||||
|
125 | tebwritescode/subwaysurfers-text20:latest |
||||||
| 126 | ``` |
|||||||
|
127 | |||||||
|
128 | --- |
||||||
| 129 | ||||||||
| 130 | ## 📖 How to Wield the Power |
|||||||
| 131 | ### Generate a Video, Baby |
|||||||
| 132 | 1. Stroll over to the homepage |
|||||||
| 133 | 2. Drop in your favorite copy-pasta, or slap in a URL |
|||||||
| 134 | 3. Pick a voice (Jessie? Brian? Stitch? Go wild.) |
|||||||
| 135 | 4. Adjust speech speed if you’re feeling fancy |
|||||||
| 136 | 5. Click “Generate” and watch the sausage being made |
|||||||
| 137 | 6. Download or stream the glorious final product |
|||||||
| 138 | ||||||||
| 139 | ### Voices You’ll Love or Hate |
|||||||
| 140 | - Jessie — sassy, spunky, sounds like TikTok |
|||||||
| 141 | - Brian — Very British. Probably drinks earl grey. |
|||||||
| 142 | - Stitch — You already know he’s up to something. |
|||||||
| 143 | - Echo — Narrates your life like it’s a gritty documentary. |
|||||||
| 144 | - Oh, and more. Because OF COURSE there are more. |
|||||||
| 145 | ||||||||
| 146 | ### Hand-Picked Gameplay Backgrounds (aka: dopamine fuel) |
|||||||
| 147 | - Subway Surfers |
|||||||
| 148 | - Minecraft parkour (aka sweaty palms) |
|||||||
| 149 | - Pokémon |
|||||||
| 150 | - Factorio (factory go brrr) |
|||||||
| 151 | - StarCraft battles |
|||||||
| 152 | - Oddly satisfying slice clips |
|||||||
| 153 | ||||||||
| 154 | --- |
|||||||
| 155 | ||||||||
| 156 | ## 🏗️ How It All Stacks |
|||||||
| 157 | ``` |
|||||||
| 158 | subwaysurfers-text-multi/ |
|||||||
| 159 | ├── app.py # Flask brainstem |
|||||||
| 160 | ├── sub.py # Turns text into magic |
|||||||
| 161 | ├── tiktokvoice.py # Talks like TikTok |
|||||||
| 162 | ├── whisper_timestamper.py # Whisper those timestamps |
|||||||
| 163 | ├── videomaker.py # Mashes video + captions |
|||||||
| 164 | ├── cleantext.py # Makes your input less gross |
|||||||
| 165 | ├── version.py # Keeps track of app’s many glow-ups |
|||||||
| 166 | ├── requirements-pip.txt # Stuff Python needs |
|||||||
| 167 | ├── requirements-docker.txt # Stuff Docker needs |
|||||||
| 168 | ├── Dockerfile # Bottle it up |
|||||||
| 169 | ├── docker-compose.yml # Auto-magic orchestration |
|||||||
| 170 | ├── templates/ # HTML for humans |
|||||||
| 171 | ├── static/ # Game videos and models |
|||||||
| 172 | └── final_videos/ # Birthplace of brilliance |
|||||||
|
173 | ``` |
||||||
|
174 | |||||||
| 175 | 💻 Tech Stack: |
|||||||
| 176 | - Backend: Python 3.12, Flask |
|||||||
| 177 | - TTS: Our buddy TikTok |
|||||||
| 178 | - Speech: Vosk + Whisperlore |
|||||||
| 179 | - Video: MoviePy, FFmpeg, OpenCV madness |
|||||||
| 180 | - Frontend: HTML/CSS/JS that doesn’t suck |
|||||||
| 181 | - Container: Yeah, Docker is here too |
|||||||
| 182 | ||||||||
| 183 | --- |
|||||||
| 184 | ||||||||
| 185 | ## 🔐 Don’t Worry, It’s Not Sketchy |
|||||||
| 186 | - Input gets sanitized so trolls don’t win |
|||||||
| 187 | - Malicious URLs? Denied at the gate |
|||||||
| 188 | - Files renamed so they don’t nuke your machine |
|||||||
| 189 | - Docker gives it adult supervision |
|||||||
| 190 | - No login required—public chaos only |
|||||||
| 191 | ||||||||
|
192 | --- |
||||||
|
193 | |||||||
| 194 | ## 🛠️ For the Code-Wranglers |
|||||||
| 195 | ### Test Everything Before You Wreck Everything |
|||||||
| 196 | ```bash |
|||||||
| 197 | python app.py --test |
|||||||
| 198 | ./clean.sh # Delete past masterpieces |
|||||||
| 199 | ./concat.sh # Process like a content farm |
|||||||
|
200 | ``` |
||||||
|
201 | |||||||
| 202 | ### Build the Docker Unicorn |
|||||||
| 203 | ```bash |
|||||||
| 204 | docker buildx build --platform linux/amd64,linux/arm64 \ |
|||||||
| 205 | -t tebwritescode/subwaysurfers-text20:latest \ |
|||||||
| 206 | -t tebwritescode/subwaysurfers-text20:v1.1.22 \ |
|||||||
| 207 | --push . |
|||||||
|
208 | ``` |
||||||
|
209 | |||||||
|
210 | --- |
||||||
|
211 | |||||||
| 212 | ## 🐞 Known Bugs (We Keep It Real) |
|||||||
| 213 | - Big videos = big wait times. Queue a snack. |
|||||||
| 214 | - Weird characters might bamboozle the TTS |
|||||||
| 215 | - Long articles can piss off your browser—keep it snack-sized |
|||||||
| 216 | - WhisperASR server required if you actually want captions to line up |
|||||||
| 217 | ||||||||
| 218 | --- |
|||||||
| 219 | ||||||||
| 220 | ## 📊 Performance Stats |
|||||||
| 221 | - 2-5 minutes per minute of final vid |
|||||||
| 222 | - Eats up to 10,000 words like a champ |
|||||||
| 223 | - Optimized for videos under 10 mins |
|||||||
| 224 | - Section-splits large rants for smoother sailing |
|||||||
| 225 | ||||||||
|
226 | --- |
||||||
|
227 | |||||||
| 228 | ## 🛣️ Roadmap (aka what’s cookin’) |
|||||||
| 229 | - [ ] Delegate video crunching to its own nerdy container |
|||||||
| 230 | - [ ] Let users pick their gameplay drug of choice |
|||||||
| 231 | - [ ] Upload your own gameplay, you control freak |
|||||||
| 232 | - [ ] More voice options (maybe Darth Vader?) |
|||||||
| 233 | - [ ] Sneak peeks as the sausage gets stuffed |
|||||||
| 234 | - [ ] Mass-processing for the content addicted |
|||||||
| 235 | ||||||||
|
236 | --- |
||||||
|
237 | |||||||
| 238 | ## 🤝 Wanna Contribute? We Like You Already |
|||||||
| 239 | 1. Fork it like it’s hot |
|||||||
| 240 | 2. Branch out: `git checkout -b feature/amazing-feature` |
|||||||
| 241 | 3. Test until it breaks |
|||||||
| 242 | 4. Push your magic: `git push origin feature/amazing-feature` |
|||||||
| 243 | 5. Make that Pull Request and show us what you got |
|||||||
| 244 | ||||||||
|
245 | --- |
||||||
|
246 | |||||||
| 247 | ## 📝 License Stuff |
|||||||
| 248 | MIT License. You’re free to do most things, just don’t sue us. |
|||||||
| 249 | ||||||||
|
250 | --- |
||||||
|
251 | |||||||
| 252 | 👑 Made with caffeine, chaos, and code by [tebbydog0605](https://github.com/tebbydog0605) |
|||||||
| 253 | 📦 Docker Hub: [tebwritescode](https://hub.docker.com/u/tebwritescode) |
|||||||
| 254 | 🌐 Website: [teb.codes](https://teb.codes) |
|||||||