pubgredzone takes the concept of the red zone in American football and applies it to the popular online battle royale game PLAYERUNKNOWN'S BATTLEGROUNDS. The idea is to always be viewing the most popular PUBG twitch stream with the least amount of people alive in-game.
You can run your own instance of pubgredzone either for local development or just pure entertainment. Ubuntu and macOS are the currently supported platforms.
The following pieces of software are required to run pubgredzone locally:
You can install these dependencies with one of the two following commands, depending on your os:
- Ubuntu:
$ sudo apt-get install tesseract-ocr ffmpeg imagemagick
$ pip install livestreamer
- macOS:
$ brew install tesseract ffmpeg imagemagick
$ pip install livestreamer
- Clone the repo and install with npm:
$ git clone [email protected]:eggshell/pubgredzone.git
$ cd pubgredzone
$ npm install .
- On a machine with a browser installed, run the following:
$ livestreamer --twitch-oauth-authenticate
-
A browser window will open, and prompt you to authorize livestreamer to use your twitch account. Click
Authorize
. -
Your browser will refresh, and a page saying "SORRY, this page does not exist yet" will appear. Ignore this. In your address bar, there will be a callback URL with
access_token=<TOKEN>
. This is your OAuth token, copy it down and proceed to the next section.
$ export token="YOUR_OAUTH_TOKEN"
- Navigate to the
pubgredzone
dir if you aren't there already, and start the app:
$ node ocr.js 2>&1 >/dev/null &
$ node app.js
Now you can open a browser and navigate to http://localhost:3000
to watch
pubgredzone.
You can also run pubgredzone in a docker container.
- Clone the repo:
$ git clone [email protected]:eggshell/pubgredzone.git
- Get an OAuth token using the instructions above, and export it as an environment variable:
$ export token="YOUR_OAUTH_TOKEN"
- Build the docker images:
$ cd pubgredzone
$ docker build -f deploy/images/app/Dockerfile -t "pubgredzone:app" --build-arg token=$token .
$ docker build -f deploy/images/ocr/Dockerfile -t "pubgredzone:ocr" .
- Start up the containers:
$ docker run -d pubgredzone:ocr
$ docker run pubgredzone:app
pubgredzone is currently licensed under the MIT LICENSE.