[texhax] converting movie 15 documents to media9

Alexander Grahn A.Grahn at hzdr.de
Mon Mar 19 17:27:24 CET 2012


On Sun, Mar 18, 2012 at 06:15:40AM -0400, Victor Ivrii wrote:
>How to convert the string for movie15
>
>\includemovie[poster=mymovie6.jpg]{200pt}{150pt}{mymovie6.mov}
>
>
>to media9 (so the result will be the same)

First you need your video file in MP4 Format (preferably encoded with the
h.264 codec). You can use ffmpeg to convert existing video files

  ffmpeg -i Sample.mov -vcodec libx264 Sample.mp4

or one of the numerous online-services available, such as
www.mediaconverter.org (select `h264' and `aac' as codecs for video and
audio under `advanced options').

A sequence of numbered bitmaps, such as frame-0.png, frame-1.png, ... 
can be converted to a high quality video at small file size by

  ffmpeg -i frame-%d.png -vcodec libx264 myvideo.mp4

The MP4 is embedded together with a media player flash-app, such as
VPlayer.swf, which is already installed with media9.sty. If you prefer a
full-featured media player, I recommend StrobeMediaPlayback.swf. You can
get it from SourceForge.net (it's open-source):

http://sourceforge.net/projects/smp.adobe/files/Strobe%20Media%20Playback%201.6%20Release%20%28source%20and%20binaries%29/StrobeMediaPlayback_1.6.328-full.zip/download

StrobeMediaPlayback.swf resides in a subfolder of the expanded ZIP. Put it
into your working directory or any other directory. Use \addmediapath{...}
to configure the search path in the latter case.

Alexander

  \documentclass{article}
  \usepackage[english]{babel} %media9.sty needs it (language doesn't matter)
  
  \usepackage{media9}
  % in case you put your video files into a sub-folder, add it to the
  % search path:
  \addmediapath{./files} %mymovie6.mp4, StrobeMediaPlayback.swf
  
  \usepackage{graphicx}
  % the same for graphics files
  \graphicspath{{./files/}} %mymovie6.jpg
  
  \begin{document}
  \begin{enumerate}
    \item Using {\tt VPlayer.swf} (part of media9 package)\\

    \includemedia[
      activate=pageopen,
      width=200pt,height=150pt,
      addresource=mymovie6.mp4,
      flashvars={%
         source=mymovie6.mp4% same path as in addresource!
      }  
    ]{%
      \includegraphics{mymovie6.jpg}
    }{VPlayer.swf}


    \item Using {\tt StrobeMediaPlayback.swf} (get it from sourceforge.net)\\
    \includemedia[
      width=200pt,height=150pt,
      addresource=mymovie6.mp4,
      flashvars={%
         src=mymovie6.mp4% same path as in addresource!
        &autoPlay=true% immediately start playing after activation
        &scaleMode=stretch% scale width and height of video independently to fit
                          % width and height options
      }  
    ]{
      \includegraphics{mymovie6.jpg}
    }{StrobeMediaPlayback.swf}
  \end{enumerate}
  \end{document}


More information about the texhax mailing list