Skip to content

Python Script to automatically archive Twitch streams, checking periodically to see if channel is live.

License

Notifications You must be signed in to change notification settings

davidhewing/twitch-recorder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twitch-recorder

Python Script to automatically archive Twitch streams, checking periodically to see if channel is live. Adapted from an old blog post, using newer Twitch API and other minor tweaks. How to Record Twitch Streams Automatically in Python.

This version is further enhanced from rashdanml/twitch-recorder and other copies of this script from sources around the internet.

Setup

  • Clone the repository
  • Rename config-example.py to config.py
  • Obtain ClientID and ClientSecret from dev.twitch.tv by creating an application with the "Browser Extension" type, update config.py with it.
  • Create virtual environment, install dependencies from requirements.txt
  • Extract "auth-token" from browser cookies to set auth_token value

Key dependencies

  • ffmpeg
  • streamlink

Usage

Run: python twitch-recorder.py -[s|u] [username] -q [quality] from within the virtual environment.

If username and quality not specified, script defaults to self.username and self.quality specified in twitch-recorder.py

Options

  • -s / -u username - Stream username to record.
  • -p / --directory directory - Directory where to write the recording.
  • -l / --log logfile - File where to log events.

Quality options

Available options depend on the stream, which can be checked by running streamlink. Options: best, 1080p, 720p, 480p, 360p, etc. best selects the highest available.

About

Python Script to automatically archive Twitch streams, checking periodically to see if channel is live.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%