7

I have written the following document

\documentclass[aspectratio=1610]{beamer}

\usetheme[hideallsubsections]{Berkeley}
\useinnertheme{rounded}
\usepackage{multimedia}
\title[]{{\scshape Infodag wiskunde}}
\date{{\scshape 16 maart 2013}}

\begin{document}

\begin{frame}
\titlepage
\end{frame}

\begin{frame}\label{chaosfrag1}\frametitle{{\scshape Chaos 1 - }}
\begin{center}
\movie[showcontrols]{\includegraphics[width=0.8\textwidth]{chaos1.png}}{chaos1.mpg}
\end{center}
\end{frame}

\end{document}

For some reason however, neither Adobe Reader nor Foxit PDF Reader are able to display the movie on click. I figured the issue was probably with the pdf readers, but last year I made a similar document, and though I no longer have the TeXcode, I still have the pdf, and this does work. (the embedded media there is also .mpg). I already tried different media types (.avi, .mp4, .flv) but none of them work.

I know about the media9 package, however, as my final document will contain about 18 movies of each 10 minutes, the resulting pdf would be 2GB. Whenever I open it, it takes at least 10 seconds to start playing the media, and even then, it doesn't work (I just get a gray rectangle).

EDIT: Okay, appearantly i was using a wrong code for media9, so now I can play the video (though the filesize still is huge). But still, it would be nice to see if I made a mistake somewhere in the \movie command or something...

I hope someone can help :)

12
  • 1
    You may try to run a lightweight web server, such as nginx, on your presentation laptop. This allows you to play video files from the local hard disc instead of embedded ones using the media9 package. Loading is much faster then, because files don't need be extracted and decompressed. Read on here.
    – AlexG
    Mar 12, 2013 at 12:30
  • I personally never use embedded video in my beamer presentation: I use always external viewers (VLC) to play the movies. The advantages are that the PDF is smaller and I am not limited by the codecs. The main inconvenient is that you have to keep to all the files at the right place... Mar 12, 2013 at 12:36
  • @AlexG : I'm not sure I get what you mean. I was currently using \includemedia[ addresource=chaos1.mp4, flashvars={ source=chaos1.mp4 &autoPlay=true &scaleMode=letterbox } ]{\includegraphics[width=0.8\textwidth]{chaos1.png}}{VPlayer.swf} But this still embeds into the pdf (pdf size is still huge).
    – janker
    Mar 12, 2013 at 12:55
  • 1
    Option addresource=... embeds the video file, and FlashVar source=... lets VPlayer.swf know what to play. What you want is source=http://localhost/chaos1.mp4 without addresource (no embedding). For this to work you will have to run a web server, as explained in the topic linked in my first comment.
    – AlexG
    Mar 12, 2013 at 13:12
  • Alternatively, you may upload the video file to a file sharing service, such as dropbox, and set source to the remote URL of the video file. Playback will start while a large video file is still being downloaded.
    – AlexG
    Mar 12, 2013 at 14:51

1 Answer 1

9

With multimedia, only videos in the AVI format, encoded using one of the standard codecs available on Windows (MS Video 1, Full Frames (Uncompressed)) will successfully play on Windows. MPEG does definitely not work.

\movie{\includegraphics[width=0.8\textwidth]{chaos1.png}}{chaos1.avi}

I successfully produced an AVI from a BMP sequence using pjBmp2Avi.exe and selecting 'MS Video 1'.

8
  • I will probably have used a wrong codec, but still, will probably use your nginx solution! Thanks :)
    – janker
    Mar 14, 2013 at 17:46
  • This answer really helped steer me in the right direction when I was having a problem with this issue..thank you! Some things to add: Using Windows 7 with Adobe Acrobat Reader DC. I could get videos in the AVI container to work. The only audio codec I had success with was "pcm_u8" (PCM unsigned 8-bit). For the video codec, success came after I downloaded the "ffdshow" codec package (from SourceForge) to the Windows machine and activated just ffdshow's "Other MPEG4" format (which included the needed "FMP4" codec (FYI, ffmpeg calls this "mpeg4 (Simple Profile))". Running out of room...
    – Digger
    Jan 21, 2016 at 21:14
  • (continuation from the above comment) FYI, videos that were "cropped" at the beginning did not work until I placed the -ss option in front of the input file specification (FWIW, this was when using Beamer's Multimedia package's "poster" option).
    – Digger
    Jan 21, 2016 at 21:19
  • I can say that the "rawvideo" ffmpeg video codec works, but, of course, the resultant video files are huge when using this. Will report later if the cinepak codec works.
    – Digger
    Jan 23, 2016 at 23:42
  • Why don't you use package media9 and embed H.264 video?
    – AlexG
    Jan 24, 2016 at 19:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .