Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revisionLast revisionBoth sides next revision | ||
software:relive [2017/08/29 13:52] – florolf | software:relive [2023/12/29 13:04] – andi | ||
---|---|---|---|
Line 3: | Line 3: | ||
Documentation for the relive system is contained within its git repo '' | Documentation for the relive system is contained within its git repo '' | ||
- | It's currently deployed at live.ber:/ | + | It's currently deployed at live.alb:/ |
== Setting up Relive in the VOC setup | == Setting up Relive in the VOC setup | ||
- | - On live.ber, in ''/ | + | Login to server |
- | | + | |
- | | + | |
- | - In the streaming-website configuration, | + | |
- | == README | + | - Create an appropriate config for your event in `live.alb:/ |
+ | - either by using `./ | ||
+ | - manually: copy `cfg.example`, | ||
+ | - After a minute, a cronjob will run and download the schedule, etc. (If you are impatient, you can run `/ | ||
+ | - Start the scheduler (run as user relive, inside of a screen/tmux session): `./ | ||
+ | - In the streaming-website configuration, | ||
- | (this might be out of date, check the README in the git repo when in doubt) | + | Note that the '' |
- | < | ||
- | HLS ReLive | ||
- | ========== | ||
- | This set of tools records portions of an HLS stream into separate | + | == Relive integration in media.ccc.de (voctoweb) |
- | playlists for timeshifting and to bridge the time until the actual | + | |
- | recordings are available. | + | |
- | Components | + | When an event in voctoweb has no recordings, voctoweb will try to find the corresponding relive recording. This only works if the conference acronym matches the acronym used in the relive system. |
- | ---------- | + | |
- | The ReLive system consists of several tools and cron jobs, some of which | + | To use this feature, first create |
- | can be used independently from the rest. | + | |
- | ### record.pl | + | * To enable this workflow for you conference, enable the " |
+ | * TODO: Create systemd timer for this. | ||
+ | * [[https:// | ||
+ | * This script can be called during any state transition, we currently use `scheduled` -> `recording` of the recording ticket | ||
- | `record.pl` records HLS streams that are being generated locally by | + | If you need re-create |
- | watching | + | |
- | streams via HTTP, nor will it perform any magic (like trying to figure | + | |
- | out at what position in the source m3u8 it stopped recording) when being | + | |
- | restarted: It will simply add a discontinuity header to the output m3u8 | + | |
- | and resume adding segments. It turns out that this makes things much | + | |
- | simpler and is enough for our use case. | + | |
- | Usage: `record.pl in-directory in-m3u8 out-directory` | ||
- | The m3u8 in the output directory will be named `index.m3u8`. | + | ``` |
+ | ssh voc@releasing.c3voc.de | ||
+ | screen -x | ||
+ | cd / | ||
+ | source tracker-profile-relive.sh | ||
+ | export LOCALFILE=tracker-profile-relive.sh | ||
+ | ./ | ||
+ | ``` | ||
- | ### scheduler.pl | + | == README |
- | + | ||
- | `scheduler.pl` is responsible for starting and stopping recording | + | |
- | processes as dictated by the conference schedule. See below for | + | |
- | configuration details. | + | |
- | + | ||
- | When sent a `SIGHUP`, it will reload its schedule, spawning or killing | + | |
- | recording subprocesses as necessary. Running recording subprocesses | + | |
- | which are still valid w.r.t. the new schedule remain untouched. | + | |
- | + | ||
- | When sent a `SIGINT` or `SIGTERM` it shuts down all recording | + | |
- | subprocesses and then terminates itself. | + | |
- | + | ||
- | Recording subprocesses are started via `wrapper.sh` which takes care of | + | |
- | setting up their environment (creating one directory per schedule event | + | |
- | to store the recording, amongst other things) and starting them. | + | |
- | + | ||
- | ### genpage.pl | + | |
- | + | ||
- | `genpage.pl` looks through the directory with all the recordings, | + | |
- | cross-referencing them with the schedule and media.ccc.de, | + | |
- | whether a proper release has happened yet. All this data is collected | + | |
- | and written into a file called `index.json` in the top-level recording | + | |
- | directory, which can then be used by the streaming frontend. | + | |
- | + | ||
- | A recording can be in one of four states: | + | |
- | - not_running: | + | |
- | | + | |
- | - live: There is data present, but the playlist is not finished yet. | + | |
- | - recorded: There is data present and the playlist is finished. | + | |
- | - released: A recording of this talk has been found on media.ccc.de | + | |
- | + | ||
- | A recording can move from the *recorded* state back to *live* if the | + | |
- | recording is restarted for some reason. Other than that, recordings | + | |
- | progress monotonically from *not_running* to *released*. | + | |
- | + | ||
- | Starting from the *live* state, a thumbnail is generated. Once a | + | |
- | recording is *recorded*, the HLS files get remuxed into a faststarted | + | |
- | mp4 for easy download. | + | |
- | + | ||
- | The `index.json` file contains an array of objects. A fully populated | + | |
- | object looks like this: | + | |
- | + | ||
- | { | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | } | + | |
- | + | ||
- | ### check_released.pl | + | |
- | + | ||
- | `check_released.pl` is a helper used by the `get-releases.sh` script. It | + | |
- | ensures that only events which have at least one recording on media.ccc.de are | + | |
- | marked as *released*. | + | |
- | + | ||
- | ### Cron jobs | + | |
- | + | ||
- | There are three cron jobs: | + | |
- | + | ||
- | - calling get-releases.sh to download and cache the list of recordings | + | |
- | already released on media.ccc.de | + | |
- | - calling get-fahrplan.sh to download the schedule | + | |
- | - calling genpage.pl to update `index.json` etc. | + | |
- | + | ||
- | Configuration | + | |
- | ------------- | + | |
- | + | ||
- | All scripts take the union of `global_config` in the root of the git | + | |
- | repository as their configuration. This configuration is extended by a | + | |
- | project-specific configuration in the `configs` subdirectory. See the | + | |
- | `.example` files in the respective directories. These files also contain | + | |
- | comments explaining the various options. | + | |
- | Setting | + | Please read the [[https:// |
- | ------------------------------- | + | |
- | The following steps are necessary to set up ReLive for a new conference: | + | == FAQ |
- | - update the configuration file appropriately | + | The `/video/ |
- | - launch the recording scheduler: | + | * simply rename or remove the file, it will be generated |
- | | + | |
- | + | ||
- | </ | + |