janoliver / inkslides

A rewrite of the inkscapeslide script to create PDF presentations out of inkscape SVG files.
MIT License
26 stars 7 forks source link

Not an issue #3

Open steview2000 opened 7 years ago

steview2000 commented 7 years ago

In case someone wants to show movies during its presentation. Here is how I do it:

I edited an older version of inkslides, so that it uses latex beamer to create the final pdf file. In this way, I can show movies embedded in a slide with pdfpc (https://github.com/pdfpc)

For this I create a rectangular or import an image in inkscape. I give it an object label "Movie" and the object title "path/of/the/movie".

inkslides creates the single pdf files out of the inkscape-layers (as usual). It then creates a beamer-latex file where each pdf-slide is included as a background image. Slides without a movie have no other content. Slides with a movie have a \textblock and an \inlineMovie statement with the correct position of the movie. The video capabilities of pdfpc are quite good (in comparison to okular). So far it could deal with most of my videos (.avi, .mp4, .webm compressed with vp8 or vp9 codec).

janoliver commented 7 years ago

Hi steview2000, would you mind sharing your code?

steview2000 commented 7 years ago

Here it is: inkslide-beamer.tar.gz

That is the folder that contains the inkslides.py, an example svg file, its compiled .tex file, the final .pdf, and the necessary images and movies. Note that the inkslides.py is based on an older version of yours. I also preferred to have the content not in a layer, but in a separate file (content.txt).

For this to work, latex and the beamer package needs to be installed. The final .tex file loads pdfpc-commands.sty that I got from pdfpc project. In addition ffmpeg needs to be installed.

My programming skills are mediocre, so I believe one can implement these things much better, and there are still problems sometimes with the correct placement of the movies. However, the way it works is the following:

janoliver commented 7 years ago

Thank you! When I can find the time, I'll have a look at it.