Giter VIP home page Giter VIP logo

intro-outro-generator's Issues

Incompatible with macOS

Unter Mac OS X wird das Inkscape Binary direkt sondern mit einem wrapper Skript aufgerufen. Mehr zu dem Thema steht unter http://wiki.inkscape.org/wiki/index.php/MacOS_X#Inkscape_command_line
Dieser Wrapper erzeugt zusätzliche Ausgaben, die unser Skript als Fehler wertet. Allein den Exit-Code auszuwerten reicht nicht aus "weil inkscape manchmal fehler ausgibt und dann trotzdem mit 0 exited” (Ende Zitat Mazermind).

Am stressfreisten ist eine Linux VM, wenn man es umbedingt unter OS X laufen lassen möchte kann man dieses Inkscape-Wrapper-Skript so anpassen das es keine Ausgabe erzeugt. Unter https://gist.github.com/saerdnaer/18258a2667add2c5b4a6 gibt es eine fertige Version ansonsten kann man /Applications/Inkscape.app/Contents/Resources/bin/inkscape manuell bearbeiten und vor jeder Zeile die mit einem echo anfängt ein # einfügen. Man beachte auch das else in Zeile 124.

Bei installiertem Inkscape und modifizierter /Applications/Inkscape.app/Contents/Resources/bin/inkscape:

brew install libxml2 ffmpeg
pip3 install lxml
pip3 install cssutils
git clone https://github.com/voc/intro-outro-generator.git
cd intro-outro-generator
export PATH=/Applications/Inkscape.app/Contents/Resources/bin/:$PATH
python3 make.py eh15/ --debug

Optimisation: Pipe input svg directly into inkscape instead using temporary file

# open the output-file (named ".gen.svg" in the workdir)
with open(os.path.join(task.workdir, '.gen.svg'), 'w') as fp:
# write the generated svg-text into the output-file
fp.write( etree.tostring(svg, encoding='unicode') )
if task.outfile.endswith('.ts'):
width = 1920
height = 1080
else:
width = 1024
height = 576
# invoke inkscape to convert the generated svg-file into a png inside the .frames-directory
cmd = 'cd {0} && inkscape --export-background=white --export-width={2} --export-height={3} --export-png=$(pwd)/.frames/{1:04d}.png $(pwd)/.gen.svg 2>&1 >/dev/null'.format(task.workdir, frameNr, width, height)

setting cwd for inkscape subprocess uses wrong directory

While trying to do the work on #39 I tried to use the default inkscape-based compilation of the videos.
Unfortunately the subprocess call in renderlib.py sets cwd to task.workdir:

errorReturn = subprocess.check_output(cmd, shell=True, universal_newlines=True, stderr=subprocess.STDOUT, cwd=task.workdir)

This leads to inkscape not being able to open the generated SVG files, because the path is concatenated to something like /absolute/path/to/<project_dir>/artwork/<project_dir>/artwork/.frames/.
Moreover, this does not lead to make.py (or rather renderlib.py) exiting with a non-zero exit code. The script tries to render all frames, but ultimately fails to finish any of them and is therefore also unable to render the video (the process should exit early).

For me it worked to just remove the cwd setting.

add further (upstream) documentation for inkscape's transform attribute setting

IMHO it would be a good idea to provide further information to users in regards to inkscape's transform attribute settings (and especially its quirks) for SVG objects.
This setting is relevant for the XML attribute modifications type of transformation for objects.

Rationale:
When an SVG file has a group that is supposed to be used for a transformation and this group has its transform attribute set already, this can lead to very unexpected results: e.g. a matrix() transform can be stuck on a group, due to one of its child objects requiring it. When using a translate() function on such a group, its matrix() function will be reset and afterwards the translate() function will be called. As the matrix() function was in reality only applied to one of the child objects, it will be resize/move the group to very unexpected dimensions/locations and then apply the additional transform.

I think it could be worthwhile mentioning this, as I'm fairly sure that users might spend quite some time on figuring this out on their own (I just did). A note could be made reasonably short and e.g. have a link to some stackoverflow issue (such as this one).

Idea: add cli parameter to increase verbosity level

e.g. ./make.py subscibe9 --debug -v or even ./make.py subscibe9 --debug -vvv to print output from inkscape to stdout. Is there a default pattern for python to achieve this or do I have to use global variables and multiple options to ArgumentParser?

add support for multiple licensenses in one projekt

it should be possible to render outros with different licensens for each cc license type used in the schedule.

it could be done by label the logo areas in the svg and replace the image before rendering the outro.
There for we also need a new naming for the outro file. There are to option:

a) render one outro per license e.g. cc-by-sa-outro.ts
b) render one outro per event e.g. 2342-outro.ts

If do a) the tracker / encoding worker needs to take care to map a license to a talk
if we do b) we render more files but would also have the option to change more things in the outro like adding the talk title and speaker name again

We have a ticket in the vcfb schedule thats would need this feature.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.