Merge branch 'master' of https://github.com/voc/intro-outro-generator into mrmcd2023

This commit is contained in:
Alexander Brock 2023-10-23 00:12:46 +02:00
commit f7b0281471
25 changed files with 73257 additions and 56 deletions

BIN
camp2023/beon.ttf Normal file

Binary file not shown.

39
camp2023/config.ini Normal file
View file

@ -0,0 +1,39 @@
[default]
schedule = https://pretalx.c3voc.de/camp2023/schedule/export/schedule.xml
template = intro.mp4
alpha = false
prores = false
fontfile = true
inout = t
[title]
in = 16
out = 24
fontfamily = BeonRegular
fontfile = saira.ttf
fontsize = 100
fontcolor = #FB48C4
x = (w-text_w)/2
y = 100
[speaker]
in = 16
out = 24
fontfamily = BeonRegular
fontfile = saira.ttf
fontsize = 70
fontcolor = #3FFF21
x = (w-text_w)/2
y = 800
[text]
in = 16
out = 24
fontfamily = BeonRegular
fontfile = saira.ttf
fontsize = 45
fontcolor = #FB48C4
x = (w-text_w)/2
y = 1000
text = 'Chaos Communication Camp 2023'

BIN
camp2023/saira.ttf Normal file

Binary file not shown.

View file

@ -3,11 +3,14 @@ schedule = https://fahrplan.events.ccc.de/camp/2019/Fahrplan/schedule.xml
template = cccamp19_talks_intro_1080p.mov template = cccamp19_talks_intro_1080p.mov
alpha = true alpha = true
prores = true prores = true
fontfile = true
inout = n
[title] [title]
in = 193 in = 193
out = 324 out = 324
font = Marvel-Bold.ttf fontfamily =
fontfile = Marvel-Bold.ttf
fontsize = 120 fontsize = 120
fontcolor = #c68100 fontcolor = #c68100
x = (w-text_w)/2 x = (w-text_w)/2
@ -16,7 +19,8 @@ y = 480
[speaker] [speaker]
in = 233 in = 233
out = 324 out = 324
font = Marvel-Regular.ttf fontfamily =
fontfile = Marvel-Regular.ttf
fontsize = 70 fontsize = 70
fontcolor = #c68100 fontcolor = #c68100
x = (w-text_w)/2 x = (w-text_w)/2
@ -25,7 +29,8 @@ y = 845
[text] [text]
in = 242 in = 242
out = 324 out = 324
font = Marvel-Regular.ttf fontfamily =
fontfile = Marvel-Regular.ttf
fontsize = 45 fontsize = 45
fontcolor = #c68100 fontcolor = #c68100
x = (w-text_w)/2 x = (w-text_w)/2

View file

@ -3,11 +3,14 @@ schedule = https://pretalx.denog.de/denog11/schedule/export/schedule.xml
template = denog11_intro_template.ts template = denog11_intro_template.ts
alpha = false alpha = false
prores = false prores = false
fontfile = true
inout = n
[title] [title]
in = 1 in = 1
out = 6.5 out = 6.5
font = DejaVuSans.ttf fontfamily =
fontfile = DejaVuSans.ttf
fontsize = 100 fontsize = 100
fontcolor = #f9cc12 fontcolor = #f9cc12
x = 640 x = 640
@ -16,7 +19,8 @@ y = 200
[speaker] [speaker]
in = 2 in = 2
out = 6.5 out = 6.5
font = DejaVuSans.ttf fontfamily =
fontfile = DejaVuSans.ttf
fontsize = 60 fontsize = 60
fontcolor = #ffffff fontcolor = #ffffff
x = 640 x = 640
@ -25,7 +29,8 @@ y = 900
[text] [text]
in = 3 in = 3
out = 6.5 out = 6.5
font = DejaVuSans.ttf fontfamily =
fontfile = DejaVuSans.ttf
fontsize = 45 fontsize = 45
fontcolor = #ffffff fontcolor = #ffffff
x = 640 x = 640

View file

@ -1,31 +1,36 @@
[default] [default]
schedule = https://projects.alpaka.space/media/jhber19-schedule.xml schedule = https://projects.alpaka.space/media/jhber19-schedule.xml
template = intro-alpha.mov template = intro-alpha.mov
alpha = true alpha = true
prores = true prores = true
fontfile = true
inout = n
[title] [title]
in = 175 in = 175
out = 260 out = 260
font = SourceSansPro-Bold.otf fontfamily =
fontsize = 90 fontfile = SourceSansPro-Bold.otf
fontsize = 90
fontcolor = #ffffff fontcolor = #ffffff
x = 1090 x = 1090
y = 450 y = 450
[speaker] [speaker]
in = 175 in = 175
out = 260 out = 260
font = SourceSansPro-Regular.otf fontfamily =
fontsize = 36 fontfile = SourceSansPro-Regular.otf
fontsize = 36
fontcolor = #ffffff fontcolor = #ffffff
x = 1090 x = 1090
y = 900 y = 900
[text] [text]
in = 200 in = 200
out = 250 out = 250
font = SourceSansPro-Regular.otf fontfamily =
fontfile = SourceSansPro-Regular.otf
fontsize = 45 fontsize = 45
fontcolor = #c68100 fontcolor = #c68100
x = (w-text_w)/2 x = (w-text_w)/2

View file

@ -1,19 +1,24 @@
[default] [default]
schedule = https://releasing.c3voc.de/releases/jhjue2020/schedule-jhjue20.xml schedule = https://releasing.c3voc.de/releases/jhjue2020/schedule-jhjue20.xml
; intro_template.ts was derived from a png which was derived from jhjue-20-intro.svg ; intro_template.ts was derived from a png which was derived from jhjue-20-intro.svg
; ffmpeg -loop 1 -i jh20-jue/jh20-jue-intro.png -ar 48000 -ac 2 -f s16le -i /dev/zero -c:v mpeg2video -pix_fmt:v yuv420p -qscale:v 2 -qmin:v 2 -qmax:v 7 -keyint_min 0 -bf 0 -g 0 -intra:0 -maxrate:0 90M -c:a mp2 -b:a 384k -t 5 jh20-jue/jh20-jue_intro_template.ts ; ffmpeg -loop 1 -i jh20-jue/jh20-jue-intro.png -ar 48000 -ac 2 -f s16le -i /dev/zero -c:v mpeg2video -pix_fmt:v yuv420p -qscale:v 2 -qmin:v 2 -qmax:v 7 -keyint_min 0 -bf 0 -g 0 -intra:0 -maxrate:0 90M -c:a mp2 -b:a 384k -t 5 jh20-jue/jh20-jue_intro_template.ts
template = jh20-jue_intro_template.ts template = jh20-jue_intro_template.ts
alpha = false alpha = false
prores = false prores = false
; enable using a font file
fontfile = true
; in and out time format: t for seconds, n for frame number
inout = n
; fields for title and speaker names are empty in the template.ts, so we'll render them in via ffmpeg ; fields for title and speaker names are empty in the template.ts, so we'll render them in via ffmpeg
[title] [title]
; inframe for title ; inframe for title
in = 20 in = 20
; outframe for totle ; outframe for totle
out = 225 out = 225
; title font ; title font (either font family or file, see default setting above)
font = ebisu.ttf fontfamily =
fontfile = ebisu.ttf
; title font size ; title font size
fontsize = 70 fontsize = 70
; title color ; title color
@ -25,7 +30,8 @@ y = 865
[speaker] [speaker]
in = 40 in = 40
out = 225 out = 225
font = ebisu.ttf fontfamily =
fontfile = ebisu.ttf
fontsize = 40 fontsize = 40
fontcolor = #eeeeee fontcolor = #eeeeee
x = 600 x = 600
@ -35,7 +41,8 @@ y = 950
[text] [text]
in = 3 in = 3
out = 4 out = 4
font = ebisu.ttf fontfamily =
fontfile = ebisu.ttf
fontsize = 45 fontsize = 45
fontcolor = #ffffff fontcolor = #ffffff
x = 640 x = 640
@ -44,4 +51,4 @@ text = ''
; build intros via ; build intros via
; ./make-ffmpeg.py jh20-jue/ ; ./make-ffmpeg.py jh20-jue/

View file

@ -3,11 +3,14 @@ schedule = https://pretalx.c3voc.de/jugend-hackt-rhein-neckar-2021/schedule/expo
template = jh21-rn-template.ts template = jh21-rn-template.ts
alpha = false alpha = false
prores = false prores = false
fontfile = true
inout = t
[title] [title]
in = 1 in = 1
out = 6.5 out = 6.5
font = SourceSansPro-Semibold.ttf fontfamily =
fontfile = SourceSansPro-Semibold.ttf
fontsize = 85 fontsize = 85
fontcolor = #ffffff fontcolor = #ffffff
x = 410 x = 410
@ -16,7 +19,8 @@ y = 877
[speaker] [speaker]
in = 2 in = 2
out = 6.5 out = 6.5
font = SourceSansPro-Semibold.ttf fontfamily =
fontfile = SourceSansPro-Semibold.ttf
fontsize = 45 fontsize = 45
fontcolor = #ffffff fontcolor = #ffffff
x = 410 x = 410
@ -25,7 +29,8 @@ y = 954
[text] [text]
in = 3 in = 3
out = 6.5 out = 6.5
font = SourceSansPro-Semibold.ttf fontfamily =
fontfile = SourceSansPro-Semibold.ttf
fontsize = 45 fontsize = 45
fontcolor = #ffffff fontcolor = #ffffff
x = 1920 x = 1920

View file

@ -4,11 +4,14 @@ schedule = https://jh.franzi.business/schedule/jh23dd.xml
template = alpaka_orange.ts template = alpaka_orange.ts
alpha = false alpha = false
prores = false prores = false
fontfile = true
inout = t
[title] [title]
in = 1 in = 1
out = 9.5 out = 9.5
font = SourceSansPro-Semibold.ttf fontfamily =
fontfile = SourceSansPro-Semibold.ttf
fontsize = 100 fontsize = 100
fontcolor = #00a5dd fontcolor = #00a5dd
x = 100 x = 100
@ -17,7 +20,8 @@ y = 785
[speaker] [speaker]
in = 2 in = 2
out = 9 out = 9
font = SourceSansPro-Semibold.ttf fontfamily =
fontfile = SourceSansPro-Semibold.ttf
fontsize = 55 fontsize = 55
fontcolor = #00a5dd fontcolor = #00a5dd
x = 100 x = 100
@ -26,7 +30,8 @@ y = 900
[text] [text]
in = 3 in = 3
out = 8 out = 8
font = SourceSansPro-Semibold.ttf fontfamily =
fontfile = SourceSansPro-Semibold.ttf
fontsize = 45 fontsize = 45
fontcolor = #00a5dd fontcolor = #00a5dd
x = 100 x = 100

View file

@ -1,5 +1,10 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# vim: tabstop=4 shiftwidth=4 expandtab # vim: tabstop=4 shiftwidth=4 expandtab
"""
Generate intros by rendering a blender project with some text fields replaced by
the schedule contents.
The blender project must be configured to use mkv/matroska as output file format!
"""
import subprocess import subprocess
import renderlib import renderlib
@ -217,10 +222,10 @@ def enqueue_job(event):
for key, value in event.items(): for key, value in event.items():
value = str(value).replace('"', '\\"') value = str(value).replace('"', '\\"')
scriptstr = scriptstr.replace("$" + str(key), value) scriptstr = scriptstr.replace("$" + str(key), value)
with open(work_doc, 'w', encoding='utf-8') as fp: with open(work_doc, 'w', encoding='utf-8') as fp:
fp.write(scriptstr) fp.write(scriptstr)
if platform.system() == 'Darwin': if platform.system() == 'Darwin':
if args.debug: if args.debug:
print("running: Blender.app --background %s --python-use-system-env --python %s --use-extension 0 --threads 0 --render-output %s --render-anim" % (work_source, work_doc, intermediate_clip)) print("running: Blender.app --background %s --python-use-system-env --python %s --use-extension 0 --threads 0 --render-output %s --render-anim" % (work_source, work_doc, intermediate_clip))
@ -330,8 +335,8 @@ for event in events:
intermediate_clip = os.path.join(tempdir.name, event_id + '.avi') intermediate_clip = os.path.join(tempdir.name, event_id + '.avi')
final_clip = os.path.join(os.path.dirname(args.project), event_id + '.avi') final_clip = os.path.join(os.path.dirname(args.project), event_id + '.avi')
else: else:
intermediate_clip = os.path.join(tempdir.name, event_id + '.mov') intermediate_clip = os.path.join(tempdir.name, event_id + '.mkv')
final_clip = os.path.join(os.path.dirname(args.project), event_id + '.mov') final_clip = os.path.join(os.path.dirname(args.project), event_id + '.mkv')
copyfile(intermediate_clip, final_clip) copyfile(intermediate_clip, final_clip)
event_print(event, "copied intermediate clip to " + final_clip) event_print(event, "copied intermediate clip to " + final_clip)

View file

@ -10,6 +10,9 @@ import shlex
from PIL import ImageFont from PIL import ImageFont
from configparser import ConfigParser from configparser import ConfigParser
import json import json
import platform
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
# Parse arguments # Parse arguments
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
@ -72,10 +75,13 @@ cparser.read(os.path.join(os.path.dirname(args.project), 'config.ini'))
template = cparser['default']['template'] template = cparser['default']['template']
alpha = cparser['default']['alpha'] alpha = cparser['default']['alpha']
prores = cparser['default']['prores'] prores = cparser['default']['prores']
fontfile = cparser['default']['fontfile'] # use a font file instead of a font family
inout = cparser['default']['inout'] # in and out time format: t for seconds, n for frame number
title_in = cparser['title']['in'] title_in = cparser['title']['in']
title_out = cparser['title']['out'] title_out = cparser['title']['out']
title_font = cparser['title']['font'] title_fontfamily = cparser['title']['fontfamily']
title_fontfile = cparser['title']['fontfile']
title_fontsize = cparser['title']['fontsize'] title_fontsize = cparser['title']['fontsize']
title_fontcolor = cparser['title']['fontcolor'] title_fontcolor = cparser['title']['fontcolor']
title_x = cparser['title']['x'] title_x = cparser['title']['x']
@ -83,7 +89,8 @@ title_y = cparser['title']['y']
speaker_in = cparser['speaker']['in'] speaker_in = cparser['speaker']['in']
speaker_out = cparser['speaker']['out'] speaker_out = cparser['speaker']['out']
speaker_font = cparser['speaker']['font'] speaker_fontfamily = cparser['speaker']['fontfamily']
speaker_fontfile = cparser['speaker']['fontfile']
speaker_fontsize = cparser['speaker']['fontsize'] speaker_fontsize = cparser['speaker']['fontsize']
speaker_fontcolor = cparser['speaker']['fontcolor'] speaker_fontcolor = cparser['speaker']['fontcolor']
speaker_x = cparser['speaker']['x'] speaker_x = cparser['speaker']['x']
@ -91,16 +98,17 @@ speaker_y = cparser['speaker']['y']
text_in = cparser['text']['in'] text_in = cparser['text']['in']
text_out = cparser['text']['out'] text_out = cparser['text']['out']
text_font = cparser['text']['font'] text_fontfamily = cparser['text']['fontfamily']
text_fontfile = cparser['text']['fontfile']
text_fontsize = cparser['text']['fontsize'] text_fontsize = cparser['text']['fontsize']
text_fontcolor = cparser['text']['fontcolor'] text_fontcolor = cparser['text']['fontcolor']
text_x = cparser['text']['x'] text_x = cparser['text']['x']
text_y = cparser['text']['y'] text_y = cparser['text']['y']
text_text = cparser['text']['text'] text_text = cparser['text']['text']
font_t = os.path.join(os.path.dirname(args.project), title_font) font_t = os.path.join(os.path.dirname(args.project), title_fontfile)
font_s = os.path.join(os.path.dirname(args.project), speaker_font) font_s = os.path.join(os.path.dirname(args.project), speaker_fontfile)
font_tt = os.path.join(os.path.dirname(args.project), text_font) font_tt = os.path.join(os.path.dirname(args.project), text_fontfile)
fileformat = os.path.splitext(template)[1] fileformat = os.path.splitext(template)[1]
infile = os.path.join(os.path.dirname(args.project), template) infile = os.path.join(os.path.dirname(args.project), template)
@ -110,7 +118,7 @@ schedule = cparser['default']['schedule']
if not (os.path.exists(os.path.join(args.project, template))): if not (os.path.exists(os.path.join(args.project, template))):
error("Template file {} in Project Path is missing".format(template)) error("Template file {} in Project Path is missing".format(template))
for ffile in (title_font, speaker_font, text_font): for ffile in (title_fontfile, speaker_fontfile, text_fontfile):
if not (os.path.exists(os.path.join(args.project, ffile))): if not (os.path.exists(os.path.join(args.project, ffile))):
error("Font file {} in Project Path is missing".format(ffile)) error("Font file {} in Project Path is missing".format(ffile))
@ -127,7 +135,7 @@ if not args.debug and not schedule:
error("Either specify --debug or supply a schedule in config.ini") error("Either specify --debug or supply a schedule in config.ini")
if args.debug: if args.debug:
persons = ['Thomas Roth', 'Dmitry Nedospasov', 'Josh Datko'] persons = ['Thomas Roth', 'Dmitry Nedospasov', 'Josh Datko',]
events = [{ events = [{
'id': 'debug', 'id': 'debug',
'title': 'wallet.fail', 'title': 'wallet.fail',
@ -171,8 +179,9 @@ def fit_text(string: str, frame_width):
line_num = 0 line_num = 0
line = "" line = ""
for word in split_line: for word in split_line:
w, _ = translation_font.getsize(" ".join([line, word])) left, top, right, bottom = translation_font.getbbox(" ".join([line, word]))
if w > (frame_width - (2 * 6)): width, height = right - left, bottom - top
if width > (frame_width - (2 * 6)):
lines += line.strip() + "\n" lines += line.strip() + "\n"
line = "" line = ""
@ -225,20 +234,39 @@ def enqueue_job(event):
outfile = os.path.join(os.path.dirname(args.project), event_id + '.ts') outfile = os.path.join(os.path.dirname(args.project), event_id + '.ts')
videofilter = "drawtext=enable='between(n,{0},{1})':fontfile={2}:fontsize={3}:fontcolor={4}:x={5}:y={6}:text='{7}',".format(title_in, title_out, font_t, title_fontsize, title_fontcolor, title_x, title_y, t) if platform.system() == 'Windows':
videofilter += "drawtext=enable='between(n,{0},{1})':fontfile={2}:fontsize={3}:fontcolor={4}:x={5}:y={6}:text='{7}',".format(speaker_in, speaker_out, font_s, speaker_fontsize, speaker_fontcolor, speaker_x, speaker_y, s) ffmpeg_path = './ffmpeg.exe'
videofilter += "drawtext=enable='between(n,{0},{1})':fontfile={2}:fontsize={3}:fontcolor={4}:x={5}:y={6}:text={7}".format(text_in, text_out, font_tt, text_fontsize, text_fontcolor, text_x, text_y, text_text) font_t_win = "/".join(font_t.split("\\"))
font_s_win = "/".join(font_s.split("\\"))
font_tt_win = "/".join(font_tt.split("\\"))
else:
ffmpeg_path = 'ffmpeg'
if fontfile == 'true':
if platform.system() == 'Windows':
videofilter = "drawtext=enable='between({8},{0},{1})':fontfile='{2}':fontsize={3}:fontcolor={4}:x={5}:y={6}:text='{7}',".format(title_in, title_out, font_t_win, title_fontsize, title_fontcolor, title_x, title_y, t, inout)
videofilter += "drawtext=enable='between({8},{0},{1})':fontfile='{2}':fontsize={3}:fontcolor={4}:x={5}:y={6}:text='{7}':box=1,".format(speaker_in, speaker_out, font_s_win, speaker_fontsize, speaker_fontcolor, speaker_x, speaker_y, s, inout)
videofilter += "drawtext=enable='between({8},{0},{1})':fontfile='{2}':fontsize={3}:fontcolor={4}:x={5}:y={6}:text='{7}'".format(text_in, text_out, font_tt_win, text_fontsize, text_fontcolor, text_x, text_y, text_text, inout)
else:
videofilter = "drawtext=enable='between({8},{0},{1})':fontfile='{2}':fontsize={3}:fontcolor={4}:x={5}:y={6}:text='{7}',".format(title_in, title_out, font_t, title_fontsize, title_fontcolor, title_x, title_y, t, inout)
videofilter += "drawtext=enable='between({8},{0},{1})':fontfile='{2}':fontsize={3}:fontcolor={4}:x={5}:y={6}:text='{7}':box=1,".format(speaker_in, speaker_out, font_s, speaker_fontsize, speaker_fontcolor, speaker_x, speaker_y, s, inout)
videofilter += "drawtext=enable='between({8},{0},{1})':fontfile='{2}':fontsize={3}:fontcolor={4}:x={5}:y={6}:text='{7}'".format(text_in, text_out, font_tt, text_fontsize, text_fontcolor, text_x, text_y, text_text, inout)
else:
videofilter = "drawtext=enable='between({8},{0},{1})':font='{2}':fontsize={3}:fontcolor={4}:x={5}:y={6}:text='{7}',".format(title_in, title_out, title_fontfamily, title_fontsize, title_fontcolor, title_x, title_y, t, inout)
videofilter += "drawtext=enable='between({8},{0},{1})':font='{2}':fontsize={3}:fontcolor={4}:x={5}:y={6}:text='{7}':box=1,".format(speaker_in, speaker_out, speaker_fontfamily, speaker_fontsize, speaker_fontcolor, speaker_x, speaker_y, s, inout)
videofilter += "drawtext=enable='between({8},{0},{1})':font='{2}':fontsize={3}:fontcolor={4}:x={5}:y={6}:text='{7}'".format(text_in, text_out, text_fontfamily, text_fontsize, text_fontcolor, text_x, text_y, text_text, inout)
if fileformat == '.mov': if fileformat == '.mov':
if alpha == 'true': if alpha == 'true':
if prores == 'true': if prores == 'true':
cmd = 'ffmpeg -y -i "{0}" -vf "{1}" -vcodec prores_ks -pix_fmt yuva444p10le -profile:v 4444 -shortest -movflags faststart -f mov "{2}"'.format(infile, videofilter, outfile) cmd = '{3} -y -i "{0}" -vf "{1}" -vcodec prores_ks -pix_fmt yuva444p10le -profile:v 4444 -shortest -movflags faststart -f mov "{2}"'.format(infile, videofilter, outfile, ffmpeg_path)
else: else:
cmd = 'ffmpeg -y -i "{0}" -vf "{1}" -shortest -c:v qtrle -movflags faststart -f mov "{2}"'.format(infile, videofilter, outfile) cmd = '{3} -y -i "{0}" -vf "{1}" -shortest -c:v qtrle -movflags faststart -f mov "{2}"'.format(infile, videofilter, outfile, ffmpeg_path)
else: else:
cmd = 'ffmpeg -y -i "{0}" -vf "{1}" -map 0:0 -c:v mpeg2video -q:v 2 -aspect 16:9 -map 0:1 -c:a mp2 -b:a 384k -shortest -f mpegts "{2}"'.format(infile, videofilter, outfile) cmd = '{3} -y -i "{0}" -vf "{1}" -map 0:0 -c:v mpeg2video -q:v 2 -aspect 16:9 -map 0:1 -c:a mp2 -b:a 384k -shortest -f mpegts "{2}"'.format(infile, videofilter, outfile, ffmpeg_path)
else: else:
cmd = 'ffmpeg -y -i "{0}" -vf "{1}" -map 0:0 -c:v mpeg2video -q:v 2 -aspect 16:9 -map 0:1 -c:a mp2 -b:a 384k -shortest -f mpegts "{2}"'.format(infile, videofilter, outfile) cmd = '{3} -y -i "{0}" -vf "{1}" -map 0:0 -c:v mpeg2video -q:v 2 -aspect 16:9 -map 0:1 -c:a mp2 -b:a 384k -shortest -f mpegts "{2}"'.format(infile, videofilter, outfile, ffmpeg_path)
if args.debug: if args.debug:
print(cmd) print(cmd)

View file

@ -2,11 +2,16 @@
#schedule = https://talks.mrmcd.net/2019/schedule/export/schedule.xml #schedule = https://talks.mrmcd.net/2019/schedule/export/schedule.xml
schedule = file:///home/thorti/git/c3voc/intro-outro-generator/mrmcd2019/schedule.xml schedule = file:///home/thorti/git/c3voc/intro-outro-generator/mrmcd2019/schedule.xml
template = mrmcd2019.mov template = mrmcd2019.mov
alpha = false
prores = false
fontfile = true
inout = n
[title] [title]
in = 50 in = 50
out = 225 out = 225
font = Jura-Bold.ttf fontfamily =
fontfile = Jura-Bold.ttf
fontsize = 80 fontsize = 80
fontcolor = #47acda fontcolor = #47acda
x = (w-text_w)/2 x = (w-text_w)/2
@ -15,7 +20,8 @@ y = 540
[speaker] [speaker]
in = 75 in = 75
out = 225 out = 225
font = Jura-Regular.ttf fontfamily =
fontfile = Jura-Regular.ttf
fontsize = 50 fontsize = 50
fontcolor = #094762 fontcolor = #094762
x = (w-text_w)/2 x = (w-text_w)/2
@ -24,7 +30,8 @@ y = 950
[text] [text]
in = 242 in = 242
out = 324 out = 324
font = Jura-Regular.ttf fontfamily =
fontfile = Jura-Regular.ttf
fontsize = 45 fontsize = 45
fontcolor = #c68100 fontcolor = #c68100
x = (w-text_w)/2 x = (w-text_w)/2

View file

@ -1,5 +1,5 @@
pillow pillow
cssutils==1.0.2 cssutils==1.0.2
lxml==4.6.3 lxml==4.9.1
svg.path==4.0.2 svg.path==4.0.2
Wand==0.6.5 Wand==0.6.5

148
vcfb22/__init__.py Normal file
View file

@ -0,0 +1,148 @@
#!/usr/bin/python3
from renderlib import *
from easing import *
import math
# URL to Schedule-XML
scheduleUrl = 'http://vcfb.de/2022/schedule.xml'
# For (really) too long titles
titlemap = {
#708: "Neue WEB-Anwendungen des LGRB Baden-Württemberg im Überblick"
}
personmap = {
}
taglinemap = {
}
def outroFrames(p):
frames = 2*fps
for i in range(0, frames):
yield (
('logo', 'style', 'opacity', "%.4f" % easeInCubic(i, 0, 1, frames)),
('plate', 'style', 'opacity', 0),
)
frames = 1*fps
for i in range(0, frames):
yield (
('logo', 'style', 'opacity', 1),
('plate', 'style', 'opacity', "%.4f" % easeInCubic(i, 0, 1, frames)),
)
frames = 2*fps
for i in range(0, frames):
yield (
('logo', 'style', 'opacity', 1),
('plate', 'style', 'opacity', 1),
)
def introFrames(p):
frames = math.floor(1.5*fps)
for i in range(0, frames):
yield (
('header', 'attr', 'y', 659),
('text', 'style', 'opacity', 0),
)
frames = 1*fps
for i in range(0, frames):
yield (
('text', 'style', 'opacity', "%.4f" % easeInCubic(i, 0, 1, frames)),
)
frames = math.ceil(3.5*fps)
for i in range(0, frames):
yield (
('text', 'style', 'opacity', 1),
)
def pauseFrames(p):
pass
def debug():
render(
'intro.svg',
'../intro.ts',
introFrames,
{
'$id': 6526,
'$title': 'Besser steuern durch Daten? - Zur Performativität soziotechnischer Systeme und der Quantifizierung der sozialen Welt',
'$subtitle': '',
'$personnames': 'Judith Hartstein und Anne K. Krüger'
}
)
#render(
# 'outro.svg',
# '../outro.ts',
# outroFrames
#)
# render('pause.svg',
# '../pause.ts',
# pauseFrames
# )
def tasks(queue, params, 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
if int(event['id']) not in skiplist:
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']
}
))
# for person in persons(scheduleUrl, personmap, taglinemap, event['id']):
# queue.put(Rendertask(
# infile = 'lower-third.svg',
# outfile = 'event_{}_person_{}.png'.format(str(event['id']), str(person['id'])),
# parameters = {
# '$PERSON': person['person'],
# '$TAGLINE': person['tagline'],
# }
# ))
#
# queue.put(Rendertask(
# infile = 'lower-third.svg',
# outfile = 'event_{}_persons.png'.format(str(event['id'])),
# parameters = {
# '$PERSON': event['personnames'],
# '$TAGLINE': '',
# }
# ))
#
# 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
# ))

Binary file not shown.

15584
vcfb22/artwork/intro.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 2.1 MiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 1 MiB

7956
vcfb22/artwork/outro.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 1 MiB

6626
vcfb22/artwork/pause.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 1,015 KiB

148
vcfb23/__init__.py Normal file
View file

@ -0,0 +1,148 @@
#!/usr/bin/python3
from renderlib import *
from easing import *
import math
# URL to Schedule-XML
scheduleUrl = 'http://vcfb.de/2023/schedule.xml'
# For (really) too long titles
titlemap = {
#708: "Neue WEB-Anwendungen des LGRB Baden-Württemberg im Überblick"
}
personmap = {
}
taglinemap = {
}
def outroFrames(p):
frames = 2*fps
for i in range(0, frames):
yield (
('logo', 'style', 'opacity', "%.4f" % easeInCubic(i, 0, 1, frames)),
('plate', 'style', 'opacity', 0),
)
frames = 1*fps
for i in range(0, frames):
yield (
('logo', 'style', 'opacity', 1),
('plate', 'style', 'opacity', "%.4f" % easeInCubic(i, 0, 1, frames)),
)
frames = 2*fps
for i in range(0, frames):
yield (
('logo', 'style', 'opacity', 1),
('plate', 'style', 'opacity', 1),
)
def introFrames(p):
frames = math.floor(1.5*fps)
for i in range(0, frames):
yield (
('header', 'attr', 'y', 659),
('text', 'style', 'opacity', 0),
)
frames = 1*fps
for i in range(0, frames):
yield (
('text', 'style', 'opacity', "%.4f" % easeInCubic(i, 0, 1, frames)),
)
frames = math.ceil(3.5*fps)
for i in range(0, frames):
yield (
('text', 'style', 'opacity', 1),
)
def pauseFrames(p):
pass
def debug():
render(
'intro.svg',
'../intro.ts',
introFrames,
{
'$id': 6526,
'$title': 'Besser steuern durch Daten? - Zur Performativität soziotechnischer Systeme und der Quantifizierung der sozialen Welt',
'$subtitle': '',
'$personnames': 'Judith Hartstein und Anne K. Krüger'
}
)
#render(
# 'outro.svg',
# '../outro.ts',
# outroFrames
#)
# render('pause.svg',
# '../pause.ts',
# pauseFrames
# )
def tasks(queue, params, 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
if int(event['id']) not in skiplist:
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']
}
))
# for person in persons(scheduleUrl, personmap, taglinemap, event['id']):
# queue.put(Rendertask(
# infile = 'lower-third.svg',
# outfile = 'event_{}_person_{}.png'.format(str(event['id']), str(person['id'])),
# parameters = {
# '$PERSON': person['person'],
# '$TAGLINE': person['tagline'],
# }
# ))
#
# queue.put(Rendertask(
# infile = 'lower-third.svg',
# outfile = 'event_{}_persons.png'.format(str(event['id'])),
# parameters = {
# '$PERSON': event['personnames'],
# '$TAGLINE': '',
# }
# ))
#
# 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
# ))

Binary file not shown.

15584
vcfb23/artwork/intro.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 2.1 MiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 1 MiB

7956
vcfb23/artwork/outro.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 1 MiB

6626
vcfb23/artwork/pause.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 1,015 KiB