Blame
|
1 | # 🚄 Subway Surfers Text-to-Video Converter |
||||||
| 2 | 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. |
|||||||
| 3 | ||||||||
| 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 | ||||||||
| 7 | You get: |
|||||||
| 8 | 🧠 smart content + 🎮 mindless gameplay = ✅ actual retention (probably) |
|||||||
| 9 | ||||||||
|
10 | ## 📸 Screenshot |
||||||
| 11 | Add a screenshot here dumbass |
|||||||
| 12 |  |
|||||||
|
13 | |||||||
| 14 | ## 🎯 Oh Hell Yeah, Features |
|||||||
| 15 | - Converts your average web article into a **Subway Surfers-screaming-TikTok-style video** |
|||||||
| 16 | - Rips text straight from URLs |
|||||||
| 17 | - Slaps it on top of fast-ass gameplay |
|||||||
| 18 | - Bonus points: **speech-to-text powered by Vosk API** |
|||||||
| 19 | - Built with **Flask + OpenCV + goose3 + Python + zero chill** |
|||||||
| 20 | ||||||||
| 21 | --- |
|||||||
| 22 | ||||||||
| 23 | ## 🐳 Running This Beast with Docker |
|||||||
| 24 | ||||||||
| 25 | **Step 1:** Pull the image, because we’re not building this crap from scratch: |
|||||||
| 26 | ```sh |
|||||||
| 27 | docker pull tebwritescode/subwaysurfers-text20:latest |
|||||||
| 28 | ``` |
|||||||
| 29 | ||||||||
| 30 | **Step 2:** Get the Vosk brain model and unzip it: |
|||||||
| 31 | ```sh |
|||||||
| 32 | wget https://alphacephei.com/vosk/models/vosk-model-en-us-0.22.zip |
|||||||
| 33 | unzip vosk-model-en-us-0.22.zip -d ./ |
|||||||
| 34 | rm vosk-model-en-us-0.22.zip |
|||||||
| 35 | ``` |
|||||||
| 36 | ||||||||
| 37 | **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. |
|||||||
| 38 | ||||||||
| 39 | **Step 4:** Let’s ride: |
|||||||
| 40 | ```sh |
|||||||
| 41 | docker run -d --name subwaysurfers-text \ |
|||||||
| 42 | -v ./subwaysurfers/sources:/app/sources \ |
|||||||
| 43 | -v ./subwaysurfers/vosk-model-en-us-0.22:/app/static/vosk-model-en-us-0.22 \ |
|||||||
| 44 | -p 5000:5000 \ |
|||||||
| 45 | tebwritescode/subwaysurfers-text20:latest |
|||||||
| 46 | ``` |
|||||||
| 47 | ||||||||
| 48 | **Step 5:** Fire up your browser and hit: |
|||||||
| 49 | ``` |
|||||||
| 50 | http://localhost:5000 |
|||||||
| 51 | ``` |
|||||||
| 52 | ||||||||
| 53 | Get ready to weep tears of productivity as your article runs across a CGI train track. |
|||||||
| 54 | ||||||||
| 55 | --- |
|||||||
| 56 | ||||||||
| 57 | ## 🛠 Using Docker Compose Like a True King |
|||||||
| 58 | Replace `<HOSTPATH>` with the full path to where your god-tier video and Vosk model live. |
|||||||
| 59 | ||||||||
| 60 | ```yaml |
|||||||
| 61 | services: |
|||||||
| 62 | subwaysurfers-text: |
|||||||
| 63 | image: tebwritescode/subwaysurfers-text20:latest |
|||||||
| 64 | volumes: |
|||||||
| 65 | - <HOSTPATH>/sources:/app/sources |
|||||||
| 66 | - <HOSTPATH>/vosk-model-en-us-0.22:/app/static/vosk-model-en-us-0.22 |
|||||||
| 67 | ports: |
|||||||
| 68 | - "5000:5000" |
|||||||
| 69 | ``` |
|||||||
| 70 | ||||||||
| 71 | Start it up: |
|||||||
| 72 | ```sh |
|||||||
| 73 | docker-compose up -d |
|||||||
| 74 | ``` |
|||||||
| 75 | ||||||||
| 76 | 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. 🎲 |
|||||||
| 77 | ||||||||
| 78 | --- |
|||||||
| 79 | ||||||||
| 80 | ## 🐍 The Dockerfile Straight-Up Breakdown |
|||||||
| 81 | ||||||||
| 82 | - Uses a slimmed-down official Python image |
|||||||
| 83 | - Installs all the nasty dependencies (yes, even ffmpeg and build tools) |
|||||||
| 84 | - Brings in Homebrew in case you're feeling fancy |
|||||||
| 85 | - Copies the app, installs Python and brew packages |
|||||||
| 86 | - Runs Flask like it means it |
|||||||
| 87 | - Your container, your rules |
|||||||
| 88 | ||||||||
| 89 | --- |
|||||||
| 90 | ||||||||
| 91 | ## 🔮 Shit I Still Wanna Add |
|||||||
| 92 | - Drop-down to select different AI voices (because not every AI wants to sound like Siri on Ambien) |
|||||||
| 93 | - NVIDIA GPU acceleration (because some of you have beefy rigs) |
|||||||
| 94 | - Fix that annoying subtitle-stuck bug nobody asked for |
|||||||
| 95 | ||||||||
| 96 | --- |
|||||||
| 97 | ||||||||
| 98 | ## 🧠 Want to Run It Without Docker? |
|||||||
| 99 | You rebel. Here’s the repo for bare-metal installs: |
|||||||
| 100 | 👉 https://github.com/tebwritescode/subwaysurfers-text-multi |
|||||||
| 101 | ||||||||
| 102 | --- |
|||||||
| 103 | ||||||||
| 104 | ## 🏆 Big-Ass Credit Section |
|||||||
| 105 | 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. |
|||||||
| 106 | ||||||||
| 107 | --- |
|||||||
| 108 | ||||||||
| 109 | ## ⚠️ Final Note from His Royal Freshness™ |
|||||||
| 110 | 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. |
|||||||
| 111 | ||||||||
| 112 | Enjoy learning like a hyper-caffeinated teenager on TikTok 🚀 |
|||||||