Skip to content

Docker Container to monitor for and record livestreams using streamlink.

License

Notifications You must be signed in to change notification settings

kjake/streamlink-recorder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

This is a Docker Container to record a livestream. It uses the official Debian Image with the Tag sid-slim, installs streamlink, and runs a modified version of the script streamlink-recorder.sh to periodically check if the stream is live.

Usage Example

docker-compose.yaml:

version: "3"
services:
  record:
   image: kjake/streamlink-recorder
   container_name: Streamlink-Recorder
   restart: unless-stopped
   volumes:
      - /volume1/docker/Twitch-recorder/urtwitchstreamer:/home/download
   environment:
      - streamName=urtwitchstreamer
      - streamLink=twitch.tv/urtwitchstreamer
      - streamQuality=best
      - streamOptions=--twitch-disable-hosting --twitch-disable-ads
      - streamPoll=60
      - uid=9001
      - gid=9001
      - TZ=Asia/Seoul

docker on cli:

docker run -d \
  --name='Streamlink-Recorder' \
  -e TZ='Asia/Seoul' \
  -e streamLink='twitch.tv/urtwitchstreamer' \
  -e streamName='urtwitchstreamer' \
  -e streamQuality='best' \
  -e streamOptions='--twitch-disable-hosting --twitch-disable-ads' \
  -e streamPoll=60 \
  -e gid=9001 \
  -e uid=9001 \
  -v /volume1/docker/Twitch-recorder/urtwitchstreamer:/home/download:rw \
  --restart=unless-stopped kjake/streamlink-recorder

Notes

/home/download - the place where the vods will be saved. Mount it to a desired place with -v option.

/home/script - the place where the scripts are stored. (entrypoint.sh and streamlink-recorder.sh)

/home/plugins - the place where the streamlink plugins are stored.

streamLink - the url of the stream you want to record.

streamQuality - quality options (best, high, medium, low).

streamName - name for the stream.

streamOptions - streamlink flags (--twitch-disable-reruns, separated by space, see Plugins)

streamPoll - freqency (in seconds) to poll streamLink for a new stream.

uid - USER ID, map to your desired User ID (fallback to 9001)

gid - GROUP ID, map to your desired Group ID (fallback to 9001)

Note

The stream file will be named as streamName - Year-Month-Day HourMinuteSecond - streamTitle.mkv.

Acknowledgments

  • Thanks to @lauwarm for the original streamlink container.

Contributions

If you see out of date documentation, things aren't working, have an idea, etc., you can help out by either:

  • creating an issue, or
  • sending a pull request with modifications

About

Docker Container to monitor for and record livestreams using streamlink.

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • Shell 61.4%
  • Dockerfile 38.6%