From faa6c5b0360a00c5d485d3b8fd9e5d5e3b1e3152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Redon?= Date: Fri, 26 Apr 2019 16:27:26 +0200 Subject: [PATCH] add intro/outro for osmodevcon 2019 warning: the generated .ts (with the --debug option) are incorrect because the not all animations have the same number of frames while the rendered does not remove the frames generated from the previous rendering before assembling all individual frames into a .ts animation. this bug will remain if the .frames cache folder is not cleared before using ./make.py (also without --debug) --- osmodevcon2019/__init__.py | 147 +++ osmodevcon2019/artwork/background.svg | 946 ++++++++++++++++ osmodevcon2019/artwork/intro.svg | 1372 +++++++++++++++++++++++ osmodevcon2019/artwork/outro.svg | 1479 +++++++++++++++++++++++++ osmodevcon2019/artwork/pause.svg | 1208 ++++++++++++++++++++ 5 files changed, 5152 insertions(+) create mode 100644 osmodevcon2019/__init__.py create mode 100644 osmodevcon2019/artwork/background.svg create mode 100644 osmodevcon2019/artwork/intro.svg create mode 100644 osmodevcon2019/artwork/outro.svg create mode 100644 osmodevcon2019/artwork/pause.svg diff --git a/osmodevcon2019/__init__.py b/osmodevcon2019/__init__.py new file mode 100644 index 0000000..d6129ea --- /dev/null +++ b/osmodevcon2019/__init__.py @@ -0,0 +1,147 @@ +#!/usr/bin/python3 + +from renderlib import * +from easing import * + +# URL to Schedule-XML +scheduleUrl = 'https://pretalx.sysmocom.de/osmodevcon2019/schedule/export/schedule.xml' + +def introFrames(args): + #fade in title + frames = 3*fps + for i in range(0, frames): + yield( + ('title', 'style', 'opacity', easeInQuad(i, 0, 1, frames)), + ) + # fade in subtitle and names + frames = 1*fps + for i in range(0, frames): + yield( + ('title', 'style', 'opacity', 1), + ('subtitle', 'style', 'opacity', easeInQuad(i, 0, 1, frames)), + ('personnames', 'style', 'opacity', easeInQuad(i, 0, 1, frames)), + ) + #show whole image for 2 seconds + frames = 2*fps + for i in range(0, frames): + yield( + ('title', 'style', 'opacity', 1), + ('personnames', 'style', 'opacity', 1), + ('subtitle', 'style', 'opacity', 1), + ) + +def backgroundFrames(parameters): + frames = 5*fps + for i in range(0, frames): + yield( + ('logo', 'style', 'opacity', 1), + ) + +def outroFrames(args): + frames = 2*fps + for i in range(0, frames): + yield( + ('logo', 'style', 'opacity', 1), + ('sublogo', 'style', 'opacity', 1), + ('cclogo', 'style', 'opacity', 1), + ) + # fade out + frames = 3*fps + for i in range(0, frames): + yield( + ('logo', 'style', 'opacity', "%.4f" % easeInCubic(i, 1, -1, frames)), + ('sublogo', 'style', 'opacity', "%.4f" % easeInCubic(i, 1, -1, frames)), + ('cclogo', 'style', 'opacity', "%.4f" % easeInCubic(i, 1, -1, frames)), + ) + +def pauseFrames(args): + #fade in pause + frames = 4*fps + for i in range(0, frames): + yield( + ('pause', 'style', 'opacity', "%.4f" % easeInCubic(i, 0.2, 1, frames)), + ) + + # fade out + frames = 4*fps + for i in range(0, frames): + yield( + ('pause', 'style', 'opacity', "%.4f" % easeInCubic(i, 1, -0.8, frames)), + ) + +def debug(): + render('intro.svg', + '../intro.ts', + introFrames, + { + '$id': 7776, + '$title': 'Configuring + running GPRS/EDGE data services with OsmoPCU, OsmoSGSN and OpenGGSN', + '$subtitle': 'With some subtitle!', + '$personnames': 'Alexander Chemeris + Harald Welte' + } + ) + + render('outro.svg', + '../outro.ts', + outroFrames + ) + + render( + 'background.svg', + '../background.ts', + backgroundFrames + ) + + render('pause.svg', + '../pause.ts', + pauseFrames + ) + + +def tasks(queue, args, idlist, skiplist): + # iterate over all events extracted from the schedule xml-export + for event in events(scheduleUrl): + if not (idlist==[]): + if 000000 in idlist: + print("skipping id (%s [%s])" % (event['title'], event['id'])) + continue + if int(event['id']) not in idlist: + print("skipping id (%s [%s])" % (event['title'], event['id'])) + continue + + # generate a task description and put them into the queue + queue.put(Rendertask( + infile = 'intro.svg', + outfile = str(event['id'])+".ts", + sequence = introFrames, + parameters = { + '$id': event['id'], + '$title': event['title'], + '$subtitle': event['subtitle'], + '$personnames': event['personnames'] + } + )) + + # place a task for the outro into the queue + if not "out" in skiplist: + queue.put(Rendertask( + infile = 'outro.svg', + outfile = 'outro.ts', + sequence = outroFrames + )) + + # place the pause-sequence into the queue + if not "pause" in skiplist: + queue.put(Rendertask( + infile = 'pause.svg', + outfile = 'pause.ts', + sequence = pauseFrames + )) + + # place the background-sequence into the queue + if not "bg" in skiplist: + queue.put(Rendertask( + infile = 'background.svg', + outfile = 'background.ts', + sequence = backgroundFrames + )) diff --git a/osmodevcon2019/artwork/background.svg b/osmodevcon2019/artwork/background.svg new file mode 100644 index 0000000..3a87e75 --- /dev/null +++ b/osmodevcon2019/artwork/background.svg @@ -0,0 +1,946 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + Pause Pause + o + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/osmodevcon2019/artwork/intro.svg b/osmodevcon2019/artwork/intro.svg new file mode 100644 index 0000000..2a8b797 --- /dev/null +++ b/osmodevcon2019/artwork/intro.svg @@ -0,0 +1,1372 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + Pause Pause $title $personnames $subtitle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/osmodevcon2019/artwork/outro.svg b/osmodevcon2019/artwork/outro.svg new file mode 100644 index 0000000..1fbdc0e --- /dev/null +++ b/osmodevcon2019/artwork/outro.svg @@ -0,0 +1,1479 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + Pause Pause + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/osmodevcon2019/artwork/pause.svg b/osmodevcon2019/artwork/pause.svg new file mode 100644 index 0000000..e8d1e7b --- /dev/null +++ b/osmodevcon2019/artwork/pause.svg @@ -0,0 +1,1208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + Pause Pause + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +