I just read the documentation for media9 but was not able to identify what I am doing wrong. The videos in the documentation all play fine in my installation of Adobe Acrobat Pro. When I compile the example below, the slide has a box for the video that says "(click to play)" but when I click, all I see is white.




  \includemedia[width=0.6\textwidth,height=0.45\textwidth]{(click to play)}{4x167_h5_k010.mpg}


Here is a link to the mpg file I am including. I am actually not sure the aspect ratio of the video. In addition to even showing up and playing, I am also interested to know the following

  1. Do I have to specify both the width and height? I would rather specify the width and that it maintain the same aspect ratio.
  2. How do I get it to loop (I saw info in the documentation about this, just wanted to get it the play first)?

(I also tried the movie15 package and that gives a box that is all black)

  • 1
    Video file must be in MP4/H.264 format. MPEG is not supported. Then copy-paste the example in tex.stackexchange.com/a/102600 and replace the video file with yours. Yes, you should know the video's aspect ratio beforehand; TeX cannot determine it as it doesn't know anything about video formats. Alternatively, you can \includegraphics{...} a still image with appropriate aspect ratio instead of (click to play). Then zero or one of width= or height= is required if further scaling is needed.
    – AlexG
    Commented Nov 12, 2015 at 7:37
  • @AlexG, I will look into this. It is surprising that deprecated package, movie15, supports MPEG but the replacement package, media9, does not. Hopefully this is the primary problem in my implementation. Commented Nov 12, 2015 at 13:18
  • H.264 is much better than MPEG. Surprisingly small files at superior quality.
    – AlexG
    Commented Nov 12, 2015 at 13:21
  • @AlexG, I am sure it is better. I do not think that warrants removing functionality, limiting the possible uses. I expect this could be related to changes in Adobe, the plugins, or with the goal that videos are viewable in more readers than just Adobe. Commented Nov 12, 2015 at 14:02
  • That is the case. The method implemented by media9 makes use of Flash which restricts the viable media formats to FLV (already obsolete), H.264, MP3 and SWF.
    – AlexG
    Commented Nov 12, 2015 at 14:19

1 Answer 1


Thanks to @AlexG for directing me to his solution for a closely related question. On closer review, there is no option to include mpg videos in movie15. This functionality has been deprecated together with media9. The newer package only accepts the more compressed, mp4 format.

I used ffmpeg to convert my mpg file to an mp4 file with the command:

ffmpeg -i 4x167_h5_k010.mpg 4x167_h5_k010.mp4

As a note, ffmpeg would not do the conversion until I had a standard aspect ratio. I had created the video using the Movie Maker extension of VMD. To obtain a 3x4 aspect ratio, I used the command display resize 1280 960, then regenerated the mpg video file.

Here is the final working example (with the video loop command):




      &loop=true  % loop the video

  • +1 for VMD, that's exactly what I was doing! Commented Nov 8, 2019 at 16:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .