The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Hot answers tagged

35

As discussed in https://stackoverflow.com/questions/2428372/insert-video-clip-in-a-lyx-presentation-and-play-it-in-gnu-linux, you can use the multimedia package to embed movies (mpg, mp4) in a way that you can play them in Okular. Minimal example: \documentclass{article} \usepackage{multimedia} \begin{document} \movie[height = 0.6 \textwidth,width = 1.0 \...


27

The replacement package is available on CTAN. It is called media9 and documented on CTAN. Use the MiKTeX or TeXLive package managers for installation. A simple example embedding an SWF would be \documentclass{article} \usepackage{media9} %\usepackage[dvipdfmx]{media9} % only for latex->dvipdfmx \begin{document} \includemedia[ activate=pageopen, ...


25

A more specific and updated answer can be found in my answer to Did anyone succeed in playing embedded movies inside Acrobat in Linux? As for production of PDF, no update needed. Sadly, there is no media playback (except for 3D) in AR for linux since v. 9.4.1. It was disabled for obscure reasons. Some opensource PDF viewers on Linux support playback of ...


23

Notice of obsolescence: YouTube have dropped its Flash-based video player in Sept 2017. For the lack of HTML5 support in the PDF specification (and thus by PDF viewers), YT playback is not possible anymore in an embedded fashion. \documentclass{article} \usepackage{media9} %pdflatex, latex+dvips+ps2pdf, xelatex %\usepackage[dvipdfmx]{...


18

Update Thanks to @percusse for pointing out in his comment that the original answer was not the one the OP was asking for. So I did a little searching and found this link. Basically, the workaround is, Install Adobe Reader 9.4.1. Install flashmovie or copy it to your source folder (especially the player_flv_maxi.swf) Write \includepackage{hyperref} and \...


15

Update As of 2013/11/04, package media9 contains media player Flash components VPlayer9.swf and APlayer9.swf. They are compatible with the (somewhat outdated) Flash Player 9 plugin that is bundled with Adobe Reader for Linux 9.4.1 and can be used for producing PDF documents with embedded video (MP4/H.264) and audio (MP3) which target this particular Linux ...


15

I managed to get your example working by using: \movie[ height = 6cm, width = 6cm, showcontrols, poster ] {}{waves.wmv} Note that I did that on Arch Linux with: $ okular --version Qt: 4.8.5 KDE Development Platform: 4.12.3 Okular: 0.18.3 For more details on the multimedia package, check this answer or the official documentation.


11

\documentclass{article} \usepackage{color,graphicx} \newcommand{\whitebox}{\hfill\textcolor{white}{\rule[1mm]{1.8mm}{2.8mm}}\hfill} \newcommand{\filmbox}[1]{% \setlength{\fboxsep}{0pt}% \colorbox{black}{% \begin{minipage}{3.2cm} \rule{0mm}{4.8mm}\whitebox\whitebox\whitebox\whitebox\whitebox% \whitebox\whitebox\...


8

I was trying to do same as you and this worked to me \documentclass[unknownkeysallowed]{beamer} \mode<presentation> \usepackage{beamerthemesplit} \usepackage{multimedia} \begin{document} \begin{frame}[allowframbreaks] \centering \movie[height = 6cm,width = 6cm,showcontrols] {}{QuantumHallEffectExp.mp4} \end{frame} \end{document} And in order ...


8

This is a somewhat different approach to rendering animations or movies in Linux Latex Beamer presentations: Firstly I use Kazam to convert any animations into more compressed mp4 Secondly, I use \href{run:./directory/file.mp4}{MOVIE} in Latex/Lyx to generate the link within a pdf file. Thirdly I use mpv as a media player. Its config file in /etc/mpv/mpv....


7

I wouldn't use movie15 any longer. Once you have all your video files converted to or rebuilt as MP4, media9 should do. The example below using the powerdot class and media9 (v0.3, uploaded yesterday) worked for me. The video file was copied from $TEXMF/doc/latex/media9/files into the working directory. ps2pdf option -dNOSAFER is not required with media9. \...


7

It seems that media9 requires babel just to have available \defineshorthand, which is used in the macro \mix@uribegin, which has several lines such as \defineshorthand{"}{\detokenize{"}}% which is meant to say: if " is active, redefine it to \detokenize{"}. The same effect may be obtained by using a helper macro: \def\neutralize#1{% \begingroup\lccode`~=...


5

In media9, the command \defineshorthand, defined in babel, is used in order to correctly treat possibly active characters that may occur in URLs and path specifications passed to \includemedia. Some characters frequently encountered in URLs, such as : and ~ have a special meaning in a standard LaTeX environment or get the same, if a certain language package ...


5

In the LaTeX world, packages which are deprecated almost always remain available. It's an important concept that any 'stable' code stays around so that existing documents can be compiled. So using movie15 should not be an issue in that sense. On the specific point about the method for inclusion of multimedia content, my understanding is that Adobe have ...


5

I used to get same error but it is difficult to remember now what was the reason. There some things to check. First, I would try to compile same file with pdflatex and standard movie15 package instead of movie15_dvipdfmx. Second, I would try a different codec. My experience learned me that not every codec is suitable for embedding movie into pdf. After many ...


4

I would simply convert the WMV content to any other stuff that Adobe likes (or change my pdf reader to something else and call external viewer during presentation such as VLC portable which virtually plays everything except those ridiculous ones). Two out of gazillion possible software for multimedia conversion are Miro (which is based on ffmpeg) and ...


4

First of all, don't use movie15 anymore. Package media9 is meant to replace it. We can make use of a PDF feature called Sub-Page Navigation to bind GoTo3DView actions to the left <-- and right --> keyboard keypress events. Only after executing the complete sequence of actions, the Reader proceeds to the next/previous document page. Note that this ...


3

Jonas Granholm provided a clever solution. However, if the images are not of the same dimensions, the movie strip will be uneven (e.g.: first movie film strip, below). The "adjustbox" package (Martin Sharrer) and the code provided by Amaru / Paul Gaborit help to fix that problem (e.g.: second movie film strip below). Here is the final code: \documentclass{...


3

To complement BenC’s answer from the displaying side: I found it necessary (at least on Ubuntu 14.04) to change the backend of Phonon (which is used by Okular to play videos) to the VLC one. For me it sufficed to install the respective package (phonon-backend-vlc on Debian-based Linuxes).


3

With the media9 package and Adobe Reader you can play video files in a detached window at their natural size. You need to know the video size in pixels and pass it as an argument to the windowed option, e. g.: \usepackage{media9} ... \includemedia[ windowed=480x360, addresource=myvid.mp4, flashvars={source=myvid.mp4,autoPlay=true} ]{\strut Click!}{...


3

Package movie15 shouldn't be used anymore. The replacement, media9, is capable of doing exactly what you are after. The following example is taken from its manual. Any number of video files can be embedded using the addresource option. Videos are loaded by means of the setSource method which is bound to buttons below the video box. \documentclass{article} \...


3

It is a bug, indeed. Replace line 685 in movie15.sty \pdfstringdef\@MXV@partname{#1}% name of the part with \gdef\@MXV@partname{\pdfescapestring{#1}}% name of the part


3

This is a long shot, and admittedly not much of an answer per se, but you could try merely embedding the movies as attachments (see this question)... this way you can attach any format you'd like. True, you'd lose "in viewer" playability, but you could replace the place where the movie is supposed to show with a still (thumbnail) of it and point the reader ...


3

In order to run a media file in an external application the attachfile or attachfile2 packages could be used: \textattachfile{myvideo.mp4}{\includegraphics[width=1cm]{myi‌​con}} where myicon is the basename of an image file (file extension removed) to be shown in the link area. Note that this solution requires proper application setting of the operating ...


3

Pkg media9 should be preferred over movie15. Inserting an image file to be shown instead of the inactive 3D object is easy. Using dice.u3d from pkg media9: \documentclass{article} \usepackage{media9} \usepackage{graphicx} \begin{document} \includemedia[ 3Droo=27, 3Dtoolbar ]{\includegraphics[width=5cm]{example-image}}{dice.u3d} \end{document}


2

Unfortunately there is no platform and reader independent movie support. As you already pointed out, it is either not portable or is bound to a particular reader/configuration. That's kind of sad, since movies in presentations sometimes add a great value. And it often looks very unprofessional to change from PDF viever to movie player and back.


2

Sometimes impressive works: http://impressive.sourceforge.net/. Install it through apt-get as you need some dependencies to get it working. Be sure to have mplayer installed.


2

I don"t know why it doesn't work, but from what I could read on the net there a few time ago, the package you tring to use isn't the easier. Anyway, there's the media9 package that could help you (as suggested by AlexG). Here, a small working example of it : \documentclass[a4paper]{report} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[...


2

I'm using Linux, and this works for me: First I have to download movie15_dvipdfmx.sty and rename it to movie15.sty, and put it in the same directory as my .tex file. Then: \usepackage[dvipdfmx]{movie15} [....] \begin{figure}[ht] \centering \includemovie[inline=false,text={\includegraphics[scale=0.25]{play-movie.png}}]{}{}{movie.mp4} \end{figure} In ...


2

Alexander Grahn's animate package is a great fallback option that works beautifully when converting videos to sequences of images.


Only top voted, non community-wiki answers of a minimum length are eligible