mirror of https://github.com/ekimekim/wubloader
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6815924097
I ran `pyflakes` on the repo and found these bugs: ``` ./common/common.py:289: undefined name 'random' ./downloader/downloader/main.py:7: 'random' imported but unused ./backfiller/backfiller/main.py:150: undefined name 'variant' ./backfiller/backfiller/main.py:158: undefined name 'timedelta' ./backfiller/backfiller/main.py:171: undefined name 'sort' ./backfiller/backfiller/main.py:173: undefined name 'sort' ``` (ok, the "imported but unused" one isn't a bug, but the rest are) This fixes those, as well as a further issue I saw with sorting of hours. Iterables are not sortable. As an obvious example, what if your iterable was infinite? As a result, any attempt to sort an iterable that is not already a friendly type like a list or tuple will result in an error. We avoid this by coercing to list, fully realising the iterable and putting it into a form that python will let us sort. It also avoids the nasty side-effect of mutating the list that gets passed into us, which the caller may not expect. Consider this example: ``` >>> my_hours = ["one", "two", "three"] >>> print my_hours ["one", "two", "three"] >>> backfill_node(base_dir, node, stream, variants, hours=my_hours, order='forward') >>> print my_hours ["one", "three", "two"] ``` Also, one of the linter errors was non-trivial to fix - we were trying to get a list of hours (which is an api call for a particular variant), but at a time when we weren't dealing with a single variant. My solution was to get a list of hours for ALL variants, and take the union. |
6 years ago | |
---|---|---|
backfiller/backfiller | 6 years ago | |
common | 6 years ago | |
downloader | 6 years ago | |
restreamer | 6 years ago | |
.gitignore | 6 years ago | |
.travis.yml | 6 years ago | |
LICENSE | 6 years ago | |
README.md | 6 years ago | |
build | 6 years ago | |
docker-compose.jsonnet | 6 years ago | |
generate-docker-compose | 6 years ago | |
initial-design-doc.pdf | 6 years ago |
README.md
Wubloader is a system for saving, re-serving and cutting into videos of a target twitch (or probably other HLS, but some twitch specifics are assumed) stream.
It was designed to serve the needs of the Video Strike Team as part of Desert Bus For Hope.
A full design doc can be read at initial-design-doc.pdf, but a brief overview of the components:
- Downloader grabs segments from twitch and saves them to disk
- Restreamer serves segments from disk as well as playlist files allowing them to be streamed
- Backfiller queries restreamers of other servers in order to pick up segments this server doesn't have already, ie. it replicates missing segments.
- Cutter interacts with a database to perform cutting jobs
- Sheet Sync syncs specifc database columns to a google doc which is the primary operator interface.
Usage
All components are built as docker images.
Components which access the disk expect a shared directory mounted at /mnt
.
A docker-compose file is provided to run all components. See docker-compose.jsonnet
to set configuration options, then generate the compose file with ./generate-docker-compose
.
Then run docker-compose up
.