summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/media9/media9.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/media9/media9.tex')
-rw-r--r--Master/texmf-dist/doc/latex/media9/media9.tex63
1 files changed, 57 insertions, 6 deletions
diff --git a/Master/texmf-dist/doc/latex/media9/media9.tex b/Master/texmf-dist/doc/latex/media9/media9.tex
index 06a95592adf..c4e999d836f 100644
--- a/Master/texmf-dist/doc/latex/media9/media9.tex
+++ b/Master/texmf-dist/doc/latex/media9/media9.tex
@@ -92,21 +92,21 @@ This package provides an interface to embed, in the first place, interactive Fla
Among the supported media types, video and sound files require an additional Flash (SWF) application for playback, which must be either embedded into the PDF or loaded at runtime from the internet. There are numerous such players, both open-source and commercial, available on the internet. One of them is the highly configurable open-source `StrobeMediaPlayback.swf'~\cite{strobe}, maintained by Adobe and hosted on \href{http://sourceforge.net/projects/osmf.adobe/files/}{SourceForge.net}. Package `media9' comes with an enhanced version of `StrobeMediaPlayback.swf'. In addition, two simple players for video and audio, `VPlayer.swf' and `APlayer.swf' are included, which can be used instead. They provide sufficient functionality for playing embedded files and streamed media.
-Flash Player supports the efficient H.264 codec for video compression. MP4/H.264 video files can be encoded from existing video files and from numbered bitmap sequences using the \verb+ffmpeg+ command line tool (\url{http://ffmpeg.org}). In order to allow for precise seeking within video files it is necessary to encode them with a sufficient number of key frames. The command line for recoding an existing video file \verb+video.avi+ into \verb+video.mp4+ reads
+Flash Player supports the efficient H.264 codec for video compression. MP4/H.264 video files can be encoded from existing video files and from numbered bitmap sequences using the \verb+ffmpeg+ (\url{http://ffmpeg.org}) or \verb+avconv+ (\url{http://libav.org}) command line tools (Libav is a fork from the FFmpeg code). In order to allow for precise seeking within video files it is necessary to encode them with a sufficient number of key frames. The command line for recoding an existing video file \verb+video.avi+ into \verb+video.mp4+ reads (\verb+ffmpeg+ can be substituted with \verb+avconv+)
\begin{Verbatim}
- ffmpeg -i video.avi -vcodec libx264 -x264opts keyint=30 -r 30 video.mp4
+ ffmpeg -i video.avi -c:v libx264 -g 30 -r 30 video.mp4
\end{Verbatim}
From a sequence \verb+frame-0.png+, \verb+frame-1.png+, ... of bitmap files, an MP4 video is produced by
\begin{Verbatim}
- ffmpeg -i frame-%d.png -vcodec libx264 -x264opts keyint=30 -r 30 video.mp4
+ ffmpeg -i frame-%d.png -c:v libx264 -g 30 -r 30 video.mp4
\end{Verbatim}
-Both examples insert a key frame at every second since the frame rate is set to 30 fps.
+Both examples insert a key frame (option `\verb+-g+') at every second since the frame rate is set to 30 fps.
\emph{Note:} `media9' package replaces the now obsolete `movie15' package. `media9' is based on the RichMedia Annotation (Annotations are the interactive elements in a document, in PDF specification parlance.), an Adobe addition to the PDF specification~\cite{supplement}, while `movie15' uses the old multimedia framework (`Screen Annotation') of pre-9 Readers which depends on third-party plug-ins and which does not support recent media file formats.
Package `media9' supports the usual PDF making workflows, i.\,e. pdf\LaTeX{}, Lua\LaTeX, \LaTeX{} $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+/Distiller and \pXepLaTeX{} $\rightarrow$ \verb+(x)dvipdfmx+.
-The final PDF can be viewed in current Adobe Readers on MS Windows and other platforms. On Unix platforms including Linux, however, support of Flash, video and sound was discontinued at Reader version 9.4.2, probably for security reasons. On tablets and phones running Android or iOS, ezPDF Reader was reported to play video and sound files embedded with `media9'.
+The final PDF can be viewed in current Adobe Readers on MS Windows and other platforms. On Unix platforms including Linux, however, support of Flash, video and sound was discontinued at Reader version 9.4.2, probably for security reasons. PDF documents which target \href{ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.4.1/}{Adobe Reader 9.4.1 for Linux} should use `VPlayer9.swf' and `APlayer9.swf' (also included in the `media9' package). These media player components are compatible with the older Flash Player 9 plugin that is bundled with the Reader for Linux. On tablets and phones running Android or iOS, ezPDF Reader was reported to play video and sound files embedded with `media9'.
\section{Requirements}
\begin{trivlist}
@@ -117,7 +117,7 @@ The final PDF can be viewed in current Adobe Readers on MS Windows and other pla
\item pdf\TeX{}, version $\ge1.30$
\item Ghostscript, version $\ge8.31$ or Adobe Distiller for PS to PDF conversion
\item dvipdfmx, version $\ge 20120420$ for DVI to PDF conversion
-\item Adobe Reader, version $\ge9$
+\item Adobe Reader, version $\ge9$, but not greater than 9.4.1 on Linux
\end{trivlist}
\section{Installation}
@@ -766,6 +766,57 @@ http://mirrors.ibiblio.org/pub/mirrors/CTAN/macros/latex/contrib/media9/players/
\caption{Example of (a) embedded sound file, (b) streamed audio and (c) progressively downloaded MP3. ID3 tags `title', `artist' and `album' are displayed if contained in the MP3 stream or file. In (b), the sound player, APlayer.swf, is loaded from a CTAN mirror upon activation.}\label{radio}
\end{figure}
+\begin{figure}[bp]
+\centering
+\begin{Verbatim}
+\includemedia[
+ width=0.4\linewidth,height=0.3\linewidth,
+ activate=pageopen,
+ addresource=cube.mp4,
+ transparent,
+ flashvars={
+ source=cube.mp4
+ &loop=true
+ &scaleMode=letterbox
+ }
+]{}{VPlayer9.swf}
+\end{Verbatim}
+\vspace{1ex}
+\hfill\includemedia[
+ width=0.6\linewidth,height=0.45\linewidth,
+ activate=pageopen,
+ addresource=cube.mp4,
+ transparent,
+ flashvars={
+ source=cube.mp4
+ &loop=true
+ &scaleMode=letterbox
+ }
+]{}{VPlayer9.swf}\hfill
+\vspace{1ex}
+\begin{Verbatim}
+ \includemedia[
+ addresource=bird.mp3,
+ flashvars={
+ source=bird.mp3
+ &autoPlay=true
+ },
+ transparent
+ ]{\color{blue}\framebox[0.4\linewidth][c]{Singing bird}}{APlayer9.swf}
+\end{Verbatim}
+\vspace{1ex}
+\hfill\includemedia[
+ addresource=bird.mp3,
+ flashvars={
+ source=bird.mp3
+ &autoPlay=true
+ },
+ transparent
+]{\color{blue}\framebox[0.5\linewidth][c]{Singing bird}}{APlayer9.swf}\hfill
+\vspace{2ex}
+\caption{Video and sound examples that should run in Adobe Reader for Linux up to version \href{ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.4.1/}{9.4.1}. Here, players `VPlayer9.swf' and `APlayer9.swf' are used. Both are compatible with Adobe Flash Player 9 plugin that is bundled with the Reader.}\label{ar941ex}
+\end{figure}
+
\clearpage
\section[Embedding 3D objects (with examples)]{Embedding 3D objects}
\subsection{Introduction}\label{sec:3Dintro}