diff --git a/fsck2025/__init__.py b/fsck2025/__init__.py index 9fa165b..deb0206 100644 --- a/fsck2025/__init__.py +++ b/fsck2025/__init__.py @@ -19,34 +19,34 @@ def introFrames(args): ) # fade in logo - # frames = 1 * fps - # for i in range(0, frames): - # # source: matrix(0.66093871,0,0,0.66093871,325.49887,111.96043) - # # target: matrix(1, 0, 0, 1, 0, 0) - # size = 0.66 + easeInOutSine(i, 0.0, 1.0 - 0.66, frames) - # posx = easeInOutSine(frames - i, 0.0, 325.49887, frames) - # posy = easeInOutSine(frames - i, 0.0, 111.96043, frames) - # yield ( - # ( - # "glogo", - # "attr", - # "transform", - # # the easing function can’t handle easing from larger to smaller, so use this hacky workaround - # f"translate(0,{easeInQuad(frames - i, 0.0, 200.0, frames)})", - # ), - # ("glogo", "style", "opacity", easeOutSine(i, 0, 1, frames)), - # # scale in the fsck text banner behind the foreground elements - # # target size is 5.414656 in both x and y - # ( - # "fsck-banner", - # "attr", - # "transform", - # f"matrix({size:.4f},0,0,{size:.4f},{posx:.4f},{posy:.4f})", - # ), - # ("title", "style", "opacity", 0), - # ("persons", "style", "opacity", 0), - # ("sparkle", "style", "opacity", 0), - # ) + frames = 3 * fps + for i in range(0, frames): + # source: matrix(0.66093871,0,0,0.66093871,325.49887,111.96043) + # target: matrix(1, 0, 0, 1, 0, 0) + size = 0.66 + easeInOutQuad(i, 0.0, 1.0 - 0.66, frames) + posx = easeInOutQuad(frames - i, 0.0, 325.49887, frames) + posy = easeInOutQuad(frames - i, 0.0, 111.96043, frames) + yield ( + ( + "glogo", + "attr", + "transform", + # the easing function can’t handle easing from larger to smaller, so use this hacky workaround + f"translate(0,{easeInQuad(frames - i, 0.0, 200.0, frames)})", + ), + ("glogo", "style", "opacity", easeOutQuad(i, 0, 1, frames)), + # scale in the fsck text banner behind the foreground elements + # target size is 5.414656 in both x and y + ( + "fsck-banner", + "attr", + "transform", + f"matrix({size:.4f},0,0,{size:.4f},{posx:.4f},{posy:.4f})", + ), + ("title", "style", "opacity", 0), + ("persons", "style", "opacity", 0), + ("sparkle", "style", "opacity", 0), + ) frames = 1 * fps for i in range(0, frames): @@ -58,41 +58,53 @@ def introFrames(args): ) # fade in title and persons - frames = 2 * fps + frames = 3 * fps intermediate = (frames * 1) // 3 for i in range(0, intermediate): yield ( - ("title", "style", "opacity", easeOutSine(i, 0, 1, frames)), + ("title", "style", "opacity", easeOutQuad(i, 0, 1, frames)), ("persons", "style", "opacity", 0), ("glogo", "style", "opacity", 1), ( "sparkle", "style", "opacity", - easeOutSine(min(i * 2, intermediate), 0, 1, intermediate), + easeOutQuad(min(i * 2, intermediate), 0, 1, intermediate), + ), + ( + "sparkle", + "attr", + "transform", + f"translate({-463.66869 + easeLinear(i, 0.0, 378.32308 + 463.66869, frames)}, 0)", ), ) for i in range(intermediate, frames): yield ( - ("title", "style", "opacity", easeOutSine(i, 0, 1, frames)), + ("title", "style", "opacity", easeOutQuad(i, 0, 1, frames)), ( "persons", "style", "opacity", - easeOutSine(i - intermediate, 0, 1, frames - intermediate), + easeOutQuad(i - intermediate, 0, 1, frames - intermediate), ), ("glogo", "style", "opacity", 1), ( "sparkle", "style", "opacity", - easeInSine( - i-intermediate, + easeInQuad( + i - intermediate, 1, -1, frames - intermediate, ), ), + ( + "sparkle", + "attr", + "transform", + f"translate({-463.66869 + easeLinear(i, 0.0, 378.32308 + 463.66869, frames)}, 0)", + ), ) # show whole image for 5 seconds @@ -134,7 +146,7 @@ def outroFrames(args): def debug(): render( - "intro.svg", + ["intro.svg", "intro.flac"], "../intro.ts", introFrames, { @@ -169,7 +181,7 @@ def tasks(queue, args, idlist, skiplist): # generate a task description and put it into the queue queue.put( Rendertask( - infile="intro.svg", + infile=["intro.svg", "intro.flac"], outfile=str(event["id"]) + ".ts", sequence=introFrames, parameters={ diff --git a/fsck2025/artwork/FSCK_Banner.svg b/fsck2025/artwork/FSCK_Banner.svg new file mode 100644 index 0000000..2a152f8 --- /dev/null +++ b/fsck2025/artwork/FSCK_Banner.svg @@ -0,0 +1,133 @@ + + + + + + + + diff --git a/fsck2025/artwork/intro.flac b/fsck2025/artwork/intro.flac new file mode 100644 index 0000000..09637db Binary files /dev/null and b/fsck2025/artwork/intro.flac differ diff --git a/fsck2025/artwork/intro.svg b/fsck2025/artwork/intro.svg index 0fb6d40..6da939f 100644 --- a/fsck2025/artwork/intro.svg +++ b/fsck2025/artwork/intro.svg @@ -39,7 +39,7 @@ id="path17" />$title$title$personnames + id="tspan2">$personnames diff --git a/fsck2025/artwork/pip_template_fsck2024_final.svg b/fsck2025/artwork/pip_template_fsck2025.svg similarity index 99% rename from fsck2025/artwork/pip_template_fsck2024_final.svg rename to fsck2025/artwork/pip_template_fsck2025.svg index bd1b0a1..6d4f12e 100644 --- a/fsck2025/artwork/pip_template_fsck2024_final.svg +++ b/fsck2025/artwork/pip_template_fsck2025.svg @@ -27,15 +27,15 @@ inkscape:pagecheckerboard="0" inkscape:deskcolor="#d1d1d1" inkscape:document-units="px" - inkscape:zoom="1.2564954" - inkscape:cx="913.25441" - inkscape:cy="482.29383" + inkscape:zoom="1.0127873" + inkscape:cx="931.58751" + inkscape:cy="488.25652" inkscape:window-width="3840" inkscape:window-height="2052" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" - inkscape:current-layer="layer1" + inkscape:current-layer="layer2" showgrid="false" /> + transform="rotate(15)" /> diff --git a/fsck2025/artwork/sbs_template_fsck2025.svg b/fsck2025/artwork/sbs_template_fsck2025.svg new file mode 100644 index 0000000..50145af --- /dev/null +++ b/fsck2025/artwork/sbs_template_fsck2025.svg @@ -0,0 +1,243 @@ + + + + diff --git a/renderlib.py b/renderlib.py index c5407cd..bf18748 100644 --- a/renderlib.py +++ b/renderlib.py @@ -41,7 +41,8 @@ class Rendertask: def __init__(self, infile, parameters={}, outfile=None, workdir='.', sequence=None): if isinstance(infile, list): self.infile = infile[0] - # self.audiofile = infile[1] + self.audiofile = infile[1] + print(f"using audio file {self.audiofile}") else: self.infile = infile self.audiofile = None @@ -200,16 +201,12 @@ def rendertask_video(task): cmd = 'cd {0} && '.format(task.workdir) cmd += 'ffmpeg -f image2 -i .frames/%04d.png ' if task.audiofile is None: - cmd += '-ar 48000 -ac 1 -f s16le -i /dev/zero -ar 48000 -ac 1 -f s16le -i /dev/zero ' + cmd += '-ar 48000 -ac 1 -f s16le -i /dev/zero ' else: - cmd += '-i {0} -i {0} '.format(task.audiofile) + cmd += '-i {0} '.format(task.audiofile) - cmd += '-map 0:0 -c:v mpeg2video -q:v 2 -aspect 16:9 ' + cmd += '-map 0:0 -c:v mpeg2video -q:v 2 -aspect 16:9 -map 1:a ' - if task.audiofile is None: - cmd += '-map 1:0 -map 2:0 ' - else: - cmd += '-map 1:0 -c:a copy -map 2:0 -c:a copy ' cmd += '-shortest -f mpegts "{0}"'.format(task.outfile) elif task.outfile.endswith('.mov'): cmd = 'cd {0} && '.format(task.workdir)