# How to determine the true size of a swf movie?

I am using the movie15 package to import an swg movie into my beamer presentation. The movie is exported from the Wolfram Mathematica by the

Export["filename.swg", <Animation>]


command together with pdf poster exported by the

Export["filename.pdf", <Animation>]


command. These two files are imported into my presentation by means of the following chunck of text:

\includemovie[
label=movie-1
,text={\includegraphics[width=0.88\textwidth]{filename.pdf}}
]{}{}{filename.swf}


The option

[width=0.88\textwidth]


to the \includegraphics is added here to make the size of the poster approximately equal to the size of the swf movie. Without it imported swf video looks as badly pasteurized bitmap during first run of the movie after loading my presentation into Adobe Reader. During subsequent runs, the movie changes its size to some 'natural size' and looks much better.

Using the above described way of importing the swf movies, I would be happy if I could determine what is the exact value of the 'natural size' of the swf movie to set it through the option of the \includegraphics; current value, [width=0.88\textwidth], is obtained experimentally, it is not exact. Above all, I need several movies to import; they might have different sizes.

So my question is

How one can determine natural size of the swg movie?

Also, I would appreciate any advice on how to improve the above described way of importing an swf movie.

-
Is not [scale=1] what are you looking for? –  Fran Oct 2 '14 at 15:08

How one can determine natural size of the swf movie?

Impossible from within TeX. As for the external determination of the SWF size I'd use the command line tool swfbbox from the swftools bundle, which reads out the bounding box of the file.

-
Another possibility is from within Adobe Acrobat. As of version X the receipt is: Tools | Content | Miltimedia | SWF.... Then drag mouse pointer on a page to draw a rectangular area. In appeared window browse for SWF file and check Show Advanced Options. On the Launch Settings tab you will see width and height of SWF file. –  Igor Kotelnikov May 30 '11 at 9:08
@Igor. Thanks for this hint. BTW, movie15 is somewhat dated now regarding SWF inclusion. I am currently writing a new package for embedding media and flash with AR-9/X compatibility (the AR built-in flash player will be used). –  AlexG May 30 '11 at 9:22
@Igor: ... and XeLaTeX will be supported too. –  AlexG May 30 '11 at 9:28
@Igor: Does Export["filename.pdf", <Animation>] produce a single page PDF file, containing the first frame of the animation only or is it a multi-page PDF with all animation frames and you only use the first frame as the poster image? If it is multipage PDF, consider using the animate package to produce the animation from it. –  AlexG May 31 '11 at 8:51
@Alexander: Actually, I implied a different command, not Export["filename.pdf", <Animation>]. Mahematica 8 is not able to produce multipage PDF. It exports animation to SWF as a bitmap. I found a better way to get SWF: I exported separate frames to single-page PDF, then combine those PDFs into single file using Adobe Acrobat, and then ran pdf2swf utility from swftools to produce swf animation. But I've ran into troubles when trying to compile my doc with xelatex. See my other question at tex.stackexchange.com/questions/20098/… . –  Igor Kotelnikov Jun 7 '11 at 8:14

Here's what I did:

1. Change the file format from SWF to AVI with an encoder (e.g. the MediaInfo addon from the K-Lite Codec Pack)
2. Get the dimensions of the AVI file
3. Re-encode the SWF as an AVI again.
-
Welcome to TeX.SX! How does this answer the question? It's not quite intuitive. –  Christian Hupfer Oct 2 '14 at 15:20