Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not an issue #3

Open
steview2000 opened this issue Apr 20, 2017 · 3 comments
Open

Not an issue #3

steview2000 opened this issue Apr 20, 2017 · 3 comments

Comments

@steview2000
Copy link

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
Copy link
Owner

Hi steview2000, would you mind sharing your code?

@steview2000
Copy link
Author

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:

  • inkslides.py scans for rectangles or images with the a label "Movie" and writes the corresponding slide numbers and the movie file paths into a list (saved as a file, but I agree this is idiotic)
  • then it does everything as usual until it creates the single pdf files for each slide
  • then it uses ffmpeg to create images from the first frames of each movie
  • then it writes the .tex file including the movies with the corresponding starting image and compiles it using pdflatex
  • if one opens the pdf with a standard pdf reader (okular) instead of pdfpc the movies are not shown, but at least a corresponding image shows up
  • for the movie the latest version of pdfpc works. Older version might not work.

@janoliver
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants