Streamlink packaged in a Docker container to save Twitch streams. Forked from liofal/streamlink
I was in the search for a twitch stream ripper that would monitor and save streams to my twitch synology folder to watch on plex while I'm unable to watch online.
I could not find an existing image that would respond exactly to my needs so I combined what I could find from few existing projects (see credits here below)
I decided to build it automatically on docker hub to access from my swarm nodes, when I saw many downloads, I decided to document a bit more the project, for my personnal experience and to encourage reusability
Questions, suggestions, requests, reach me out on
I'm also interested with new projects for automation of daily popular tasks, don't hesitate, I'm waiting for new ideas
Added recording retention parameters:
- 'recordingsizelimit="512"': Maximum size of the recordings in total in MBs
- 'recordingretention="3"': Recordings older than the given limit (in days) will be deleted
Implement more user-friendly recording naming scheme
Edit recording metadata to include stream title and audio language
Added after-stream double check to restart recording as soon as possible in case of a stream error
Refactored codebase to help later development
Added support for passing additional arguments to Streamlink
Full rework with support of OAuth2 token management Review of helix twitch operation and simplification of the flow
Upgrade python 3.8.6-alpine3.12
Upgrade streamlink for support of twitch API recent changes
Upgrade python Adapt recorder script to rely on upgrade version of twitch API
Upgrade python Explicit version of python to control the release cycle of base images
Games list filter selection Upgrade python
Introducing multi-stage building
Thanks to the work of the original owners, so far I used and adapted python scripts from
https://github.com/Neolysion/Twitch-Recorder/blob/master/check.py
https://www.junian.net/2017/01/how-to-record-twitch-streams.html
I cleaned up and adapted following my requirements and added a slack integration
All rights are reserved to the original script owners, tell me if I need to remove those however, I might be working on a rewrite from scratch removing few dependencies to python libraries
Quality is specified within the stream, any twitch quality specified existing for the stream can be defined
Keywords can always be used
- best
- worst
Fill in twitch clientid to interact with twitch API and retrieve status of stream from stream list
timer=360
Fill in twitch clientid to interact with twitch API and retrieve status of stream from stream list
clientid=xxxxxxxx
Fill in slack if you want recod start/stop notification
slackid=xxxxxxxxx
docker run -d --rm \
-v twitch:/download \
-u 1027:100 \
-e timer=360 \
-e user=heromarine \
-e quality=best \
-e clientid=XxX \
-e slackid=XxX \
daergoth/streamlink:latest
To run a test service
./docker-compose -f dockerimages/streamlink/docker-compose.yml up -d test
Specify the clientid.env file using the clientid.env.example delivered
you can specify the default for compose here
/download
Warning: The folder does not exist in the container and need te be created as a volume in order to be accessed from outside your container, you should map it if you want to access it