1. Vedran Miletić
  2. beamer
Issue #188 resolved

Autostart of Video Files not working

Anonymous created an issue

When integrating a video with an autostart attribute

\movie[autoplay,poster,width=8cm,height=6cm]{}{test.avi}

than the Video doesnt Autostart anyway. We first thought it is an pdf - Viewer Problem, but the People on Okular found out that the .pdf is malformed:

https://bugs.kde.org/show_bug.cgi?id=293141

How can we proceed here? Thanks - Mr.Gosh

Comments (7)

  1. Joseph Wright

    Including media is complex: see for example the media9 package for how it is best done when targeting an up-to-date PDF viewer. The linked bug does not say what is wrong with the PDF, so it's a bit hard to know what to change. Could you upload your example PDF?

  2. Joseph Wright

    This is a tricky one. In general, video and similar support is pretty complicated. The 'class leader' for video inclusion is the media9 package, which uses the new features of recent PDF versions to do the job. It works with Adobe Reader and also at least in part with some free PDF viewers: see the discussion on the TeX Live list about this.

    The reason that is important is that it highlights how complex the area is: the correct approach to inclusion depends on the PDF version and viewer, and even then it may not work. The multimedia package has not been altered for some years, as far as I can see, other than a minor change related to PDF mode detection. That suggests to me that fixing this issue would more-or-less require a rewrite of the package, which I feel is not a good idea. I am minded to mark this as WONTFIX, but will wait a few days for counterarguments.

  3. Anonymous

    pdf files that use a MovieAnnotation for video playing (i.e., pdfs created by beamer/multimedia) apparently need to include a LinkMovie annotation for the movie to autostart. Some details are given, e.g., in the discussion here: https://bugs.freedesktop.org/show_bug.cgi?id=40561

    Apparently, this is a regression. The example file posted in https://bugs.kde.org/show_bug.cgi?id=136574 has been created with beamer (a long time ago), and it does contain the LinkMovie annotation.

    Video support for poppler/okular has indeed been coming over the last weeks, but there is no support for media9 at all yet. And it may not come in the near future, because it is quite a beast: media9 relies on flash support in the document viewer. Therefore, proper support for the other ways to include a video in a pdf seems still important.

    Oliver Sander

  4. Joseph Wright

    I've gone over this carefully using a variety of TeX systems, and as I said this is not due to any changes in beamer (indeed, there have been very few in multimedia.sty at all). Using both TeX Live 2009 and 2011, the .avi file in the linked KDE bug report will auto-run when the PDF is created using the latex && dvips && ps2pdf route, using either the TL2009 or TL2011 versions of multimedia.sty. However, I cannot get it to auto-run using pdflatex, again with either version. I note from the metadata in the PDF linked to the KDE bug report that it was created using latex && dvips && ps2pdf.

    Now, what I am not clear on is whether the pdflatex code has ever worked and if so when. Reading the pdfTeX manual, there was at some stage a change in how \pdfobj works, which may be the cause. I've tried a number of combinations of direct PDF specials and none have worked. I will see if I can get some input on this from a PDF expert.

  5. Anonymous

    Ahh... okay. I have never tried doing latex && dvips && ps2pdf, but I can confirm that it does work that way. Thanks for the information. Now it would still be great if it worked with pdflatex too, but I do not claim that it ever did. pdflatex would be nice because it is the default for many people, and switching to latex is a nuisance because you need to convert all your image files. OS

  6. Joseph Wright

    Ensure movie autostart works with pdfTeX (fixes issue #188)

    Thanks to Alexander Grahn for the analysis here. Essentially, we should be using \pdfpageattr, but there are some odd things going on. Rather than have to work through them, and risk breaking other stuff, a separate annotation is used to control the autostart. This should work with players that work with the original inclusion method.

    d8e49ee79bcf

  7. Log in to comment