subscribe10
This commit is contained in:
parent
e7a4fbabbb
commit
fe19313a7e
5 changed files with 256 additions and 0 deletions
151
subscribe10/__init__.py
Normal file
151
subscribe10/__init__.py
Normal file
|
@ -0,0 +1,151 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
from renderlib import *
|
||||
from easing import *
|
||||
|
||||
# URL to Schedule-XML
|
||||
scheduleUrl = 'https://fahrplan.das-sendezentrum.de/subscribe10/schedule/export/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 Sekunden Text
|
||||
frames = 5*fps-1
|
||||
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(
|
||||
infile = ['intro.svg', 'intro_audio.ts'],
|
||||
outfile = 'intro.ts',
|
||||
sequence = introFrames,
|
||||
parameters = {
|
||||
'$id': 65,
|
||||
'$title': 'Das Parallele Podcastuniversum'.upper(),
|
||||
'$subtitle': 'Ein Einblick in die Podcast-Szene der DIY- und Kreativ-Ecke',
|
||||
'$personnames': 'Monika Andrae'.upper(),
|
||||
# 'only_rerender_frames_after': 225
|
||||
}
|
||||
)
|
||||
|
||||
# render(
|
||||
# 'outro.svg',
|
||||
# '../outro.ts',
|
||||
# outroFrames
|
||||
# )
|
||||
|
||||
# render(
|
||||
# 'pause.svg',
|
||||
# '../pause.ts',
|
||||
# pauseFrames
|
||||
# )
|
||||
|
||||
def tasks(queue, args, id_list, skip_list):
|
||||
# iterate over all events extracted from the schedule xml-export
|
||||
for event in events(scheduleUrl, titlemap):
|
||||
|
||||
# skip events which will not be recorded
|
||||
if event['room'] not in ('Konzertsaal'):
|
||||
print("skipping room %s (%s [%s])" % (event['room'], event['title'], event['id']))
|
||||
continue
|
||||
|
||||
# when id_list is not empty, only render events which are in id_list
|
||||
if id_list and int(event['id']) not in id_list:
|
||||
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', 'intro_audio.ts'],
|
||||
outfile = str(event['id']) + ".ts",
|
||||
sequence = introFrames,
|
||||
parameters = {
|
||||
'$id': event['id'],
|
||||
'$title': event['title'].upper(),
|
||||
'$subtitle': event['subtitle'],
|
||||
'$personnames': event['personnames'].upper(),
|
||||
'only_rerender_frames_after': 225
|
||||
}
|
||||
))
|
2
subscribe10/artwork/DOWNLOAD-URLS
Normal file
2
subscribe10/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
|
2
subscribe10/artwork/gen_frames
Normal file
2
subscribe10/artwork/gen_frames
Normal file
|
@ -0,0 +1,2 @@
|
|||
ffmpeg -i session_opener-25fps.mp4 given-frames/frame%04d.png
|
||||
ffmpeg -i session_opener-25fps.mp4 -map 0:a -ar 48000 -ac 1 -f s16le -shortest -f mpegts intro_audio.ts
|
101
subscribe10/artwork/intro.svg
Normal file
101
subscribe10/artwork/intro.svg
Normal file
|
@ -0,0 +1,101 @@
|
|||
<?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.92.3 (2405546, 2018-03-11)"
|
||||
sodipodi:docname="intro.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 /></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="1920"
|
||||
inkscape:window-height="1080"
|
||||
id="namedview25"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.1125382"
|
||||
inkscape:cx="877.59406"
|
||||
inkscape:cy="737.07354"
|
||||
inkscape:window-x="0"
|
||||
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
|
||||
sodipodi:absref="/home/danimo/dev/voc/intro-outro-generator/subscribe10/artwork/given-frames/frame0353.png"
|
||||
xlink:href="given-frames/frame0353.png"
|
||||
x="0"
|
||||
id="bg"
|
||||
height="1080"
|
||||
width="1920"
|
||||
y="0" /></g><g
|
||||
id="layer1"
|
||||
inkscape:groupmode="layer"
|
||||
style="opacity:1;display:inline"><g
|
||||
id="g16"
|
||||
transform="translate(8.2630017,-36.922117)"><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"
|
||||
style="line-height:0%"><tspan
|
||||
x="0"
|
||||
y="0"
|
||||
font-size="61.5872"
|
||||
letter-spacing="-3"
|
||||
id="tspan21"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:61.58720016px;font-family:Overpass;-inkscape-font-specification:Overpass;letter-spacing:-3;fill:#ffffff"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:61.58750153px;line-height:125%;font-family:Overpass;-inkscape-font-specification:'Overpass, Bold';text-align:start;writing-mode:lr-tb;text-anchor:start"
|
||||
id="tspan4147">SUBSCRIBE </tspan><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:61.58750153px;line-height:125%;font-family:Overpass;-inkscape-font-specification:'Overpass, Light';text-align:start;writing-mode:lr-tb;text-anchor:start"
|
||||
id="tspan4149">10</tspan></tspan></text>
|
||||
|
||||
|
||||
</g><flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot3344"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0.01%;font-family:Overpass;-inkscape-font-specification:Overpass;text-align:center;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:#ffffff"
|
||||
transform="translate(41.22168,129.46774)"><flowRegion
|
||||
id="flowRegion3346"><rect
|
||||
id="rect3348"
|
||||
width="1235.4078"
|
||||
height="639.49005"
|
||||
x="301.07437"
|
||||
y="151.82379"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:46px;line-height:125%;font-family:Overpass;-inkscape-font-specification:Overpass;text-align:center;writing-mode:lr-tb;text-anchor:middle" /></flowRegion><flowPara
|
||||
id="flowPara3354"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:90px;line-height:110.00000238%;font-family:Overpass;-inkscape-font-specification:'Overpass, Bold';text-align:center;text-transform:uppercase;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff">$title</flowPara><flowPara
|
||||
id="subtitle"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50px;line-height:110.00000238%;font-family:Overpass;-inkscape-font-specification:'Overpass, Normal';text-align:center;writing-mode:lr-tb;text-anchor:middle">$subtitle</flowPara><flowPara
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17px;line-height:110.00000238%;font-family:Overpass;-inkscape-font-specification:'Overpass, Normal';text-align:center;writing-mode:lr-tb;text-anchor:middle;opacity:0;fill:#ffffff;fill-opacity:0"
|
||||
id="flowPara4147">.</flowPara><flowPara
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:50px;line-height:139.99999762%;font-family:Overpass;-inkscape-font-specification:'Overpass, Light';text-align:center;writing-mode:lr-tb;text-anchor:middle"
|
||||
id="personnames">$personnames</flowPara></flowRoot></g></svg>
|
After Width: | Height: | Size: 6 KiB |
BIN
subscribe10/artwork/overpass-fonts-ttf-2.1.zip
Normal file
BIN
subscribe10/artwork/overpass-fonts-ttf-2.1.zip
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue