Skip to content

Commit 6642eba

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 4fe2b1d + c8d2b7e commit 6642eba

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
FROM python:3.13.2-alpine3.20
1+
FROM python:3.13.2-alpine3.21
22

33
RUN apk add --no-cache tini~=0.19.0
44

55
RUN apk add --no-cache ffmpeg~=6.1
66

7-
RUN python -m pip install --no-cache-dir --upgrade streamlink==7.0.0
7+
RUN python -m pip install --no-cache-dir --upgrade streamlink==7.1.2
88

99
COPY twitch-recorder.py /opt/
1010

README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@ The container needs a few configuration parameters. These are:
1515
`QUALITY` - this uses the streamlink [STREAM](https://streamlink.github.io/cli.html#cmdoption-arg-STREAM) setting to choose the quality to record.
1616
`CLIENT_ID` - you can grab this from [here](https://dev.twitch.tv/console/apps) once you register your application (Replace with your own!)
1717
`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!)
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
20+
21+
Additionally, there are more advanced settings to set:
22+
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)
2025

2126
## Usage
2227
Start the container with the following `docker run` command:

entrypoint.sh

+6
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,11 @@ client_secret = "${CLIENT_SECRET}"
1616
auth_token = "${AUTH_TOKEN}"
1717
EOF
1818

19+
# Use optional variables, if present
20+
cat <<EOF >> /opt/config.py
21+
disable_ffmpeg = "${DISABLE_FFMPEG:-False}"
22+
refresh = "${REFRESH:-15}"
23+
EOF
24+
1925
# Hand off to the CMD
2026
exec "$@"

twitch-recorder.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class TwitchRecorder:
2525
def __init__(self):
2626
# global configuration
2727
self.ffmpeg_path = "ffmpeg"
28-
self.disable_ffmpeg = False
29-
self.refresh = 60
28+
self.disable_ffmpeg = config.disable_ffmpeg
29+
self.refresh = int(config.refresh)
3030
self.root_path = config.root_path
3131

3232
# user configuration

0 commit comments

Comments
 (0)