2012-04-17 transition from movie15.sty to media9.sty

  • recently, a message popped-up :
    Package movie15 Warning: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    (movie15)                @@ Package `movie15' is obsolete and @@
    (movie15)                @@ superseded by `media9'.           @@
    (movie15)                @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.
  • a first read to the manual (texdoc media9), seemed to be a regression, as it could do more complicated stuff (reading youtube files from within a PDF) but not the simple stuff you really use (I will never read a youtube files from within a PDF ...). In addition, the movie15 package was removed from texlive, so you have to make the transition (this was easily fixed by downloading a copy of movie15.sty)
  • to make the change, you have to change the lines which are like:
  • by something like:
    source=./figures/aperture_aperture.mp4 % same path as in addresource!
    &loop=true % loop video
  • an interesting perspective is to use 3D objects generated by asymptote:
    add3Djscript=asylabels.js, %upright text labels
    add3Djscript=3Dspintool.js, %let scene rotate about z-axis
    % 3Dcoo, 3Droo values found with ‘Generate Default View’ from
    % context menu
    3Dcoo=-21.371112823486328 -19.702425003051758 -395.4008483886719,
    3Dc2c=4 2 3
  • one solution for a smooth transition is my case where I need to just show a movie and nothing too fancy, one can create a command in the preamble like:
    source=#3 % same path as in addresource!
    &loop=true % loop video
  • and then use something like:
  • note that (from http://tex.stackexchange.com/questions/45242/animations-with-movie15-and-swf-files ) :
    Video files must be in the MP4 format. Videos in other formats must be converted to MP4 or recreated from the raw material. The H.246 codec gives high quality video at stunningly small file size. With ffmpeg, video files can be created easily.
    From an existing video file, such as Sample.avi:
    ffmpeg -i Sample.avi -vcodec libx264 Sample.mp4
    From a numbered sequence of bitmaps, such as frame-0.png, frame-1.png, ... :
    ffmpeg -i frame-%d.png -vcodec libx264 myvideo.mp4


Comments powered by Disqus