Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

There are a few question/answers regarding the embedding movies in PDF with pdflatex and special packages. However I find the information dispersed all around and confusing. And so far, in the best cases I get a "3D rendering error in Acrobat Reader" and I don't know what step is failing.

Maybe this particular case serves as guide for a step by step explanation:

0) pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian), Acrobat Reader 9.5.1, Linux (Ubuntu 12.04). Need to upgrade something?

1) Let's start with a movie file: movie.avi with FFmpeg MPEG-4 encoding. Does it need to be encoded in some other way? what is the best tool to reencode? what encodings are going to work? Is a conversion to flv format really necessary?

2) pdflatex: what packages need to be included, media9, movie15 (obsolete?), flashmovie?

3) what is the latex command to include the movie? Can one have the option to keep the file inside the PDF or external?

4) How does one get the playback controls rendered with the movie inside the page? Does one really have to use a third party flash-based movie player? If so which player works with Acrobat 9.5.1?

5) Can I expect the movie to be player inside the PDF page in the monitor? Can one expect to have a preview of the movie (first frame) in the static rendering of the page.

6) Can one expect the resulting PDF and embedded movie to work when switching to Windows/Linux/OSX?

7) Does one need to change (hidden?) security preferences in Acrobat to see the movie?

A solution compatible with beamer is also desirable.

share|improve this question
    
For a more specific version of this question, look here: tex.stackexchange.com/questions/67663/… –  alfC Oct 12 '12 at 5:04
add comment

2 Answers 2

up vote 14 down vote accepted

A more specific and updated answer can be found at http://tex.stackexchange.com/a/70931/1871

(0) As for production of PDF, no update needed. Sadly, there is no media playback (except for 3D) in AR for linux since v. 9.4.1. It was disabled for obscure reasons. Some opensource PDF viewers on Linux support playback of media that were embedded using movie15.

(1) Re-encode for use with media9: ffmpeg -i movie.avi -sameq -vcodec libx264 -x264opts keyint=25 movie.mp4 or ffmpeg -i movie.avi -sameq movie.flv. For movie15 there is probably no re-encoding required, but playback mileage may vary on different computers depending on installed media players and codecs.

(2) media9 or movie15.

(3) media9 and movie15 physically embed media files into the PDF. movie15 allows for external files (option inline=false). Both allow for media loaded from URLs during runtime.

(4) For AR-9/X compatible media (media9), playback controls are provided by the media-player Flash-component being used (e. g. StrobeMediaPlayback.swf or Youtube-URL). AR-9/X compatible media always need a Flash-based media player.

(5) Static images can be inserted with \includegraphics{...} as the next-to-last argument of \includemedia (media9) or with text option of \includemovie (movie15).

(6)media9 embeds Flash (SWF), sound (MP3), video (MP4/h.264, FLV) and 3D (PRC, U3D) with AR-9/X for Win and Mac compatibility. Linux AR-9 only supports embedded 3D. All media files are rendered by the AR built-in FlashPlayer or 3D renderer. Thus, above-mentioned media will reliably play on any Win and MacOSX box with AR-9 or X installed.

movie15 embeds sound, video, Flash and 3D with AR-6/7/8 compatibility. Again, Linux version of AR only supports 3D. Okular, Evince support video playback on Linux. Note that all PDF viewers including AR on Win and Mac depend on third-party media players that must be installed on the host computer. Thus, media file formats and codecs that can be played back highly depend on the available players. The risk of failure is high, in particular in a conference/lecture situation on an unknown computer.

(7)media9: no; movie15: yes

share|improve this answer
    
thanks for the detailed information. Specially the data of step 0. I am already stuck at step 1. First, ffmpeg says it is "deprecated software", Second I get this error: "Failed to set value 'keyint=25'" or (if I remove keyint) "Unknown encoder 'libx264'" (I have libx264 installed in Ubuntu). –  alfC Jun 22 '12 at 8:23
    
@alfC: ffmpeg is actively developed. Go here and look for Linux distribution specific information. Alternatively you could use an online service to convert your media files, such as zamzar.com flvencoder.com or mediaconverter.org –  AlexG Jun 22 '12 at 11:57
    
Yes, ffmpeg is debian-deprecated probably, it suggests to use avconv instead. Still works, I am using ffmpeg version 0.8.3-4:0.8.3. The main problem is that it doesn't recognize the options -vcodec libx264 -x264opts keyint=25. Is there an alternative codec? what is exactly the specification of the encoding needed?. If I ran ffmpeg -codecs no *264 encoder is reported to be avalable and libx264 doesn't appear in the list. –  alfC Jun 22 '12 at 17:39
    
@alfC:FLV (Flash Video) as video format will do as well; see my answer. As a last resort, if all fails, use an online service. –  AlexG Jun 25 '12 at 7:29
    
+1 but unfortunately I cannot yet verify that these step by step instructions work, because I don't have access to a system other than linux in which I couldn't make these instructions to work. For a follow up question that I could test and works, look at tex.stackexchange.com/questions/67663/… –  alfC Sep 9 '12 at 9:38
show 3 more comments

i managed (media9) by using the adobe reader 9.4.1 ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.4.1/enu/ BUT using the flash player VPlayer9.swf http://ctan.mackichan.com/macros/latex/contrib/media9/players/VPlayer9.swf

thanks Alex!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.