Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 2.62 KB

README.md

File metadata and controls

45 lines (35 loc) · 2.62 KB

twitch-stream-recorder

A Docker container to automatically record Twitch streams.

Description

This repository hosts the source code for a Docker container that can automatically record livestreams from Twitch as they go live. The main component is from Ancalentari Twitch Stream Recorder.

Requirements

To run this container and record streams from Twitch, you need to register a dummy app and get a client_id and client_secret. Both are explained in the setup section.

Setup

The container needs a few configuration parameters. These are:

  • USERNAME - Name of the streamer you want to record.
  • QUALITY - This uses the streamlink STREAM setting to choose the quality to record.
  • CLIENT_ID - You can grab this from here once you register your application.
  • CLIENT_SECRET - You generate this here as well, for your registered application.

Additionally, there are more advanced settings to set:

  • AUTH_TOKEN - Your OAuth Token to prevent ad breaks if you're subscribed to the streamer.
    (Optional, only add the string consisting of 30 alphanumerical characters without any quotations.)
  • DISABLE_FFMPEG - Disables ffmpeg processing (fixing errors in recorded file).
    (Optional, defaults to False, use True or False.)
  • REFRESH - The interval to check user availability.
    (Optional, can't be set below 15, defaults to 15.)

Usage

Start the container with the following docker run command:

docker run -d \
    -e USERNAME=your_favourite_streamer \
    -e QUALITY=best \
    -e CLIENT_ID=your_client_id \
    -e CLIENT_SECRET=your_client_secret \
    -v /path/to/recordings:/opt/recordings \
    ghcr.io/mkody/twitch-stream-recorder:master

The options in this command:

  • -v /path/to/recordings:/opt/recordings - Map a folder of your choice (left of ":") to a defined location in the container (right of ":"). This is the place where all recordings will be saved to.
  • ghcr.io/mkody/twitch-stream-recorder:master - Use the "master" tag for the latest version, that's the GitHub branch from which the Docker images will be built.

You can also run it as a Docker Compose setup, see docker-compose.example.yml.
To build an image while using Compose (i.e. you changed the UID/GID) run docker compose up -d --build.