Send an ffmpeg test pattern stream to a Twitch channel controlled by chat commands.
Install Node.js and ffmpeg on the system and set up the .env
file from the
.env.example
file.
$ git clone git@github.com:alcadesign/autostreamer-bot.git
$ cd autostreamer-bot
$ npm install
-
INGEST_REGION
- The region of the preferred ingest server. The default is "live-sfo
". See the Twitch Ingests page for a list of possible regions. -
STREAM_KEY
- A Twitch stream key to authenticate with. -
TWITCH_OWNER_ID
- The user ID of the owner/controller account. -
TWITCH_BOT_USER
- The username of the bot account. -
TWITCH_BOT_TOKEN
- The token of the bot account. Needs the required scopes for sending messages to chat. -
TWITCH_BOT_CHANNEL
- The name of the channel to listen to in chat.
The basic way to run it is just using Node:
$ node index.js
This bot could be set up using any daemon like service
, systemctl
, or Node-
based daemons like pm2
or forever
.
Command | Arguments | Description |
---|---|---|
!startstream |
Start streaming. | |
!stopstream |
Stop streaming. |
Inspiration from "park-stream" by freaktechnik.
- Ensure required environment variables are available.
- Catch possible
tmi.js
errors fromclient.say
or if the credentials don't pass logging in. - Allow anonymous (and/or silent) chat integration.
- Better permission system.
- Ensure ffmpeg is installed.
- Ensure the stream actually starts and stops.
- Investigate
child_process
errors. - Expand upon README.
- Think of more Todo's.