16

I'm embedding multimedia videos in my beamer document using multimedia package with the following code.

\movie[height = 0.6\textwidth, width = 0.8\textwidth, poster, showcontrols] {}{Video.mp4}

It works fine except it adds black background on right-left or/and top-bottom for some videos. I wonder how to remove this background and also how to expand the videos for full frame in size. Any help will be highly appreciated. Thanks

Edited

Minimum Working Example with attached video.

\documentclass[]{beamer}
\usetheme{Warsaw}
\usepackage[]{graphicx}
\usepackage[]{color}
\usepackage{geometry}

\usepackage{multimedia}

\begin{document}

\begin{frame}{Umpire Decision Review System}

\begin{block}{Umpire Decision Review System}

\begin{center}
\movie[height = 0.6\textwidth, width = 0.8\textwidth, poster, showcontrols] {}{DRS2.mp4}
\end{center} 

\end{block}

\end{frame}

\end{document}

enter image description here

Edited 2

Video has been uploaded.

Link to Video

MYaseen208
  • 8,587
  • 2
    Would you like to provide a MWE? (after cut down the video to 3 sec or so.) By the way, your title said full frame but the code said height=.6\textwidth. Is not it contradictable? – Symbol 1 Aug 17 '15 at 03:20
  • Please post video somewhere and provide the link if possible. –  Sep 28 '15 at 08:44
  • Could not figure out where to post the video @HarishKumar. Would appreciate if you tell me any website for this or can I attach you video in an email. Thanks – MYaseen208 Sep 28 '15 at 08:49
  • You can put it in dropbox or google drive. –  Sep 28 '15 at 08:50
  • Can't you just make sure to set the aspect ratio of the \movie to the same as the video file? I mean, the width:height ratio is 4:3 for the \movie, but the video file is clearly 16:9 or thereabouts (judging by the screenshot). – Torbjørn T. Sep 28 '15 at 08:55
  • I agree with @TorbjørnT. You appear to have specified a size, whose ratios are different than the aspect ratio of the video. Can you perhaps only specify the width and let it determine the height based on the video? – Travis Bemrose Sep 30 '15 at 01:07
  • Can you provide the mp4 file? – Peter Ebelsberger Sep 30 '15 at 20:12
  • Any news here on the video? Did you try using Google Drive to upload it? – Gonzalo Medina Oct 02 '15 at 22:46
  • Video has been uploaded @HarishKumar, gonzalomedina. – MYaseen208 Oct 03 '15 at 08:16
  • @GonzaloMedina: Video has been uploaded. Thanks – MYaseen208 Oct 03 '15 at 08:40

1 Answers1

16

This code extends the video to full pagewidth, full pageheight or both, depending on the video aspect ratio (and that of the presentation PDF):

\documentclass[10pt]{beamer}
\usetheme{Warsaw}
\usepackage{media9}
\usepackage{tikz}

\begin{document}
   \begin{frame}[plain]
      \begin{tikzpicture}[remember picture,overlay]
         \node[anchor=south west, inner sep=0pt] at (current page.south west) {%
           \includemedia[
             addresource=DRS2.mp4,
             activate=pageopen,transparent,
             flashvars={source=DRS2.mp4},
             width=\paperwidth,height=\paperheight
           ]{}{VPlayer.swf}%
         };
      \end{tikzpicture}
   \end{frame}
\end{document}

Or using the multimedia package. (Note that MP4 video format may not work in A-Reader with this media inclusion method. AVI+MS Video 1 codec seems to be the right format to be chosen here.):

\documentclass[10pt]{beamer}
\usetheme{Warsaw}
\usepackage{multimedia}
\usepackage{tikz}

\begin{document}
   \begin{frame}[plain]
      \begin{tikzpicture}[remember picture,overlay]
         \node[anchor=south west, inner sep=0pt] at (current page.south west) {%
           \movie[height = \paperheight, width = \paperwidth, poster, showcontrols] {}{DRS2.mp4}%
         };
      \end{tikzpicture}
   \end{frame}
\end{document}
AlexG
  • 54,894
  • Thanks @AlexG for your answer. I'm not getting video output. It is simply blank. Any thoughts. – MYaseen208 Oct 03 '15 at 13:45
  • @MYaseen208 It should work in Adobe Reader on Windows and OSX, and in Foxit (also Windows). Could you try another video file such as random.mp4 from the media9 package? Perhaps your video has the wrong codec (h264 is required)? – AlexG Oct 03 '15 at 14:37
  • 2
    The screenshot looks like Okular being the PDF viewer. So try the second code box. – AlexG Oct 05 '15 at 12:29
  • Do all video controls (play, stop, etc) work in such an example? I am trying to reproduce your proposals here http://tex.stackexchange.com/q/304681/13173 – Léo Léopold Hertz 준영 Apr 16 '16 at 20:29
  • @AlexG, I'm getting the same result as @MYaseen208 did - audio but no video. FYI, this happens when using your multimedia package-related code. My video plays fine if I substitute your "inside the frame" code with this single line: \movie[width=10.4cm,height=7.8cm,autostart]{}{test_movie.avi}. Oddly enough, your code was working for a few tries, then quit working... – Digger May 02 '17 at 22:00
  • @AlexG, after some more fooling around, I've been able to determine that your said multimedia related code works. The problem was that I was using the "latex -> dvips -> ps2pdf" compiling workaround in order to get autostart to work (known bug for my version of beamer (Debian Squeeze)). In order to have success with your code, I first need to compile using "pdflatex", followed by said "latex..." scheme. – Digger May 03 '17 at 05:31