No description
  • Python 99.1%
  • Dockerfile 0.9%
Find a file
2025-11-05 14:32:56 -05:00
.dockerignore Bugfix: Added .dockerignore file 2025-08-29 05:24:39 -04:00
.gitignore Updated .gitignore 2025-08-29 02:23:44 -04:00
clips.py Bugfix: Unify file naming for videos 2025-08-29 05:25:05 -04:00
common_web.py Bugfix: Make some variables into global constants 2025-08-29 03:30:22 -04:00
Dockerfile Feature: Add Dockerfile 2025-08-29 02:49:25 -04:00
eprint.py Added some coloring to the eprint statements 2025-08-20 06:18:35 -04:00
main.py Bugfix: Wasn't calling the VODs process at all 2025-08-25 20:59:10 -04:00
README.md Fixed README newline 2025-11-05 14:32:56 -05:00
requirements.txt NewFile: Add requirements.txt 2025-08-28 19:08:46 -04:00
settings.py Bugfix: Make some variables into global constants 2025-08-29 03:30:22 -04:00
videos.py Major: Made a parent class called VIDEO, and based VOD and CLIP off it 2025-08-25 08:09:18 -04:00
vods.py Bugfix: Unify file naming for videos 2025-08-29 05:25:05 -04:00

This is scuffed, and doesn't follow best security practices. Private use only.

I have no plans to publish this to Dockerhub at this time. The repository must be cloned and a Docker image built

An example docker-compose.yml file looks like this

services:
  streamer_name_twitchvods:
    image: twitchvods:latest   # replace with your actual image tag
    container_name: streamer_name_twitchvods
    restart: unless-stopped
    volumes:
      - ./streamer_name/data/:/app/data
      - ./streamer_name/videos:/app/videos

The initial startup of the container WILL fail. Fields will need to be populated in the settings.toml file within the ./streamer_name/data/ directory

A blank settings.toml will look something like this

[settings]
streamer = "streamer_name"
db_file = "past_videos.db"
gather_clips = true
gather_vods = true

[settings.advanced]
concurrent_vod_fragments = 10
concurrent_clip_fragments = 1
process_vod_sleep_time = 5
process_clip_sleep_time = 3600 
clip_scan_period = 1

[credentials]
client_id = "[CLIENT ID HERE]"
authorization = "Bearer [OAuth TOKEN HERE]"

A client id can be generated from https://dev.twitch.tv/

Once a client id and client secret have been generated, you can use a utility such as https://twitchtokengenerator.com/ to generate the appropriate OAuth. If you do choose to go this route, please read the instructions carefully. Especially where it mentions the callback address

Just give it everything. It's insecure, I'm aware, but Twitch keeps modify which scopes can access what and it's a PITA to keep updating it

You can revoke the token from your Twitch account settings at any time, if you feel uncomfortable.

Post-setup

The script, once the requirements are met, can be left to it's own devices. It will routinely check the list of VODs on a channel via the appropriate endpoint and begin to download whatever isn't logged in the database

A video isn't logged to the database unless the download and muxing completes

A video will not be downloaded again if it is in the database