|
2 | 2 | A Docker container to automatically record Twitch streams.
|
3 | 3 |
|
4 | 4 | ## Description
|
5 |
| -This repository hosts the source code for a Docker container that can automatically record livestreams from Twitch as they go live. |
| 5 | +This repository hosts the source code for a Docker container that can automatically record livestreams from Twitch as they go live. |
6 | 6 | The main component is from [Ancalentari Twitch Stream Recorder](https://github.com/ancalentari/twitch-stream-recorder).
|
7 | 7 |
|
8 | 8 | ## Requirements
|
9 |
| -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 is explained in the setup section. |
| 9 | +To run this container and record streams from Twitch, you need to register a dummy app and get a `client_id` and `client_secret`. |
| 10 | +Both is explained in the setup section. |
10 | 11 |
|
11 | 12 | ## Setup
|
12 | 13 | The container needs a few configuration parameters. These are:
|
13 | 14 |
|
14 |
| -`USERNAME` - name of the streamer you want to record (Change this accordingly!) |
15 |
| -`QUALITY` - this uses the streamlink [STREAM](https://streamlink.github.io/cli.html#cmdoption-arg-STREAM) setting to choose the quality to record. |
16 |
| -`CLIENT_ID` - you can grab this from [here](https://dev.twitch.tv/console/apps) once you register your application (Replace with your own!) |
17 |
| -`CLIENT_SECRET` - you generate this [here](https://dev.twitch.tv/console/apps) as well, for your registered application (Replace with your own!) |
18 |
| -`AUTH_TOKEN` - optionally your [OAuth Token](https://streamlink.github.io/cli/plugins/twitch.html#authentication) to prevent ad breaks if you're subscribed to the streamer. |
19 |
| - only add the string consisting of 30 alphanumerical characters without any quotations |
| 15 | +- `USERNAME` - Name of the streamer you want to record. |
| 16 | +- `QUALITY` - This uses the streamlink [STREAM](https://streamlink.github.io/cli.html#cmdoption-arg-STREAM) setting to choose the quality to record. |
| 17 | +- `CLIENT_ID` - You can grab this from [here](https://dev.twitch.tv/console/apps) once you register your application. |
| 18 | +- `CLIENT_SECRET` - You generate this [here](https://dev.twitch.tv/console/apps) as well, for your registered application. |
20 | 19 |
|
21 | 20 | Additionally, there are more advanced settings to set:
|
22 | 21 |
|
23 |
| -`DISABLE_FFMPEG` - disables ffmpeg processing (fixing errors in recorded file) (Optional, defaults to True, Use "True" or "False") |
24 |
| -`REFRESH` - the interval to check user availability (Optional, can't be set below 15, defaults to 15) |
| 22 | +- `AUTH_TOKEN` - Your [OAuth Token](https://streamlink.github.io/cli/plugins/twitch.html#authentication) to prevent ad breaks if you're subscribed to the streamer. |
| 23 | + Only add the string consisting of 30 alphanumerical characters without any quotations. (Optional) |
| 24 | +- `DISABLE_FFMPEG` - Disables ffmpeg processing (fixing errors in recorded file). (Optional, defaults to `True`, Use `True` or `False`.) |
| 25 | +- `REFRESH` - The interval to check user availability. (Optional, can't be set below `15`, defaults to `15`.) |
25 | 26 |
|
26 | 27 | ## Usage
|
27 |
| -Start the container with the following `docker run` command: |
| 28 | +Start the container with the following `docker run` command: |
| 29 | + |
28 | 30 | ```bash
|
29 | 31 | docker run -d \
|
30 | 32 | -e USERNAME=your_favourite_streamer \
|
31 | 33 | -e QUALITY=best \
|
32 | 34 | -e CLIENT_ID=your_client_id \
|
33 | 35 | -e CLIENT_SECRET=your_client_secret \
|
34 |
| - -e AUTH_TOKEN=your_oauth_token_cookie \ |
35 | 36 | -v /path/to/recordings:/opt/recordings \
|
36 | 37 | ghcr.io/mkody/twitch-stream-recorder:master
|
37 | 38 | ```
|
| 39 | + |
38 | 40 | The options in this command:
|
39 |
| -`-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. |
40 |
| -`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. |
| 41 | +- `-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. |
| 42 | +- `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. |
41 | 43 |
|
42 | 44 | You can also run it as a Docker Compose setup, see [docker-compose.example.yml](docker-compose.example.yml).
|
43 |
| -If you want to build the image while using Compose (ie. you changed the UID/GID) run `docker-compose up -d --build`. |
| 45 | +If you want to build the image while using Compose (i.e. you changed the UID/GID) run `docker compose up -d --build`. |
0 commit comments