1

I know that it is possible to include video to a LaTeX document using the media9 package. The downside is of course that not all viewers support this feature.

I am going to do the opposite: I created a presentation using the beamer class and I want to be able to present this using a SmartTV. Since the TV doesn't handle PDF, I need to convert the PDF to a video file.

There are different tools available for this task but I was wondering if

  • it is possible to produce a video file from LaTeX directly (nothing fancy, just change the slide after a fixed amount of time)
  • such an approach could handle video embedded to the presentation (skipping to the next slide after the video has finished)
  • there is another solution to achieve this besides splitting the presentation where videos should be embedded, compile the parts to PDF, convert the PDF files to video files and paste those videos with the ones that should have been embedded

I am open to all suggestions but ideally I want to be able to automate this process using some kind of Makefile or the like. So command line solutions are preferred over GUI and/or web solutions.

  • You can convert the PDF file to a series of hi-res pictures and play it via the slide show. It should provide better control over the slide transitions since rwd/ffwd is not a good way of going to a slide in my opinion. – percusse Sep 13 '13 at 8:33
  • @percusse: Thx for the idea. In general I would agree but a) a fixed time per slide would be fine, b) there is no need for manual rwd/ffwd in this case and c) the TV has different modes for pictures and movies, so "embedding" movies in the presentation would mean jumping back and forth using the remote. That is why I want to have a video. The presentation is meant to run on its own in a loop. I should have stated that in the first place. – mschilli Sep 13 '13 at 8:54
  • Use a screen-cast software which records the AdobeReader window into a video file while you are skimming through the beamer-class presentation (with embedded videos). – AlexG Sep 13 '13 at 10:30
3

Your best bet would be to convert the pdf to a series of images probably using imagemagick's convert routine, then use ffmpeg to assemble them into a video. Both tools are free and cross-platform.

Stack Overflow has more detail - you could basically run the contents of the 2 php exec commands in the answer from the command line.

Edit: I think it would be necessary to use a script to figure out where to insert the video - either:

  • In my limited use of Beamer (simple static slides) I would be able to count the \begin{frame}s to count the slides, then look out for the command that includes the video. You could then use this to drive ffmpeg.

  • It also looks possible to parse the .nav file - this may be simpler, but I can't get media9 working here at the moment, so don't know whether it inserts anything into the .nav or the .aux.

The common point is that ffpmeg can do the heavy lifting by combining images and (dissimilar) video files.

However, if this was a one-off, without too many videos, I would be inclined to split the PDF, and use ffmpeg to combine PDF1, video1, PDF2, video2 etc. by hand, despite my inclination to script as much as possible.

  • Thx for your help. But as I said, I know plenty of ways to get from PDF to some video format but was wondering if there was a more direct way to do that, especially in the combination with embedded videos. – mschilli Sep 13 '13 at 9:27
1

This is perhaps a bit of a "hacky" solution, but you could try using a screen recording application as you manually play back the PDF (at full screen) at your desired speed and timings. Quicktime X on Mac OS X is excellent, and there is a Linux program simplescreenrecorder which looks to do much the same thing.

Don't forget to set your screen resolution to the resolution of the Smart TV, if you can (presumably 1920x1080), to maximize quality. YMMV though, if you have an older machine it may struggle to record embedded video at that resolution.

  • If there are embedded videos in the PDF, Win and Mac are the only options for recording an AdobeReader session. – AlexG Sep 13 '13 at 12:37
  • @AlexG: Unfortunately I am looking for a linux solution that can handle embedded videos. Is AdobeReader under wine an option? – mschilli Sep 16 '13 at 14:48
  • @sg-lecram Never tried AdobeReader under Wine. Does it work? Moreover, newer AR versions require a separate FlashPlayer installation (firefox plugin, not IE). If it works under Wine too, it could indeed be an option. – AlexG Sep 16 '13 at 19:47
  • @AlexG: I was able to install AdobeReader 11.0 as well as the required FlashPlayer under wine. I am able to view PDF files with embedded videos. Can you point me on how to record a session and maybe even how to automatically change the slides after a fixed amount of time? – mschilli Sep 17 '13 at 10:58
  • @sg-lecram: For auto slide change, see tex.stackexchange.com/a/42762, for recording an application Window see meta.tex.stackexchange.com/a/2869 – AlexG Sep 17 '13 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.