6

the code seems to be correct, with compilation no error appears. The code is

\documentclass{beamer}
\usetheme{Singapore}
\usepackage{media9}
\usepackage{hyperref}

\begin{frame}\frametitle{Title}

\includemedia[
width=\paperwidth,height=0.7\linewidth,
activate=pageopen,
flashvars={movie.mp4 &autoPlay=true}
]{}{movie.mp4}

\end{frame}

\end{document}

He won't play the video and with no error I don't know what to do. Please anyone has an idea? I use adobe reader 9.4.2.

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
timon
  • 61

2 Answers2

5

The code is not correct. Playback of a video file (movie.mp4) needs a Flash-based media player to be included as the last argument of \includemedia. The video file itself must be embedded as a resource file and be made known to the media player by means of a media player specific Flash variable.

Adobe Reader on Linux has support for Flash and media playback up to version 9.4.1. It was dropped thereafter. The built-in Flash player of AR-9.4.1 supports Flash content up to Flash version 9. However, the media players shipping with media9 require Flash Player 10.

player_flv_maxi.swf is Flash Player 9 compatible and can be used with media9 and AR-9.4.1 on Linux. Its FlashVars for configuration are documented here. The most important FlashVar is the one for setting the video source. Here it is called flv=....

AR-9.4.1 for Linux can be downloaded from Adobes FTP server.

Here is your adapted code example that should work:

\documentclass{beamer}
\usetheme{Singapore}
\usepackage{media9}

\begin{document}
\begin{frame}{Title}

\includemedia[
  width=\paperwidth,
  height=0.7\linewidth,
  activate=pageopen,
  addresource=movie.mp4,
  flashvars={flv=movie.mp4&autoplay=1}
]{}{player_flv_maxi.swf}

\end{frame}
\end{document}
AlexG
  • 54,894
  • Unfortunately, your adapted code does not work either. It still leads to the same 3D parsing error. I run xubuntu 12.04, fully patched, with pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian), and the latest version of beamer. Something must be fundamentally wrong here... –  Sep 16 '12 at 22:50
  • 1
    @bothide: What is wrong, is the Reader version you are using. Read my answer carefully. – AlexG Sep 17 '12 at 06:58
  • @AlexG I am told that I need expl3.sty to run this program. (I also needed media9.sty, but I found it online). Do I need anything else? How do I get the expl3.sty? – J G Nov 12 '12 at 01:30
  • @JG: I suggest you install TeXLive-2012. It provides everything you need. – AlexG Nov 12 '12 at 08:52
2

Answer 1 gets me a bit further on with this problem but there are a few more wrinkles to get ironed out.

I am on Ubuntu 12.04 LTS and have updated texlive to 2012.20120611-3~ubuntu12.04.1 .

The CTAN media9.pdf specifies Adobe Reader, version greater or equal to 9 so I was happy to be on version 9.5 . Having removed 9.5 and downloaded 9.4.1 and run the corrected version of the code provided above by Alex I have a satisfactorily compiled tex document that produces a pdf beamer slide.

The video pane in the slide is blank with a "Buffering 0%" message and a very nice looking slider at the bottom of the pane. This is all to do with not having the H264 codec installed to do your .avi -> .mp4 encoding. Have a look in Synaptic package manager for h264enc and install it. I used Transmaggedon as a gui front end and specified Output format: MPEG4 and for Choose video codec: H264. Alternatively if you want loads of options run h264enc from the terminal as it is a shell script.

This gives an .mp4 file that plays in the video pane of Alex's example code.

In summary: 1. latest texlive installation 2. Adobe Reader 9.4.1 3. install h264enc

  • 3
    This looks more like a comment to AlexG's answer than an answer. It might be converted to a comment. It would be great if you would extend this to a solution, once that you found it. – Stefan Kottwitz Nov 01 '12 at 13:20