diff --git a/froscon2018/artwork/outro.svg b/froscon2018/artwork/outro.svg
index fb19930..052fb97 100644
--- a/froscon2018/artwork/outro.svg
+++ b/froscon2018/artwork/outro.svg
@@ -405,9 +405,26 @@
x="19.25972"
y="1016.6071"
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:44.7326355px;line-height:125%;font-family:'Open Sans';-inkscape-font-specification:'Open Sans Light';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1">25.- 26. August 2018
+ Creative Commons Attribution 4.0 International http://creativecommons.org/licenses/by/4.0/
+
+ transform="matrix(0.61454795,0,0,0.61454795,550.92759,518.35751)">
@@ -417,7 +434,7 @@
-
-
-
-
-
diff --git a/make-adobe-after-effects.py b/make-adobe-after-effects.py
index fa697da..7d7eb77 100755
--- a/make-adobe-after-effects.py
+++ b/make-adobe-after-effects.py
@@ -9,6 +9,7 @@ import time
import sys
import os
import re
+import platform
from xml.sax.saxutils import escape as xmlescape
from shutil import copyfile
@@ -54,6 +55,10 @@ parser.add_argument('--force', action="store_true", default=False, help='''
Force render if file exists.
''')
+parser.add_argument('--no-finalize', dest='nof', action="store_true", default=False, help='''
+ Skip finalize job.
+ ''')
+
parser.add_argument('--outro', action="store_true", default=False, help='''
Render outro from the outro.aep file in the project folder.
''')
@@ -116,15 +121,12 @@ else:
def describe_event(event):
return "#{}: {}".format(event['id'], event['title'])
-
def event_print(event, message):
print("{} – {}".format(describe_event(event), message))
-
tempdir = tempfile.TemporaryDirectory()
print('working in '+tempdir.name)
-
def fmt_command(command, **kwargs):
args = {}
for key, value in kwargs.items():
@@ -133,6 +135,16 @@ def fmt_command(command, **kwargs):
command = command.format(**args)
return shlex.split(command)
+def run_once(command, **kwargs):
+ DETACHED_PROCESS = 0x00000008
+ return subprocess.Popen(
+ fmt_command(command, **kwargs),
+ shell=False,
+ stdin=None,
+ stdout=None,
+ stderr=None,
+ close_fds=True,
+ creationflags=DETACHED_PROCESS)
def run(command, **kwargs):
return subprocess.check_call(
@@ -140,7 +152,6 @@ def run(command, **kwargs):
stderr=subprocess.STDOUT,
stdout=subprocess.DEVNULL)
-
def enqueue_job(event):
event_id = str(event['id'])
if os.path.exists(os.path.join(args.project, event_id+'.ts')) and not args.force:
@@ -152,10 +163,18 @@ def enqueue_job(event):
if event_id == 'pause' or event_id == 'outro' or event_id == 'bgloop':
copyfile(args.project+event_id+'.aep',work_doc)
- run('/Applications/Adobe\ After\ Effects\ CC\ 2018/aerender -project {jobpath} -comp {comp} -output {locationpath}',
- jobpath=work_doc,
- comp=event_id,
- locationpath=intermediate_clip)
+ if platform.system() == 'Darwin':
+ run('/Applications/Adobe\ After\ Effects\ CC\ 2018/aerender -project {jobpath} -comp {comp} -output {locationpath}',
+ jobpath=work_doc,
+ comp=event_id,
+ locationpath=intermediate_clip)
+
+ if platform.system() == 'Windows':
+ run('C:/Program\ Files/Adobe/Adobe\ After\ Effects\ CC\ 2018/Support\ Files/aerender.exe -project {jobpath} -comp {comp} -output {locationpath}',
+ jobpath=work_doc,
+ comp=event_id,
+ locationpath=intermediate_clip)
+
else:
with open(args.project+'intro.jsx', 'r') as fp:
scriptstr = fp.read()
@@ -164,30 +183,43 @@ def enqueue_job(event):
value = str(value).replace('"', '\\"')
scriptstr = scriptstr.replace("$"+str(key), value)
- with open(script_doc, 'w') as fp:
+ with open(script_doc, 'w', encoding='utf-8') as fp:
fp.write(scriptstr)
copyfile(args.project+'intro.aep',work_doc)
- copyfile(args.project+'intro.scpt',ascript_doc)
+
+ if platform.system() == 'Darwin':
+ copyfile(args.project+'intro.scpt',ascript_doc)
+ run('osascript {ascript_path} {jobpath} {scriptpath}',
+ jobpath=work_doc,
+ scriptpath=script_doc,
+ ascript_path=ascript_doc)
- run('osascript {ascript_path} {jobpath} {scriptpath}',
- jobpath=work_doc,
- scriptpath=script_doc,
- ascript_path=ascript_doc)
+ run('/Applications/Adobe\ After\ Effects\ CC\ 2018/aerender -project {jobpath} -comp "intro" -output {locationpath}',
+ jobpath=work_doc,
+ locationpath=intermediate_clip)
- run('/Applications/Adobe\ After\ Effects\ CC\ 2018/aerender -project {jobpath} -comp "intro" -output {locationpath}',
- jobpath=work_doc,
- locationpath=intermediate_clip)
+ if platform.system() == 'Windows':
+ run_once('C:/Program\ Files/Adobe/Adobe\ After\ Effects\ CC\ 2018/Support\ Files/AfterFX.exe -noui {jobpath}',
+ jobpath=work_doc)
+ time.sleep(15)
+
+ run_once('C:/Program\ Files/Adobe/Adobe\ After\ Effects\ CC\ 2018/Support\ Files/AfterFX.exe -noui -r {scriptpath}',
+ scriptpath=script_doc)
+ time.sleep(5)
+
+ run('C:/Program\ Files/Adobe/Adobe\ After\ Effects\ CC\ 2018/Support\ Files/aerender.exe -project {jobpath} -comp "intro" -output {locationpath}',
+ jobpath=work_doc,
+ locationpath=intermediate_clip)
return event_id
-
def finalize_job(job_id, event):
event_id = str(event['id'])
intermediate_clip = os.path.join(tempdir.name, event_id+'.mov')
final_clip = os.path.join(os.path.dirname(args.project), event_id+'.ts')
- run('ffmpeg -y -hide_banner -loglevel error -i "{input}" -map 0:v -c:v mpeg2video -q:v 0 -aspect 16:9 -map 0:1 -shortest -f mpegts "{output}"',
+ run('ffmpeg -y -hide_banner -loglevel error -i {input} -map 0:v -c:v mpeg2video -q:v 0 -aspect 16:9 -map 0:1 -shortest -f mpegts {output}',
#run('ffmpeg -y -hide_banner -loglevel error -i "{input}" -ar 48000 -ac 1 -map 0:v -c:v mpeg2video -q:v 0 -aspect 16:9 -map 1:0 -c:a copy -map 2:0 -c:a copy -shortest -f mpegts "{output}"',
input=intermediate_clip,
output=final_clip)
@@ -214,7 +246,6 @@ for event in events:
continue
if args.rooms and event['room'] not in args.rooms:
- #if event['room'] not in ('ZKM_Medientheater', 'ZKM_OpenHUB', 'ZKM_Vortragssaal', 'HfG_Studio'):
print("skipping room %s (%s)" % (event['room'], event['title']))
continue
@@ -225,8 +256,16 @@ for event in events:
event_print(event, "job was not enqueued successfully, skipping postprocessing")
continue
- event_print(event, "finalizing job")
- finalize_job(job_id, event)
+ if not args.nof:
+ event_print(event, "finalizing job")
+ finalize_job(job_id, event)
+ else:
+ event_id = str(event['id'])
+ event_print(event, "skipping finalizing job")
+ intermediate_clip = os.path.join(tempdir.name, event_id+'.mov')
+ final_clip = os.path.join(os.path.dirname(args.project), event_id+'.mov')
+ copyfile(intermediate_clip, final_clip)
+ event_print(event, "copied intermediate clip to "+final_clip)
print('all done, cleaning up '+tempdir.name)
tempdir.cleanup()
diff --git a/voc_ae/intro.aep b/voc_ae/intro.aep
index 54981f5..70021c7 100644
Binary files a/voc_ae/intro.aep and b/voc_ae/intro.aep differ
diff --git a/voc_ae/intro.jsx b/voc_ae/intro.jsx
index 9046b2a..a47b61e 100644
--- a/voc_ae/intro.jsx
+++ b/voc_ae/intro.jsx
@@ -15,3 +15,4 @@ textDocument_persons.text = "$personnames";
textProp_persons.setValue(textDocument_persons);
app.project.save();
+app.quit();