Adding youtube videos in pdfs, html reports and html presentations
I got a question today on how to add a video to a beamer pdf presentation. Well, I had never done it, but I got curious enough to google around for a bit and here is the end product.
One way of doing it is using the media9 tex package. For this to work you need to have the latest version of texlive (or miktex). Then, it’s quite straight forward to include the video. The issue is that you have to open the pdf with Acrobat Reader 10+ (9 something works. I think that it’s 9.4.1+ but well, the point is that you need an updated version). You will also need a live web connection to actually show the video. An alternative (if you have the video file) is to convert it to swf and embed it.
Finally, the more interesting thing you can do is an html presentation which requires pandoc. Again, I used knitr to get things started and, while at it, add some R and math.
Hopefully they’ll be useful to anyone venturing into embedding youtube videos in their presentations.
* These two files are very similar.
** html presentation.