Skip to content

TimIsOverpowered/twitch-recorder-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitch Recorder Go by OP

Record Twitch Live streams & Upload to Google Drive if needed

This program can monitor and record multiple Twitch streams live and convert it to .mp4 files.

Requirements

Streamlink If using streamlink download method (default)

Ffmpeg If using ffmpeg download method (specify -ffmpeg (./twitch-recorder-go -ffmpeg))

Twitch Register a Twitch app

Drive

Ignore this, if you are not planning to upload to drive.

Specify -drive (./twitch-recorder-go -drive) to upload to drive.

Drive Register a Google API APP with OAuth2 & Use Google Playground OAuth2 to get Access & Refresh tokens

Playground

Config

Create config.json file (use -config to specify the path to the config file)

{
 "twitch": {
  "client_id": "XXXXXXXXXX",
  "client_secret": "XXXXXXXXXX",
  "oauth_key": "XXXXXXXXXX"
 },
 "vod_directory": "C:\\Users\\Overpowered",
 "channels": [
  "pokelawls",
  "sodapoppin"
 ],
 "twitch_app": {},
 "drive": {
    "refresh_token": "XXXXXXXXXX",
    "access_token": "XXXXXXXXXX"
 },
 "google": {
  "client_id": "XXXXXXXXXX",
  "client_secret": "XXXXXXXXXX",
  "scopes": [
   "https://www.googleapis.com/auth/drive",
   "https://www.googleapis.com/auth/drive.appdata",
   "https://www.googleapis.com/auth/drive.file",
   "https://www.googleapis.com/auth/drive.metadata"
  ],
  "endpoint": {
   "token_url": "https://oauth2.googleapis.com/token"
  }
 }
}

Optional: Twitch OAuth Key (Used if you are using FFMPEG + twitch turbo to bypass ads), Drive, Google

Running the program

Run in a shell like cmd or bash terminal.

./path-to-twitch-recorder-go/twitch-recorder-go -config ./config.json

Build

  1. Install go
  2. Git clone the project

Run in a shell like cmd or bash terminal.

go build