added files for subscribe
This commit is contained in:
parent
e37f818dc0
commit
19fb082152
7 changed files with 241 additions and 0 deletions
139
subscribe/__init__.py
Normal file
139
subscribe/__init__.py
Normal file
|
@ -0,0 +1,139 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
from renderlib import *
|
||||
from easing import *
|
||||
|
||||
# URL to Schedule-XML
|
||||
scheduleUrl = 'https://frab.das-sendezentrum.de/de/subscribe8/public/schedule.xml'
|
||||
|
||||
titlemap = {
|
||||
|
||||
}
|
||||
|
||||
def introFrames(p):
|
||||
givenFrame = 0
|
||||
|
||||
nr = p['$id'];
|
||||
|
||||
# 9 Sekunden nix
|
||||
frames = 9*fps
|
||||
for i in range(0, frames):
|
||||
givenFrame += 1
|
||||
yield (
|
||||
('bg', 'attr', '{http://www.w3.org/1999/xlink}href', "given-frames/frame%04d.png" % (givenFrame)),
|
||||
('layer1', 'style', 'opacity', "%.4f" % 0), # nix
|
||||
# ('text', 'attr', 'transform', 'translate(%.4f, 0)' % easeOutQuad(i, move, -move, frames)),
|
||||
)
|
||||
|
||||
# 1 Sekunde Text Fadein
|
||||
frames = 1*fps
|
||||
for i in range(0, frames):
|
||||
givenFrame += 1
|
||||
yield (
|
||||
('bg', 'attr', '{http://www.w3.org/1999/xlink}href', "given-frames/frame%04d.png" % (givenFrame)),
|
||||
('layer1', 'style', 'opacity', "%.4f" % easeLinear(i, 0, 1, frames)),
|
||||
# ('text', 'attr', 'transform', 'translate(%.4f, 0)' % easeOutQuad(i, move, -move, frames)),
|
||||
)
|
||||
|
||||
# 5 Sekunde Text
|
||||
frames = 5*fps
|
||||
for i in range(0, frames):
|
||||
givenFrame += 1
|
||||
yield (
|
||||
('bg', 'attr', '{http://www.w3.org/1999/xlink}href', "given-frames/frame%04d.png" % (givenFrame)),
|
||||
('layer1', 'style', 'opacity', "%.4f" %1),
|
||||
# ('text', 'attr', 'transform', 'translate(%.4f, 0)' % easeOutQuad(i, move, -move, frames)),
|
||||
)
|
||||
|
||||
def outroFrames(p):
|
||||
# 3 Sekunden animation bleiben
|
||||
frames = 5*fps
|
||||
|
||||
# five initial frames
|
||||
for i in range(0, 5):
|
||||
yield (
|
||||
('g1', 'style', 'opacity', "%.4f" % 0),
|
||||
('g2', 'style', 'opacity', "%.4f" % 0),
|
||||
('g3', 'style', 'opacity', "%.4f" % 0),
|
||||
)
|
||||
|
||||
# 3 Sekunden
|
||||
frames = 6*fps
|
||||
for i in range(0, frames):
|
||||
yield (
|
||||
('g1', 'style', 'opacity', "%.4f" % easeDelay(easeLinear, 0*fps, i, 0, 1, 4*fps)),
|
||||
('g2', 'style', 'opacity', "%.4f" % easeDelay(easeLinear, 1*fps, i, 0, 1, 4*fps)),
|
||||
('g3', 'style', 'opacity', "%.4f" % easeDelay(easeLinear, 2*fps, i, 0, 1, 4*fps)),
|
||||
)
|
||||
|
||||
# five final frames
|
||||
for i in range(0, 5):
|
||||
yield (
|
||||
('g1', 'style', 'opacity', "%.4f" % 1),
|
||||
('g2', 'style', 'opacity', "%.4f" % 1),
|
||||
('g3', 'style', 'opacity', "%.4f" % 1),
|
||||
)
|
||||
|
||||
def pauseFrames(p):
|
||||
# 3 Sekunden animation bleiben
|
||||
|
||||
for nr in range(0, 3):
|
||||
# 10 sekunden sehen
|
||||
frames = 3*fps
|
||||
for i in range(0, frames):
|
||||
yield (
|
||||
('image%u' % ((nr+0)%3), 'style', 'opacity', "%.4f" % 1),
|
||||
('image%u' % ((nr+1)%3), 'style', 'opacity', "%.4f" % 0),
|
||||
('image%u' % ((nr+2)%3), 'style', 'opacity', "%.4f" % 0),
|
||||
)
|
||||
|
||||
# 1 sekunde faden
|
||||
frames = 2*fps
|
||||
for i in range(0, frames):
|
||||
yield (
|
||||
('image%u' % ((nr+0)%3), 'style', 'opacity', "%.4f" % easeLinear(i, 1, -1, frames)),
|
||||
('image%u' % ((nr+1)%3), 'style', 'opacity', "%.4f" % easeLinear(i, 0, +1, frames)),
|
||||
('image%u' % ((nr+2)%3), 'style', 'opacity', "%.4f" % 0),
|
||||
)
|
||||
|
||||
def debug():
|
||||
render(
|
||||
'intro.svg',
|
||||
'../intro.ts',
|
||||
introFrames,
|
||||
{
|
||||
'$id': 65,
|
||||
'$title': 'Passwort, Karte oder Gesicht'.upper(),
|
||||
'$subtitle': 'zur Sicherheit von Authentifizierungssystemen',
|
||||
'$personnames': 'starbug'
|
||||
}
|
||||
)
|
||||
|
||||
# render(
|
||||
# 'outro.svg',
|
||||
# '../outro.ts',
|
||||
# outroFrames
|
||||
# )
|
||||
|
||||
# render(
|
||||
# 'pause.svg',
|
||||
# '../pause.ts',
|
||||
# pauseFrames
|
||||
# )
|
||||
|
||||
def tasks(queue, args):
|
||||
# iterate over all events extracted from the schedule xml-export
|
||||
for event in events(scheduleUrl, titlemap):
|
||||
|
||||
# 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'].upper(),
|
||||
'$subtitle': event['subtitle'],
|
||||
'$personnames': event['personnames']
|
||||
}
|
||||
))
|
2
subscribe/artwork/DOWNLOAD-URLS
Normal file
2
subscribe/artwork/DOWNLOAD-URLS
Normal file
|
@ -0,0 +1,2 @@
|
|||
wget https://www.dropbox.com/sh/m90efugaztdm00s/AAAynLb-XsUUOOh0NGZkg7Jsa/outro.mp4
|
||||
wget https://github.com/RedHatBrand/overpass/releases/download/2.1/overpass-fonts-ttf-2.1.zip
|
1
subscribe/artwork/gen_frames
Normal file
1
subscribe/artwork/gen_frames
Normal file
|
@ -0,0 +1 @@
|
|||
ffmpeg -i session_opener-25fps.mp4 given-frames/frame%04d.png
|
99
subscribe/artwork/intro.svg
Normal file
99
subscribe/artwork/intro.svg
Normal file
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
width="1920px"
|
||||
height="1080px"
|
||||
viewBox="0 0 1920 1080"
|
||||
enable-background="new 0 0 1920 1080"
|
||||
xml:space="preserve"
|
||||
id="svg2"
|
||||
inkscape:version="0.48.5 r10040"
|
||||
sodipodi:docname="intro-ralf.svg"><metadata
|
||||
id="metadata29"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs27" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="768"
|
||||
id="namedview25"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.37989796"
|
||||
inkscape:cx="733.22098"
|
||||
inkscape:cy="586.24413"
|
||||
inkscape:window-x="-7"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="layer1" /><g
|
||||
inkscape:label="Hintergrund"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer-bg"
|
||||
style="display:inline"><image
|
||||
xlink:href="/mnt/minion4/intro-outro-generator/subscribe/artwork/given-frames/frame0353.png"
|
||||
y="0"
|
||||
width="1920"
|
||||
height="1080"
|
||||
id="bg"
|
||||
x="0"
|
||||
sodipodi:absref="/mnt/minion4/intro-outro-generator/subscribe/artwork/given-frames/frame0353.png" /></g><g
|
||||
id="layer1"
|
||||
inkscape:groupmode="layer"
|
||||
style="opacity:1;display:inline"><g
|
||||
id="g16"><path
|
||||
id="sublogo_x5F_subscribe"
|
||||
d="m 756.005,963.188 c -10.081,0 -19.348,3.479 -26.669,9.303 l 8.637,8.639 c 5.068,-3.672 11.296,-5.838 18.033,-5.838 17,0 30.781,13.783 30.781,30.782 0,16.999 -13.781,30.781 -30.781,30.781 -17,0 -30.782,-13.782 -30.782,-30.781 0,-6.676 2.127,-12.854 5.737,-17.897 l -8.644,-8.645 c -5.759,7.302 -9.198,16.521 -9.198,26.542 0,23.685 19.201,42.885 42.885,42.885 23.684,0 42.885,-19.2 42.885,-42.885 0,-23.685 -19.199,-42.886 -42.884,-42.886 z m 10e-4,64.817 c 12.111,0 21.931,-9.817 21.931,-21.931 0,-12.111 -9.82,-21.931 -21.931,-21.931 -12.112,0 -21.931,9.819 -21.931,21.931 10e-4,12.114 9.82,21.931 21.931,21.931 z m -13.762,-24.744 11.293,0 0,-11.294 5.306,0 0,11.294 11.288,0 0,5.307 -11.288,0 0,11.282 -5.306,0 0,-11.282 -11.293,0 0,-5.307 z"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff;fill-rule:evenodd" /><text
|
||||
transform="translate(815.9785,1027.6465)"
|
||||
id="text19"><tspan
|
||||
x="0"
|
||||
y="0"
|
||||
font-size="61.5872"
|
||||
letter-spacing="-3"
|
||||
id="tspan21"
|
||||
style="font-size:61.58720016000000186px;letter-spacing:-3;fill:#ffffff;font-family:Overpass-Bold">SUBSCRIBE </tspan><tspan
|
||||
x="338.88"
|
||||
y="0"
|
||||
font-size="61.5872"
|
||||
letter-spacing="-3"
|
||||
id="tspan23"
|
||||
style="font-size:61.58720016000000186px;letter-spacing:-3;fill:#ffffff;font-family:Overpass-Light">8</tspan></text>
|
||||
</g><flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot3344"
|
||||
style="font-size:46px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;display:inline;font-family:Overpass;-inkscape-font-specification:Overpass"
|
||||
transform="translate(-47.65625,129.46774)"><flowRegion
|
||||
id="flowRegion3346"><rect
|
||||
id="rect3348"
|
||||
width="1413.1884"
|
||||
height="536.98633"
|
||||
x="301.07437"
|
||||
y="151.82379"
|
||||
style="font-size:46px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;font-family:Overpass;-inkscape-font-specification:Overpass" /></flowRegion><flowPara
|
||||
id="flowPara3354"
|
||||
style="font-size:70px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;line-height:125%;text-transform:uppercase;fill:#ffffff;font-family:Overpass;-inkscape-font-specification:Overpass Bold">$title</flowPara><flowPara
|
||||
id="flowPara3360"
|
||||
style="font-size:40px;line-height:125%">$subtitle</flowPara><flowPara
|
||||
style="font-size:40px;line-height:125%"
|
||||
id="flowPara3003" /><flowPara
|
||||
id="flowPara3362"
|
||||
style="font-size:40px;line-height:125%">$personnames</flowPara></flowRoot></g></svg>
|
After Width: | Height: | Size: 5 KiB |
BIN
subscribe/artwork/outro.ts
Normal file
BIN
subscribe/artwork/outro.ts
Normal file
Binary file not shown.
BIN
subscribe/artwork/overpass-fonts-ttf-2.1.zip
Normal file
BIN
subscribe/artwork/overpass-fonts-ttf-2.1.zip
Normal file
Binary file not shown.
BIN
subscribe/artwork/session_opener-25fps.mp4
Normal file
BIN
subscribe/artwork/session_opener-25fps.mp4
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue