Blame

c5163d Tebby Dog 2025-07-06 22:29:58
Skip
1
# ๐Ÿš„ Subway Surfers Text-to-Video Converter
2
Skip the fairy-tale, just give me the code already --> [Click Here](https://teb.codes/2-Code/Docker/Subway-Surfers#using-docker-compose-like-a-true-king)
8181d1 Tebby Dog 2025-07-06 22:24:48
Updated with Satire
3
Inspired by the absolute legend [danielbonkowsky/subwaysurfers-text](https://github.com/danielbonkowsky/subwaysurfers-text), this project throws some sauce on the original concept. If this container saves you time (or your sanity), go drop a star on his project already, damn it.
4
## ๐Ÿš€ What the Hell Is This?
5
You ever try to focus on an article and your brain taps out after the second paragraph? Same. This little monster extracts text from a webpage and slaps it onto hyperactive **Subway Surfers** gameplay footageโ€”turning dry, boring content into something your scrolling-addicted brain can actually sit through. Perfect for TikTok, ADHD, or just making studying suck less.
6
You get:
7
๐Ÿง  smart content + ๐ŸŽฎ mindless gameplay = โœ… actual retention (probably)
d44433 Tebby Dog 2025-07-06 22:27:36
Screenie
8
## ๐Ÿ“ธ Screenshot
ce198c Tebby Dog 2025-07-13 01:43:40
Image order
9
![Generate](./Screenshot_2025-07-12_at_5.17.25_PM.png)
10
![Link](./Screenshot_2025-07-12_at_9.14.47_PM.png)
11
![Progress Bar](./Screenshot_2025-07-12_at_9.11.06_PM.png)
12
![View Current 1](./Screenshot_2025-07-12_at_9.12.03_PM.png)
13
![View Current 2](./Screenshot_2025-07-12_at_5.17.41_PM.png)
556e9c Tebby Dog 2025-07-13 01:41:46
Alt Text for images
14
![Browse](./Screenshot_2025-07-12_at_9.29.02_PM.png)
8181d1 Tebby Dog 2025-07-06 22:24:48
Updated with Satire
15
## ๐ŸŽฏ Oh Hell Yeah, Features
16
- Converts your average web article into a **Subway Surfers-screaming-TikTok-style video**
17
- Rips text straight from URLs
18
- Slaps it on top of fast-ass gameplay
19
- Bonus points: **speech-to-text powered by Vosk API**
20
- Built with **Flask + OpenCV + goose3 + Python + zero chill**
21
---
22
## ๐Ÿณ Running This Beast with Docker
149edb Tebby Dog 2025-07-13 04:52:18
Added environment variables
23
**Step 1:** Pull the image, because we're not building this crap from scratch:
8181d1 Tebby Dog 2025-07-06 22:24:48
Updated with Satire
24
```sh
25
docker pull tebwritescode/subwaysurfers-text20:latest
26
```
27
**Step 2:** Get the Vosk brain model and unzip it:
28
```sh
29
wget https://alphacephei.com/vosk/models/vosk-model-en-us-0.22.zip
30
unzip vosk-model-en-us-0.22.zip -d ./
31
rm vosk-model-en-us-0.22.zip
32
```
33
**Step 3:** Drop a gameplay video into `./sources` โ€” any `.mp4` will do. More videos = more fun. Only one? It'll reuse that sucker on every run.
149edb Tebby Dog 2025-07-13 04:52:18
Added environment variables
34
**Step 4:** Let's ride:
8181d1 Tebby Dog 2025-07-06 22:24:48
Updated with Satire
35
```sh
36
docker run -d --name subwaysurfers-text \
37
-v ./subwaysurfers/sources:/app/sources \
38
-v ./subwaysurfers/vosk-model-en-us-0.22:/app/static/vosk-model-en-us-0.22 \
39
-p 5000:5000 \
40
tebwritescode/subwaysurfers-text20:latest
41
```
42
**Step 5:** Fire up your browser and hit:
43
```
44
http://localhost:5000
45
```
46
Get ready to weep tears of productivity as your article runs across a CGI train track.
47
---
149edb Tebby Dog 2025-07-13 04:52:18
Added environment variables
48
## ๐Ÿ”ง Environment Variables For Control Freaks
49
Want to make this thing dance to your tune? Here are the variables you can tweak:
50
51
```sh
52
# Path to the Vosk TTS model
53
MODEL_PATH=static/vosk-model-en-us-0.22
54
55
# Where your Subway Surfers gameplay videos live
56
SOURCE_VIDEO_DIR=sources
57
58
# Pick a random source video each time?
59
# Set to "false" if you want to use a specific file (sources/myfile.mp4)
60
RANDOM_SOURCE=true
61
62
# How fast do you want that narration? (Default: 1)
63
# Higher = faster, lower = "I'm falling asleep here"
64
DEFAULT_SPEED=1
65
```
66
67
Add them to your docker run command like a boss:
68
69
```sh
70
docker run -d --name subwaysurfers-text \
71
-e MODEL_PATH=static/custom-model \
72
-e RANDOM_SOURCE=false \
73
-e SOURCE_VIDEO_DIR=sources/myfile.mp4 \
74
-e DEFAULT_SPEED=1.5 \
75
-v ./subwaysurfers/sources:/app/sources \
76
-v ./subwaysurfers/vosk-model-en-us-0.22:/app/static/vosk-model-en-us-0.22 \
77
-p 5000:5000 \
78
tebwritescode/subwaysurfers-text20:latest
79
```
8181d1 Tebby Dog 2025-07-06 22:24:48
Updated with Satire
80
149edb Tebby Dog 2025-07-13 04:52:18
Added environment variables
81
Or in your docker-compose like a champion:
82
83
```yaml
84
services:
85
subwaysurfers-text:
86
image: tebwritescode/subwaysurfers-text20:latest
87
environment:
88
- MODEL_PATH=static/vosk-model-en-us-0.22
89
- SOURCE_VIDEO_DIR=sources
90
- RANDOM_SOURCE=true
91
- DEFAULT_SPEED=1.2
92
volumes:
93
- <HOSTPATH>/sources:/app/sources
94
- <HOSTPATH>/vosk-model-en-us-0.22:/app/static/vosk-model-en-us-0.22
95
ports:
96
- "5000:5000"
97
```
98
---
229f24 Tebby Dog 2025-07-06 22:28:20
Crown
99
## ๐Ÿ›  Using Docker Compose Like a True King ๐Ÿ‘‘
8181d1 Tebby Dog 2025-07-06 22:24:48
Updated with Satire
100
Replace `<HOSTPATH>` with the full path to where your god-tier video and Vosk model live.
101
```yaml
102
services:
103
subwaysurfers-text:
104
image: tebwritescode/subwaysurfers-text20:latest
105
volumes:
106
- <HOSTPATH>/sources:/app/sources
107
- <HOSTPATH>/vosk-model-en-us-0.22:/app/static/vosk-model-en-us-0.22
108
ports:
109
- "5000:5000"
110
```
111
Start it up:
112
```sh
113
docker-compose up -d
114
```
115
Fun fact: if you only mount one `.mp4`, the app will always use that. Mount a folder of them? It picks a random vid each time. ๐ŸŽฒ
116
---
117
## ๐Ÿ The Dockerfile Straight-Up Breakdown
118
- Uses a slimmed-down official Python image
119
- Installs all the nasty dependencies (yes, even ffmpeg and build tools)
120
- Brings in Homebrew in case you're feeling fancy
121
- Copies the app, installs Python and brew packages
122
- Runs Flask like it means it
123
- Your container, your rules
124
---
125
## ๐Ÿ”ฎ Shit I Still Wanna Add
126
- Drop-down to select different AI voices (because not every AI wants to sound like Siri on Ambien)
149edb Tebby Dog 2025-07-13 04:52:18
Added environment variables
127
- ~NVIDIA GPU acceleration (because some of you have beefy rigs)~ Nixed this shit, GPU transcoding is slow AF
128
- ~Fix that annoying subtitle-stuck bug nobody asked for~ I think I squashed this fucker
8181d1 Tebby Dog 2025-07-06 22:24:48
Updated with Satire
129
---
130
## ๐Ÿง  Want to Run It Without Docker?
149edb Tebby Dog 2025-07-13 04:52:18
Added environment variables
131
You rebel. Here's the repo for bare-metal installs:
8181d1 Tebby Dog 2025-07-06 22:24:48
Updated with Satire
132
๐Ÿ‘‰ https://github.com/tebwritescode/subwaysurfers-text-multi
133
---
134
## ๐Ÿ† Big-Ass Credit Section
135
Massive props to [danielbonkowsky](https://github.com/danielbonkowsky/subwaysurfers-text) for the core idea. This is just a remixed, Dockerized, slightly louder sibling. Go say thanks.
136
---
137
## โš ๏ธ Final Note from His Royal Freshnessโ„ข
138
Yeah, the container works. It does the job. But it's packing a little extra weight and could use a clean-up. If trimming containers gives you a tech boner, PRs are wide open.
139
Enjoy learning like a hyper-caffeinated teenager on TikTok ๐Ÿš€