GitXplorerGitXplorer
A

autostreamer-bot

public
6 stars
2 forks
2 issues

Commits

List of commits on branch master.
Unverified
9f4ad1a94c23523c4f32236558d58e58a038c9d0

Log all ffmpeg output with debug mode

AAlcaDesign committed 5 years ago
Unverified
e903bbcdd53eb3f2c55d93a9649257835fc6524d

Simplify reply messaging further

AAlcaDesign committed 5 years ago
Unverified
7f7f63e5bf572d520dcb60cee1f732c84d2fb132

Combine command replies into 1 call

AAlcaDesign committed 6 years ago
Unverified
3468577ed95825d79ff53b44c4df56f281ff5e91

Add DEBUG_LOG to env to silence console.log

AAlcaDesign committed 6 years ago
Unverified
a2f8d1b49bb831b1294b562731e2a0ef761de09d

Remove extra description in README

AAlcaDesign committed 6 years ago
Unverified
2e693c760a508d4627fcb42e8ed20620488fd4bc

Init

AAlcaDesign committed 6 years ago

README

The README file for this repository.

Autostreamer-Bot

Send an ffmpeg test pattern stream to a Twitch channel controlled by chat commands.

Install

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

Environment variables

  • 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.

Running

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.

Commands

Command Arguments Description
!startstream Start streaming.
!stopstream Stop streaming.

Credits

Inspiration from "park-stream" by freaktechnik.

Todo

  • Ensure required environment variables are available.
  • Catch possible tmi.js errors from client.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.