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)
15f83e Tebby Dog 2025-07-13 04:53:01
Formatting
3
8181d1 Tebby Dog 2025-07-06 22:24:48
Updated with Satire
4
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.
5
## ๐Ÿš€ What the Hell Is This?
6
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.
7
You get:
8
๐Ÿง  smart content + ๐ŸŽฎ mindless gameplay = โœ… actual retention (probably)
d44433 Tebby Dog 2025-07-06 22:27:36
Screenie
9
## ๐Ÿ“ธ Screenshot
ce198c Tebby Dog 2025-07-13 01:43:40
Image order
10
![Generate](./Screenshot_2025-07-12_at_5.17.25_PM.png)
11
![Link](./Screenshot_2025-07-12_at_9.14.47_PM.png)
12
![Progress Bar](./Screenshot_2025-07-12_at_9.11.06_PM.png)
13
![View Current 1](./Screenshot_2025-07-12_at_9.12.03_PM.png)
14
![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
15
![Browse](./Screenshot_2025-07-12_at_9.29.02_PM.png)
8181d1 Tebby Dog 2025-07-06 22:24:48
Updated with Satire
16
## ๐ŸŽฏ Oh Hell Yeah, Features
17
- Converts your average web article into a **Subway Surfers-screaming-TikTok-style video**
18
- Rips text straight from URLs
19
- Slaps it on top of fast-ass gameplay
20
- Bonus points: **speech-to-text powered by Vosk API**
21
- Built with **Flask + OpenCV + goose3 + Python + zero chill**
22
---
23
## ๐Ÿณ Running This Beast with Docker
149edb Tebby Dog 2025-07-13 04:52:18
Added environment variables
24
**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
25
```sh
26
docker pull tebwritescode/subwaysurfers-text20:latest
27
```
28
**Step 2:** Get the Vosk brain model and unzip it:
29
```sh
30
wget https://alphacephei.com/vosk/models/vosk-model-en-us-0.22.zip
31
unzip vosk-model-en-us-0.22.zip -d ./
32
rm vosk-model-en-us-0.22.zip
33
```
34
**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
35
**Step 4:** Let's ride:
8181d1 Tebby Dog 2025-07-06 22:24:48
Updated with Satire
36
```sh
37
docker run -d --name subwaysurfers-text \
38
-v ./subwaysurfers/sources:/app/sources \
39
-v ./subwaysurfers/vosk-model-en-us-0.22:/app/static/vosk-model-en-us-0.22 \
40
-p 5000:5000 \
41
tebwritescode/subwaysurfers-text20:latest
42
```
43
**Step 5:** Fire up your browser and hit:
44
```
45
http://localhost:5000
46
```
47
Get ready to weep tears of productivity as your article runs across a CGI train track.
48
---
149edb Tebby Dog 2025-07-13 04:52:18
Added environment variables
49
## ๐Ÿ”ง Environment Variables For Control Freaks
50
Want to make this thing dance to your tune? Here are the variables you can tweak:
51
52
```sh
53
# Path to the Vosk TTS model
54
MODEL_PATH=static/vosk-model-en-us-0.22
55
56
# Where your Subway Surfers gameplay videos live
57
SOURCE_VIDEO_DIR=sources
58
59
# Pick a random source video each time?
60
# Set to "false" if you want to use a specific file (sources/myfile.mp4)
61
RANDOM_SOURCE=true
62
63
# How fast do you want that narration? (Default: 1)
64
# Higher = faster, lower = "I'm falling asleep here"
65
DEFAULT_SPEED=1
66
```
67
68
Add them to your docker run command like a boss:
69
70
```sh
71
docker run -d --name subwaysurfers-text \
72
-e MODEL_PATH=static/custom-model \
73
-e RANDOM_SOURCE=false \
74
-e SOURCE_VIDEO_DIR=sources/myfile.mp4 \
75
-e DEFAULT_SPEED=1.5 \
76
-v ./subwaysurfers/sources:/app/sources \
77
-v ./subwaysurfers/vosk-model-en-us-0.22:/app/static/vosk-model-en-us-0.22 \
78
-p 5000:5000 \
79
tebwritescode/subwaysurfers-text20:latest
80
```
8181d1 Tebby Dog 2025-07-06 22:24:48
Updated with Satire
81
149edb Tebby Dog 2025-07-13 04:52:18
Added environment variables
82
Or in your docker-compose like a champion:
83
84
```yaml
85
services:
86
subwaysurfers-text:
87
image: tebwritescode/subwaysurfers-text20:latest
88
environment:
89
- MODEL_PATH=static/vosk-model-en-us-0.22
90
- SOURCE_VIDEO_DIR=sources
91
- RANDOM_SOURCE=true
92
- DEFAULT_SPEED=1.2
93
volumes:
94
- <HOSTPATH>/sources:/app/sources
95
- <HOSTPATH>/vosk-model-en-us-0.22:/app/static/vosk-model-en-us-0.22
96
ports:
97
- "5000:5000"
98
```
99
---
229f24 Tebby Dog 2025-07-06 22:28:20
Crown
100
## ๐Ÿ›  Using Docker Compose Like a True King ๐Ÿ‘‘
8181d1 Tebby Dog 2025-07-06 22:24:48
Updated with Satire
101
Replace `<HOSTPATH>` with the full path to where your god-tier video and Vosk model live.
102
```yaml
103
services:
104
subwaysurfers-text:
105
image: tebwritescode/subwaysurfers-text20:latest
106
volumes:
107
- <HOSTPATH>/sources:/app/sources
108
- <HOSTPATH>/vosk-model-en-us-0.22:/app/static/vosk-model-en-us-0.22
109
ports:
110
- "5000:5000"
111
```
112
Start it up:
113
```sh
114
docker-compose up -d
115
```
116
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. ๐ŸŽฒ
117
---
118
## ๐Ÿ The Dockerfile Straight-Up Breakdown
119
- Uses a slimmed-down official Python image
120
- Installs all the nasty dependencies (yes, even ffmpeg and build tools)
121
- Brings in Homebrew in case you're feeling fancy
122
- Copies the app, installs Python and brew packages
123
- Runs Flask like it means it
124
- Your container, your rules
125
---
126
## ๐Ÿ”ฎ Shit I Still Wanna Add
127
- 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
128
- ~NVIDIA GPU acceleration (because some of you have beefy rigs)~ Nixed this shit, GPU transcoding is slow AF
129
- ~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
130
---
131
## ๐Ÿง  Want to Run It Without Docker?
149edb Tebby Dog 2025-07-13 04:52:18
Added environment variables
132
You rebel. Here's the repo for bare-metal installs:
8181d1 Tebby Dog 2025-07-06 22:24:48
Updated with Satire
133
๐Ÿ‘‰ https://github.com/tebwritescode/subwaysurfers-text-multi
134
---
135
## ๐Ÿ† Big-Ass Credit Section
136
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.
137
---
138
## โš ๏ธ Final Note from His Royal Freshnessโ„ข
139
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.
140
Enjoy learning like a hyper-caffeinated teenager on TikTok ๐Ÿš€