Merge branch 'master' of mng.c3voc.de:intro-outro-generator

This commit is contained in:
v0tti 2018-08-23 15:12:16 +02:00
commit fbc8ba2ab1
4 changed files with 88 additions and 56 deletions

View file

@ -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</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:13.33333302px;line-height:0%;font-family:'Open Sans';-inkscape-font-specification:'Open Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none"
x="702.03717"
y="1032.5555"
id="text3062-4"><tspan
sodipodi:role="line"
id="tspan3064-8"
x="702.03717"
y="1032.5555"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:13.33333302px;line-height:125%;font-family:'Open Sans';-inkscape-font-specification:'Open Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1">Creative Commons Attribution 4.0 International </tspan><tspan
sodipodi:role="line"
x="702.03717"
y="1049.2222"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:13.33333302px;line-height:125%;font-family:'Open Sans';-inkscape-font-specification:'Open Sans, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1"
id="tspan492"> http://creativecommons.org/licenses/by/4.0/</tspan></text>
<g
id="license"
transform="matrix(0.61454795,0,0,0.61454795,600.92759,534.35751)">
transform="matrix(0.61454795,0,0,0.61454795,550.92759,518.35751)">
<g
transform="matrix(2.404762,0,0,2.404762,-253.42861,-1037.1755)"
id="g3607">
@ -417,7 +434,7 @@
<path
inkscape:connector-curvature="0"
style="fill:#a8b0ab;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 3.40625,0.476563 113.35547,0.203125 c 1.58594,0 3,-0.238282 3,3.160156 l -0.14063,37.328125 -119.074215,0 0,-37.46875 c 0,-1.671875 0.164063,-3.222656 2.859375,-3.222656 z"
d="m 3.40625,0.476563 113.35547,0.203125 c 1.58594,0 3,-0.238282 3,3.160156 l -0.14063,37.328125 H 0.546875 V 3.699219 c 0,-1.671875 0.164063,-3.222656 2.859375,-3.222656 z"
id="path3511" />
<path
inkscape:connector-curvature="0"
@ -432,62 +449,37 @@
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 117.75391,0 2.246094,0 C 1.007813,0 0,1.007813 0,2.246094 L 0,41.492188 C 0,41.773438 0.226563,42 0.507813,42 L 119.49219,42 C 119.77344,42 120,41.773438 120,41.492188 L 120,2.246094 C 120,1.007813 118.99219,0 117.75391,0 Z M 2.246094,1.015625 l 115.507816,0 c 0.67968,0 1.23047,0.550781 1.23047,1.230469 0,0 0,15.820312 0,27.246094 l -82.554692,0 c -3.027344,5.46875 -8.859375,9.183593 -15.546875,9.183593 -6.695313,0 -12.523438,-3.710937 -15.546875,-9.183593 l -4.320313,0 c 0,-11.425782 0,-27.246094 0,-27.246094 0,-0.679688 0.550781,-1.230469 1.230469,-1.230469 z"
d="M 117.75391,0 H 2.246094 C 1.007813,0 0,1.007813 0,2.246094 V 41.492188 C 0,41.773438 0.226563,42 0.507813,42 H 119.49219 C 119.77344,42 120,41.773438 120,41.492188 V 2.246094 C 120,1.007813 118.99219,0 117.75391,0 Z M 2.246094,1.015625 H 117.75391 c 0.67968,0 1.23047,0.550781 1.23047,1.230469 0,0 0,15.820312 0,27.246094 H 36.429688 c -3.027344,5.46875 -8.859375,9.183593 -15.546875,9.183593 -6.695313,0 -12.523438,-3.710937 -15.546875,-9.183593 H 1.015625 c 0,-11.425782 0,-27.246094 0,-27.246094 0,-0.679688 0.550781,-1.230469 1.230469,-1.230469 z"
id="path3517" />
<path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 86.265625,37.730469 c 0.07813,0.15625 0.183594,0.28125 0.316406,0.378906 0.132813,0.09375 0.289063,0.164063 0.46875,0.210938 0.179688,0.04687 0.363282,0.07031 0.554688,0.07031 0.128906,0 0.269531,-0.01172 0.417969,-0.03125 0.144531,-0.02344 0.285156,-0.0625 0.414062,-0.125 0.128906,-0.0625 0.238281,-0.148437 0.324219,-0.257812 0.08594,-0.105469 0.128906,-0.242188 0.128906,-0.410157 0,-0.179687 -0.05469,-0.324218 -0.171875,-0.4375 -0.113281,-0.109375 -0.261719,-0.203125 -0.449219,-0.277343 -0.183593,-0.07422 -0.394531,-0.140625 -0.628906,-0.195313 -0.234375,-0.05469 -0.472656,-0.117187 -0.710937,-0.183594 -0.25,-0.0625 -0.488282,-0.140625 -0.722657,-0.230468 -0.234375,-0.08594 -0.445312,-0.203125 -0.632812,-0.347657 -0.183594,-0.140625 -0.332031,-0.320312 -0.449219,-0.53125 -0.113281,-0.214843 -0.167969,-0.472656 -0.167969,-0.773437 0,-0.34375 0.07031,-0.636719 0.214844,-0.886719 0.148438,-0.25 0.335938,-0.460937 0.570313,-0.628906 0.234375,-0.164063 0.5,-0.289063 0.796875,-0.371094 0.296875,-0.07813 0.59375,-0.117187 0.890625,-0.117187 0.347656,0 0.679687,0.03906 0.996093,0.113281 0.316407,0.07813 0.601563,0.203125 0.847657,0.378906 0.246093,0.171875 0.445312,0.394531 0.589843,0.664063 0.144532,0.269531 0.214844,0.59375 0.214844,0.976562 l -1.410156,0 c -0.01563,-0.195312 -0.05469,-0.359375 -0.125,-0.492187 -0.07031,-0.128907 -0.164063,-0.230469 -0.28125,-0.304688 -0.117188,-0.07422 -0.25,-0.125 -0.402344,-0.15625 -0.152344,-0.03125 -0.316406,-0.04687 -0.492187,-0.04687 -0.117188,0 -0.234375,0.01172 -0.351563,0.03516 -0.117187,0.02734 -0.222656,0.07031 -0.320312,0.128907 -0.09375,0.0625 -0.171875,0.140625 -0.234375,0.234375 -0.0625,0.09375 -0.09375,0.210937 -0.09375,0.351562 0,0.128906 0.02734,0.234375 0.07422,0.316406 0.05078,0.08203 0.148438,0.15625 0.292969,0.222657 0.144531,0.06641 0.34375,0.136718 0.601563,0.203125 0.257812,0.07031 0.589843,0.15625 1.003906,0.261718 0.125,0.02344 0.296875,0.07031 0.515625,0.132813 0.21875,0.06641 0.4375,0.167969 0.652344,0.3125 0.21875,0.140625 0.402343,0.332031 0.5625,0.570312 0.15625,0.238282 0.234375,0.542969 0.234375,0.914063 0,0.300781 -0.05859,0.582031 -0.175782,0.84375 -0.117187,0.257812 -0.292968,0.484375 -0.523437,0.671875 -0.234375,0.1875 -0.519531,0.335937 -0.863281,0.441406 -0.34375,0.105469 -0.742188,0.15625 -1.191407,0.15625 -0.363281,0 -0.71875,-0.04297 -1.0625,-0.132812 -0.34375,-0.08984 -0.648437,-0.230469 -0.910156,-0.425782 -0.261719,-0.191406 -0.46875,-0.433593 -0.625,-0.730468 -0.15625,-0.300782 -0.226562,-0.652344 -0.222656,-1.058594 l 1.414062,0 c 0,0.222656 0.03906,0.410156 0.121094,0.5625 z"
id="path3519" />
<path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 94.46875,32.746094 2.476563,6.625 -1.511719,0 -0.5,-1.476563 -2.476563,0 -0.519531,1.476563 -1.464844,0 2.503907,-6.625 z m 0.08594,4.0625 -0.835938,-2.429688 -0.01953,0 -0.863281,2.429688 z"
id="path3521" />
<path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 59.996094,32.746094 c 0.316406,0 0.605469,0.03125 0.863281,0.08594 0.261719,0.05469 0.484375,0.144532 0.671875,0.273438 0.183594,0.125 0.328125,0.292969 0.429688,0.503906 0.101562,0.210938 0.152343,0.46875 0.152343,0.777344 0,0.335937 -0.07422,0.613281 -0.226562,0.835937 -0.152344,0.222657 -0.375,0.40625 -0.671875,0.546875 0.410156,0.117188 0.714844,0.324219 0.914062,0.617188 0.203125,0.292969 0.304688,0.648437 0.304688,1.0625 0,0.332031 -0.06641,0.621094 -0.195313,0.867187 -0.128906,0.242188 -0.304687,0.445313 -0.523437,0.597657 -0.222656,0.15625 -0.472656,0.269531 -0.753906,0.34375 -0.28125,0.07422 -0.570313,0.113281 -0.871094,0.113281 l -3.214844,0 0,-6.625 z m -0.1875,2.679687 c 0.261719,0 0.476562,-0.0625 0.644531,-0.183593 0.164063,-0.125 0.25,-0.324219 0.25,-0.601563 0,-0.15625 -0.02734,-0.28125 -0.08594,-0.378906 -0.05469,-0.101563 -0.128907,-0.175781 -0.222657,-0.234375 -0.09375,-0.05469 -0.199218,-0.09375 -0.320312,-0.113281 -0.121094,-0.02344 -0.246094,-0.03516 -0.375,-0.03516 l -1.363281,0 0,1.546875 z m 0.08594,2.808594 c 0.144532,0 0.28125,-0.01172 0.410157,-0.03906 0.128906,-0.02734 0.246093,-0.07422 0.34375,-0.140625 0.09766,-0.0625 0.179687,-0.152344 0.238281,-0.265625 0.05859,-0.109375 0.08594,-0.25 0.08594,-0.425782 0,-0.339843 -0.09375,-0.582031 -0.285156,-0.726562 -0.195312,-0.144531 -0.449219,-0.21875 -0.765625,-0.21875 l -1.585937,0 0,1.816406 z"
d="m 74.882669,32.746094 c 0.316406,0 0.605469,0.03125 0.863281,0.08594 0.261719,0.05469 0.484375,0.144532 0.671875,0.273438 0.183594,0.125 0.328125,0.292969 0.429688,0.503906 0.101562,0.210938 0.152343,0.46875 0.152343,0.777344 0,0.335937 -0.07422,0.613281 -0.226562,0.835937 -0.152344,0.222657 -0.375,0.40625 -0.671875,0.546875 0.410156,0.117188 0.714844,0.324219 0.914062,0.617188 0.203125,0.292969 0.304688,0.648437 0.304688,1.0625 0,0.332031 -0.06641,0.621094 -0.195313,0.867187 -0.128906,0.242188 -0.304687,0.445313 -0.523437,0.597657 -0.222656,0.15625 -0.472656,0.269531 -0.753906,0.34375 -0.28125,0.07422 -0.570313,0.113281 -0.871094,0.113281 h -3.214844 v -6.625 z m -0.1875,2.679687 c 0.261719,0 0.476562,-0.0625 0.644531,-0.183593 0.164063,-0.125 0.25,-0.324219 0.25,-0.601563 0,-0.15625 -0.02734,-0.28125 -0.08594,-0.378906 -0.05469,-0.101563 -0.128907,-0.175781 -0.222657,-0.234375 -0.09375,-0.05469 -0.199218,-0.09375 -0.320312,-0.113281 -0.121094,-0.02344 -0.246094,-0.03516 -0.375,-0.03516 H 73.22251 v 1.546875 z m 0.08594,2.808594 c 0.144532,0 0.28125,-0.01172 0.410157,-0.03906 0.128906,-0.02734 0.246093,-0.07422 0.34375,-0.140625 0.09766,-0.0625 0.179687,-0.152344 0.238281,-0.265625 0.05859,-0.109375 0.08594,-0.25 0.08594,-0.425782 0,-0.339843 -0.09375,-0.582031 -0.285156,-0.726562 -0.195312,-0.144531 -0.449219,-0.21875 -0.765625,-0.21875 h -1.585937 v 1.816406 z"
id="path3523" />
<path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 62.691406,32.746094 1.632813,0 1.550781,2.617187 1.539063,-2.617187 1.625,0 -2.457032,4.082031 0,2.542969 -1.460937,0 0,-2.582031 z"
d="m 77.577981,32.746094 h 1.632813 l 1.550781,2.617187 1.539063,-2.617187 h 1.625 l -2.457032,4.082031 v 2.542969 h -1.460937 v -2.582031 z"
id="path3525" />
<path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 102.40234,14.980469 c 0.004,5.84375 -4.730465,10.585937 -10.578121,10.59375 -5.84375,0.0039 -10.585938,-4.730469 -10.589844,-10.578125 0,-0.0039 0,-0.01172 0,-0.01563 -0.0039,-5.84375 4.730469,-10.585938 10.574219,-10.589844 5.847656,-0.00781 10.589846,4.730469 10.593746,10.574219 0,0.0078 0,0.01172 0,0.01563 z"
id="path3527" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 91.742188,3.386719 c -3.210938,0 -5.929688,1.121094 -8.15625,3.363281 -2.285157,2.316406 -3.425782,5.0625 -3.425782,8.230469 0,3.167969 1.140625,5.894531 3.425782,8.175781 2.28125,2.28125 5.003906,3.417969 8.15625,3.417969 3.191406,0 5.960937,-1.148438 8.300782,-3.449219 2.20703,-2.183594 3.30859,-4.898437 3.30859,-8.144531 0,-3.246094 -1.12109,-5.992188 -3.367185,-8.230469 C 97.742188,4.507813 94.992188,3.386719 91.742188,3.386719 Z m 0.02734,2.085937 c 2.632813,0 4.867188,0.925782 6.707032,2.78125 1.85938,1.835938 2.78516,4.078125 2.78516,6.726563 0,2.667969 -0.90625,4.878906 -2.726567,6.636719 -1.917968,1.894531 -4.171875,2.84375 -6.765625,2.84375 -2.589843,0 -4.828125,-0.9375 -6.703125,-2.8125 C 83.1875,19.773438 82.25,17.550781 82.25,14.980469 c 0,-2.570313 0.949219,-4.8125 2.84375,-6.726563 1.820313,-1.855468 4.046875,-2.78125 6.675781,-2.78125 z"
id="path3529" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 86.601563,13.34375 c 0.464843,-2.917969 2.515625,-4.476562 5.089843,-4.476562 3.703125,0 5.960938,2.6875 5.960938,6.269531 0,3.492187 -2.402344,6.207031 -6.019531,6.207031 -2.484375,0 -4.710938,-1.53125 -5.117188,-4.53125 l 2.921875,0 c 0.08594,1.558594 1.097656,2.105469 2.542969,2.105469 1.648437,0 2.722656,-1.53125 2.722656,-3.871094 0,-2.453125 -0.925781,-3.753906 -2.664062,-3.753906 -1.273438,0 -2.371094,0.464844 -2.601563,2.050781 l 0.847656,-0.0039 -2.296875,2.300781 L 85.6875,13.33985 Z"
id="path3531" />
<path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 74.097656,15.21875 c 0,5.929688 -4.808593,10.734375 -10.738281,10.734375 -5.929687,0 -10.738281,-4.804687 -10.738281,-10.734375 0,-5.933594 4.808594,-10.738281 10.738281,-10.738281 5.929688,0 10.738281,4.804687 10.738281,10.738281 z"
d="m 88.984231,15.21875 c 0,5.929688 -4.808593,10.734375 -10.738281,10.734375 -5.929687,0 -10.738281,-4.804687 -10.738281,-10.734375 0,-5.933594 4.808594,-10.738281 10.738281,-10.738281 5.929688,0 10.738281,4.804687 10.738281,10.738281 z"
id="path3533" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 66.46875,12.109375 c 0,-0.414062 -0.335937,-0.75 -0.75,-0.75 l -4.742187,0 c -0.414063,0 -0.75,0.335938 -0.75,0.75 l 0,4.742188 1.324218,0 0,5.617187 3.59375,0 0,-5.617187 1.324219,0 z"
d="m 81.355325,12.109375 c 0,-0.414062 -0.335937,-0.75 -0.75,-0.75 h -4.742187 c -0.414063,0 -0.75,0.335938 -0.75,0.75 v 4.742188 h 1.324218 v 5.617187 h 3.59375 v -5.617187 h 1.324219 z"
id="path3535" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 64.96875,9.113281 c 0,0.898438 -0.726562,1.621094 -1.621094,1.621094 -0.894531,0 -1.621093,-0.722656 -1.621093,-1.621094 0,-0.894531 0.726562,-1.621093 1.621093,-1.621093 0.894532,0 1.621094,0.726562 1.621094,1.621093 z"
d="m 79.855325,9.113281 c 0,0.898438 -0.726562,1.621094 -1.621094,1.621094 -0.894531,0 -1.621093,-0.722656 -1.621093,-1.621094 0,-0.894531 0.726562,-1.621093 1.621093,-1.621093 0.894532,0 1.621094,0.726562 1.621094,1.621093 z"
id="path3537" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
d="m 63.332031,3.386719 c -3.210937,0 -5.929687,1.121094 -8.15625,3.363281 C 52.890625,9.066406 51.75,11.8125 51.75,14.980469 c 0,3.167969 1.140625,5.894531 3.425781,8.175781 2.285157,2.277344 5.003907,3.417969 8.15625,3.417969 3.191407,0 5.960938,-1.148438 8.300782,-3.449219 2.207031,-2.183594 3.308593,-4.898437 3.308593,-8.144531 0,-3.246094 -1.121093,-5.992188 -3.363281,-8.230469 C 69.332031,4.507813 66.582031,3.386719 63.332031,3.386719 Z m 0.02734,2.085937 c 2.632813,0 4.867188,0.925782 6.707031,2.78125 1.859375,1.835938 2.789063,4.078125 2.789063,6.726563 0,2.667969 -0.910156,4.878906 -2.730469,6.636719 -1.917969,1.894531 -4.171875,2.839843 -6.765625,2.839843 -2.589844,0 -4.828125,-0.933593 -6.703125,-2.808593 -1.878906,-1.875 -2.816406,-4.097657 -2.816406,-6.667969 0,-2.570313 0.949219,-4.8125 2.84375,-6.726563 1.820312,-1.855468 4.046875,-2.78125 6.675781,-2.78125 z"
d="m 78.218606,3.386719 c -3.210937,0 -5.929687,1.121094 -8.15625,3.363281 -2.285156,2.316406 -3.425781,5.0625 -3.425781,8.230469 0,3.167969 1.140625,5.894531 3.425781,8.175781 2.285157,2.277344 5.003907,3.417969 8.15625,3.417969 3.191407,0 5.960938,-1.148438 8.300782,-3.449219 2.207031,-2.183594 3.308593,-4.898437 3.308593,-8.144531 C 89.827981,11.734375 88.706888,8.988281 86.4647,6.75 84.218606,4.507813 81.468606,3.386719 78.218606,3.386719 Z m 0.02734,2.085937 c 2.632813,0 4.867188,0.925782 6.707031,2.78125 1.859375,1.835938 2.789063,4.078125 2.789063,6.726563 0,2.667969 -0.910156,4.878906 -2.730469,6.636719 -1.917969,1.894531 -4.171875,2.839843 -6.765625,2.839843 -2.589844,0 -4.828125,-0.933593 -6.703125,-2.808593 -1.878906,-1.875 -2.816406,-4.097657 -2.816406,-6.667969 0,-2.570313 0.949219,-4.8125 2.84375,-6.726563 1.820312,-1.855468 4.046875,-2.78125 6.675781,-2.78125 z"
id="path3539" />
</g>
</g>

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 102 KiB

View file

@ -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)
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,12 +183,13 @@ 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,
@ -179,15 +199,27 @@ def enqueue_job(event):
jobpath=work_doc,
locationpath=intermediate_clip)
return event_id
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
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()

Binary file not shown.

View file

@ -15,3 +15,4 @@ textDocument_persons.text = "$personnames";
textProp_persons.setValue(textDocument_persons);
app.project.save();
app.quit();