c3tracker:start

C3 Ticket Tracker

The C3 Ticket Tracker is the central managing component in our postprocessing pipeline, releasing the final recordings. The tracker is a PHP web application and distributes tasks in form of 'tickets' to various workers. The workers – written in Perl, Python, or PHP – advance the state and update the ticket's properties via tracker's XML RPC API. The core system was initially written by FeM for 27C3 in 2010, and was released under the Apache License 2.0 end of 2017. Our instance is deployed at https://tracker.c3voc.de.

source code:

Further resources:

export VOC_WORKSPACE=~/voc
export VOC_CUTTING_TOOL=shotcut

function voc_check() {
	if [ -z "$0" ]; then
		echo "usage: ${FUNCNAME[0]} ID"
		return 1
	fi
	if [ ! -L "$VOC_WORKSPACE/check" ]; then
		echo "run voc_eventprep first!"
		return 1
	fi
	cd ~/voc
	mpv "check/${1}-hd.mp4"
	cd -
}

function voc_cut() {
    if [ -z "$0" ]; then
        echo "usage: ${FUNCNAME[0]} ID"
        return 1
    fi
    if [ ! -L "$VOC_WORKSPACE/cut" ]; then
        echo "run voc_eventprep first!"
        return 1
    fi
    cd ~/voc
    case "$VOC_CUTTING_TOOL" in
        shotcut)
            cp cut/**/${1}/project_shotcut.mlt /tmp
            ln -vs "$(realpath cut/**/${1}/uncut.ts)" /tmp
            shotcut /tmp/project_shotcut.mlt
            rm /tmp/uncut.ts
            cp /tmp/project_shotcut.mlt cut/**/${1}/
            rm /tmp/project_shotcut.mlt
            ;;
        kdenlive)
            kdenlive cut/**/${1}/project.kdenlive
            ;;
        *)
            cd -
            echo "invalid cutting tool configured"
            return 1
    esac
    cat cut/**/${1}/*frame
    cd -
}

function voc_eventprep() {
	if [ -z "$1" ]; then
		echo "usage: ${FUNCNAME[0]} acronym"
		return 1
	fi
	if [ ! -d "$VOC_WORKSPACE" ]; then
		mkdir -p "$VOC_WORKSPACE"
	fi
	rm -f ~/voc/{cut,check}
	ln -s "/video/fuse/$1" ~/voc/cut
	ln -s "/video/encoded/$1" ~/voc/check
}

function voc_mount() {
	if [ ! -d "/video" ]; then
		echo "/video missing, please create"
		return 1
	fi
	sudo mount -t cifs //storage.lan.c3voc.de/video /video -o password=dummy -o uid=$UID
	sudo mount -t cifs //storage.lan.c3voc.de/fuse /video/fuse -o password=dummy -o uid=$UID
}

see checking

Ticket types and states

  • Parent tickets for each Fahrplan entry
  • one recording ticket for each parent
  • several encoding tickets, one for each format – e.g. MP4 HD, MP4 SD, WebM, MP3, Opus
  • Create tracker project (you can also clone a matching project to have prefilled properties)
  • Import schedule.xml
  • Set all master tickets from staging to staged via mass-edit
  • Adjust project properties, recommendations: (full reference at the bottom of the page)
  • Compare project properties with previous instalment of the same event

optimal properties from current project

Project
Project.Slug			eh19
Processing
Processing.Loudnorm.Enable	yes
Processing.BasePath		/video
Processing.Path.Intros		/video/intros/eh19
Processing.Path.Outro		/video/intros/eh19/outro.ts
Publishing
Publishing.Path			/video/encoded/eh19
Publishing.Upload.SkipSlaves	speedy,tweety,blade1,blade2,blade3,blade4
Publishing.UploadOptions	-i /video/upload-key
Publishing.UploadTarget		upload@releasing.c3voc.de:/video/encoded/eh19
Publishing.Voctoweb.Enable	yes
Publishing.Voctoweb.Path	/cdn.media.ccc.de/events/eh2019/
Publishing.Voctoweb.Thumbpath	/static.media.ccc.de/conferences/eh2019
Publishing.Voctoweb.Slug	eh19
Publishing.Voctoweb.Tags	easterhegg, Wien, c3w
Publishing.Voctoweb.Url		https://media.ccc.de/v/
Publishing.YouTube.Category	27
Publishing.YouTube.Enable	yes
Publishing.YouTube.Privacy	public
Publishing.YouTube.Tags		easterhegg, Wien, bun intended, Chaos Computer Club Wien, c3w
Publishing.YouTube.TitlePrefix	Easterhegg 2019 -
Publishing.YouTube.Token	1/XXXXXXXXXXXX
Publishing.Mastodon.Enable	yes
Publishing.Twitter.Enable	yes
Record
Record.Container		TS
Record.Slides			yes

During event setup of the pipeline, you have to decide if you want leave the MPEG TS snippets only on the recording cubes or also rsync them to a central storage:

The first variant is typically used for events with more than one room. For bigger events we use the dedicated storage server in the event server rack, for smaller events a USB connected hard drive to one of the minions might be sufficient. Each recording cube exposes the files via rsyncd, which are pulled by an rsync process running inside a screen on the storage pc. For each encoderX open a screen tab on the central storage:

cd /video/capture/<EVENT>/
while true; do rsync -av --bwlimit=10000 --append --inplace -t encoderX.lan.c3voc.de::video/capture/<EVENT>/ .; sleep 60; done

start tracker workers on storage

cd /opt/crs/tools/tracker3.0
sudo ./start-screenrc-scripts.sh

Don't forget to the encoding tab and activate the encoding worker if you want the storage pc to also do some work.

Minion setup

To allow the encoding workers to do there job, they need to mount several folders on each minion:

sudo -s
mount -t cifs //storage.lan.c3voc.de/video /video
mount -t cifs //storage.lan.c3voc.de/tmp /video/tmp
mount -t cifs //storage.lan.c3voc.de/encoded /video/encoded

The first mount point is read-only, the other two are read-write.

start tracker encoding workers

cd /opt/crs/tools/tracker3.0
sudo ./start-screenrc-encoding-only.sh

Cube as worker setup

At small events, when the talks are finished for today, you can use the cubes to encoder master MP4 files. First: Stop voctocore.

The rest is very similar to above, but with different mounts so /video/capture is not hidden:

sudo -s
mount -t cifs -o password= //storage.lan.c3voc.de/video/fuse /video/fuse
mount -t cifs -o password= //storage.lan.c3voc.de/video/intros /video/intros
mount -t cifs -o password= //storage.lan.c3voc.de/tmp /video/tmp
mount -t cifs -o password= //storage.lan.c3voc.de/encoded /video/encoded

The second variant is only practical if you have at least one release encoder (aka Minions) for each recording cube. When using this variant with multiple rooms, you also have to set room filters in the tracker worker queues.

For every worker:

  • set room filters in tracker

For every recoding cube:

  • start tracker workers

cd /opt/crs/tools/tracker3.0

sudo ./start-screenrc-scripts.sh

For each minion:

  • mount filesystems from encoder cube
#!/bin/sh
e=echo
if [ ! -d /video/tmp ]; then
  $e mount -t cifs -o password= //encoder$1.lan.c3voc.de/video /video
  $e mount -t cifs -o password= //encoder$1.lan.c3voc.de/tmp /video/tmp
  $e mount -t cifs -o password= //encoder$1.lan.c3voc.de/encoded /video/encoded
else
  echo "already mounted"
fi
  • start tracker scripts for encoding
cd /opt/crs/tools/tracker3.0
sudo ./start-screenrc-encoding-only.sh

Similar to variant 2, but the release encoder (minion) only mounts the /video/fuse/$room/ from each recording cube. The encoded and tmp files life on one minion, the secondary minions mount /video/encoded and /video/tmp from the primary minion. [Reason: It is not guaranteed that the minion which encoded a talk also does the postprocessing (upload) step.]

You have to set the room filters only for the recording cubes, the minions can process talks independently.

Modify /opt/crs/tools/tracker3.0/screenrc-scripts:

  • On recording cubes: comment out steps D-encoding, E-postencoding, and F-postprocessing
  • On release encoders: comment out steps A-recording-scheduler, B-mount4cut, and C-cut-postprocessor

After modification, start the workers via the main screenrc on both recording cubes and release encoders:

sudo ./start screenrc-pipeline

Example with case 5 and 6:

on recording cube, without intros either copy or mount the intros from their source (here encoder6)

sudo mount -t cifs -o password= {//storage.lan.c3voc.de,}/video/intros
cd /opt/crs/tools/tracker3.0/
sudo ./start screenrc-pipeline # with steps A, B and C

on master minion (in this example minion5)

mount -t cifs -o password= //encoder5.lan.c3voc.de/video/fuse/podstock2019/Aussenbuehne /video/fuse/podstock2019/Aussenbuehne
mount -t cifs -o password= //encoder6.lan.c3voc.de/video/fuse/podstock2019/Innenbuehne /video/fuse/podstock2019/Innenbuehne
mount -t cifs -o password= //encoder6.lan.c3voc.de/video/intros /video/intros
cd /opt/crs/tools/tracker3.0/
sudo ./start screenrc-pipeline # with steps D, E, F

(ensure that samba is installed on this master minion)

on other minions

mount -t cifs -o password= {//encoder5.lan.c3voc.de,}/video/fuse/podstock2019/Aussenbuehne 
mount -t cifs -o password= {//encoder6.lan.c3voc.de,}/video/fuse/podstock2019/Innenbuehne
mount -t cifs //storage.lan.c3voc.de/encoded /video/encoded
mount -t cifs -o password= //storage.lan.c3voc.de/encoded /video/encoded
mount -t cifs -o password= //storage.lan.c3voc.de/tmp /video/tmp
mount -t cifs -o password= {//storage.lan.c3voc.de,}/video/intros
cd /opt/crs/tools/tracker3.0/
sudo ./start screenrc-encoding-only # only step E

User accounts can have different roles depending on what the user should be able to do:

  • “User” - can cut and edit tickets
  • “Restricted” - can only use already defined actions and can't define new actions
  • “Superuser” - can edit profiles and (re)import fahrplan
  • “Admin”

more details on https://github.com/crs-tools/tracker/blob/master/src/Config/AccessControl.php

Files that should be handled by the tracker (input files) should be named as follows:

  <room>-YYYY-MM-DD_HH-MM-SS.<extension>

Files need to be placed in directories according to the room name

Note: Note that names are stripped from frab and combined with the word “saal” which means i.e. “startrampe 23” results in “saal23”. THIS WILL BE FIXED IN THE FUTURE.

Naming for intro and outro:

  • Intro <frab-id>.dv
  • Outro: outro.dv

The cutting process requires start and end marks. The tracker accepts frame numbers. If your player does not show frame numbers you can approximate with the formula

seconds * 25

assumed you have 25 frames per second. Note that this means you cut per second not per frame !!!

Property Name Example Value Comment
Meta
Meta.Album Easterhegg 2015 will be placed in encoded files metadata
Meta.License Licensed to the public under http://creativecommons.org/licenses/by/3.0/de will be placed in encoded files metadata
Meta.Year 2015 will be placed in encoded files metadata
Processing
Processing.Auphonic.Enable yes use Auphonic for this project?
Processing.Auphonic.Preset BNz7qqLTumDNDh3qjo2S95 GUID of auphonic preset, please check!
Processing.Auphonic.Token <token> OAuth 2.0 bearer token of Auphonic (generate manually)
Processing.Auphonic.SpeedLimit 2000 upload limit for Auphonic uploads in kBytes/s
Processing.Auphonic.ReuseProduction yes reuse the already produced audio file from authonic when reencoding the video (length needs to match)
Processing.Loudnorm.Enable yes Enable loudness normalization filter of FFmpeg. Only works on Debian Stretch (FFmpeg > 3.x) and if Auphonic is disabled!
Processing.File.Intro /video/eh15/intros/1234.ts Intro file location determined automatically, this is set by script C
Processing.File.Outro /video/eh15/intros/outro.ts Outro file location determined automatically, this is set by script C
Processing.BasePath /video/ Define a base path where all other subdirectories are “guessed” by convention. Note this does NOT include the Intro(s) and Outro(s) property, as it is considered an error if those files are missing, therefore it can not be guessed.
Processing.Path.Capture /video/CRS/pieces/Saal/ where are the pieces from the capture process?
Processing.Path.Exmljob Remove this property when you see it!
Processing.Path.Intros /video/eh15/intros/ where are the intro files?
Processing.Duration.Intro 5.4 Duration of the Intro(s) in seconds, this value is used to trim the audio-only files, so that they do not start with several seconds of silence. This value is now set automatically by a worker script!
Processing.Intro.DurationNonAlpha 14.4 If using alpha intros, set the duration of the opaque part of the intro. This is the duration in seconds from the beginning of the intro that is NOT blended over the main content. This is for the video as well as the audio tracks.
Processing.Outro.DurationAlpha 3.88 If using alpha outros, set the duration of the alpha part at the beginning of the outro. For this duration in seconds, the end of the main content (up to the cutout point) is overlayed with the outro video and audio track(s).
Processing.Path.Output /video/eh15/encoded/ where shall the finished encodings show up? NOTE: this is also the directory where master encodings are taken from by the slave profiles, e.g. MP3 audio-only
Processing.Path.Outro /video/eh15/intros/outro.ts where is the outro file? (if directory, a file named <frab-id>.{dv,ts} is searched first)
Processing.Path.Raw /video/fuse/ where are the fuse mounts for cutting created?
Processing.Path.Repair /video/eh15/repair/ where to look for manually repaired files? (pretty unimportant for regular operation)
Processing.Path.Tmp /video/eh15/tmp where is a writable tmp-dir (shared among all encoders!)?
Processing.Video.AspectRatio 16:9 Usually not needed, HD only exists in 16:9 anyway.
Project
Project.Slug eh15 this property already exists in every project, it is only neccessary as an explicit property e.g. if two projects with same slug shall exist
Publishing Parameters for script-H publishing
Publishing.Base.Url http://live.ber.c3voc.de/releases/eh15/ where does media pull the release files from?
Publishing.Url.Secret 436B4233DB874E1E1C93510892E3D secret string used for generation of secure links (need to be set in the nginx config, too)
Publishing.Url.Lifetime 3600 controls how log the generatet links are valid (in seconds since the last page reload)
Publishing.Voctoweb.Enable yes wether files should be released on voctoweb (this is ANDed with Publishing.Voctoweb.EnableProfile from encoding profiles)
Publishing.Voctoweb.Url http://media.ccc.de/browse/conferences/eh2015/ where does the conference show up on voctoweb?
Publishing.Voctoweb.Tags foo, bar, baz tags that only appear on voctoweb
Publishing.Path /srv/releases/eh15/ where in the filesystem of the release machine are the release files?
Publishing.Tags foo, bar, baz tags that will be used for all publishing targets
Publishing.UploadOptions -i /video/upload-key extra options for the postprocessing scp script. Warning: they are intentionally not quoted before integrating them into the cmdline!
Publishing.Upload.SkipSlaves speedy,tweety Comma-separated list of hostnames that share storage with publishing server. If this property is set, the upload script will not process any slave tickets on the given hosts but just set them to done. This is required if master encoding is done on event and slave encoding on other machines that share the storage with the releasing worker.
Publishing.UploadTarget voc@live.ber.c3voc.de:/srv/releases/eh15/ target for postprocessing scp script
Publishing.YouTube.Enable yes wether master files should be released on youtube or not (this is ANDed with Publishing.YouTube.EnableProfile from encoding profiles)
Publishing.YouTube.Privacy public, private or unlisted see Youtube
Publishing.YouTube.Tags eh15,easterhegg,ccc,easterhegg2015,don't kehr,Braunschweig
Publishing.YouTube.Token <token>
Publishing.YouTube.Playlists optional, see [[youtube#fuerdasvoc Youtube]
Publishing.YouTube.TitlePrefixSpeakers yes when this is set, prepend up to x people to title, where x is defined by the integer
Fahrplan
Fahrplan.Abstract The combination of the ongoing technological revolution, globalisation and what are more
Fahrplan.Date 2018-12-27
Fahrplan.DateTime 2018-12-27T11:30:00+0100
Fahrplan.Day 1
Fahrplan.Duration 01:00
Fahrplan.GUID 9dde571b-4d49-4b44-8329-42e354bcc24b
Fahrplan.ID 10021
Fahrplan.Language en
Fahrplan.Person_list Guy Standing
Fahrplan.Persons Guy Standing
Fahrplan.Recording.Optout 0
Fahrplan.Room Adams
Fahrplan.Slug 35c3-10021-theprecariatadisruptiveclassfordisruptive_times
Fahrplan.Start 11:30
Fahrplan.Subtitle Why and How the Precariat will define the Global Transformation to save our planet.
Fahrplan.Title The Precariat: A Disruptive Class for Disruptive Times.
Fahrplan.Track Ethics, Society & Politics
Fahrplan.Type lecture
Fahrplan.URL https://fahrplan.events.ccc.de/congress/2018/Fahrplan/events/10021.html
Recording Include slides as a second video track in the master and h264 encodings
Recording.Slides yes
  • c3tracker/start.1607221619.txt.gz
  • Last modified: 2020/12/06 03:26
  • by andi