summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/movie15/movie15.tex
blob: 7c2f32ee3d62f0d84458a22fb93f1906d7bb1618 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
% Copyright 2004 Alexander Grahn
%
% This material is subject to the LaTeX Project Public License. See
%    http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
% for the details of that license.
%

\documentclass[a4paper]{article}

%please use pdfLaTeX
\usepackage{ifthen}
\ifthenelse{\isundefined{\pdfoutput}}{%
  \errmessage{Use pdfLaTeX, please!}
}{%
  \ifthenelse{\number\pdfoutput<1}{%
    \errmessage{Use pdfLaTeX, please!}
  }{}
}

\usepackage[3D]{movie15}

\usepackage{ragged2e}
\usepackage{amssymb}
\usepackage[UKenglish]{babel}
\usepackage{color}
\usepackage{graphicx}
\usepackage{hyperref}
\pdfpagewidth595bp
\pdfpageheight842bp
\parindent0pt
\parskip1.2ex

\hypersetup{
  bookmarksnumbered,linktocpage,breaklinks,
  pdftitle={The movie15 Package},
  pdfsubject={Documentation},
  pdfauthor={Alexander Grahn},
  pdfkeywords={embed, embedded, multimedia, movie, sound, 3D, LaTeX, pdfLaTeX, PDF, Adobe},
  citebordercolor={0 0 1},
  filebordercolor={0 0 1},
  linkbordercolor={0 0 1},
  menubordercolor={0 0 1},
  pagebordercolor={0 0 1},
  urlbordercolor={0 0 1}
}

\begin{document}
\title{The {\sffamily movie15} Package}
\author{Alexander Grahn\\[1ex]\includegraphics[height=2.7ex]{mailto}}
\maketitle

\begin{abstract}
A \LaTeX{} package for inclusion of movies, sounds and 3D objects into PDF documents with PDF-1.5/1.6 compatibility.
\end{abstract}

\tableofcontents
\section{Introduction}

The way multimedia content, i.\,e. movies and sounds, is included into PDF has changed with Adobe's PDF specification, version 1.5. PDF-1.5 supports a larger variety of movie and sound formats, limited only by the number of plugins available for Adobe Reader\textsuperscript{\scriptsize\textregistered}. With PDF-1.6, support for 3D objects, stored in the U3D file format, has been added. See Table \ref{table:mime} for a list of viable media formats. The specification allows media file contents to be completely embedded into the PDF output, thus producing selfcontained PDF documents.

This package provides an interface to embed movies, sounds and 3D objects into PDF documents for use with \LaTeX{} as well as pdf\LaTeX. Media file contents is incorporated into PDF output by default. This is done either directly during source processing using pdf\LaTeX{} or during conversion from Postscript to PDF using Ghostscript's \verb+ps2pdf+.

The final PDF output can be viewed with Windows\textsuperscript{\scriptsize\textregistered} and Mac OS\textsuperscript{\scriptsize\textregistered} versions of Adobe Reader. However, embedded media file data can also be extracted and saved to disk from within Readers which support file attachments. This makes PDF documents a little more portable to Readers which do not ship with a multimedia plugin.

\section{Installation}
The file `movie15.sty' should be stored in a place where \LaTeX{} can find it.

\section{Using the package}
Invoke the package by putting the line
\begin{verbatim}
    \usepackage[<package options>]{movie15}
\end{verbatim}
to the preamble of your document, i.\,e. somewhere between \verb+\documentclass+ and \verb+\begin{document}+.

`movie15' takes the option `\verb+3D+'. It enables the 3D feature from the PDF-1.6 specification. Inclusion of 3D files into PDF is discussed separately in section~\ref{3dtut}.

Currently, there are no further options.

If PDF is generated via DVI and Postscript by the usual \verb+latex+ $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+ sequence of commands, the `graphicx' and `hyperref' packages are required and must be loaded \emph{after} `movie15'.

In the case of pdf\LaTeX{}, the `graphicx' and `hyperref' packages are not required.

Note, that more than one run may be necessary to resolve internally created cross-references. Appropriate warnings will be emitted in such cases.

\section{Requirements}
pdf\LaTeX{}, version $\ge1.20$, is needed for direct PDF output.

If the package option `\verb+3D+' is set, `movie15' loads Michael Mehlich's `fp' package for fixed point arithmetic. Since it does not belong to the core packages of most \TeX{} distributions it must be installed prior to selecting the `\verb+3D+' option.

Adobe Reader, version 6, is required for playing movies and sounds, version 7 for rendering embedded 3D content. Unfortunately, only Windows and Mac versions of Adobe Reader provide the necessary plugins.

\section{The user interface}
\subsection{Media inclusion}\label{usrif}
Movies, sounds and 3D objects are embedded into the document using the command
\begin{verbatim}
    \includemovie[<options>]{<width>}{<height>}{<media file>}
\end{verbatim}
Unless left empty (cf. option `\verb+text+') the \verb+<width>+ and \verb+<height>+ arguments must be given in valid \TeX{} dimensions. Horizontal and vertical dimensions of the media clip are scaled independently to fit \verb+<width>+ and \verb+<height>+. \verb+<media file>+ specifies the file name of the media clip. If the media file is embedded as part of the final PDF output, which is the default, it may reside wherever \TeX{} or Ghostscript search for input files, depending on the PDF producing method.

Below, common options to \verb+\includemovie+ are listed. Options specific to embedding of 3D content are discussed separately in section~\ref{3dtut}.
\begin{verbatim}
attach[=false]
\end{verbatim}
By default, the embedded data stream is re-used as embedded file attachment. This makes `movie15' a little more portable to PDF Readers which do not have a multimedia plugin because it gives the user the opportunity to extract the media file and to save it to disk for later playback with an external player. However, support of file attachments is required. Re-use as file attachment can be suppressed with option `\verb+attach=false+'. Note, that `\verb+attach=false+' is a poor method to prevent the user from obtaining a copy of the media file. There are several (free) tools for decompressing and extracting stream objects from PDF files.
\begin{verbatim}
autopause
\end{verbatim}
Pause playing when the page is closed.
\begin{verbatim}
autoplay
\end{verbatim}
Put this option to the options list if you want the playback of the media clip to be started automatically after the page has opened. This is especially useful if there are multiple movie clips on the current page to be played at the same time. Also resumes playback of previously paused media. In the case of embedded sound being started this way, \verb+<width>+ and \verb+<height>+ can be safely set to `0pt' since no further user interaction is necessary to start playing.
\begin{verbatim}
autostop
\end{verbatim}
Stop playing when the page is closed. This is default behaviour. Override with option `\verb+continue+'.
\begin{verbatim}
autoresume
\end{verbatim}
Resume previously paused playback when the page is opened again.
\begin{verbatim}
continue
\end{verbatim}
Continue playback in background on premature page change. However, paused media remain paused. So do media that have reached the end or that still show the poster.
\begin{verbatim}
controls[=true|false]
\end{verbatim}
Player specific controls are displayed during playback of the media clip, if available. For movies and sounds the default is `\verb+false+'; controls are not shown. For 3D content, the default is `\verb+true+', since `\verb+false+' would make the 3D content non-interactive, i.\,e. not responsive to mouse interaction.% All animation would need be driven by JavaScript in this case.
\begin{verbatim}
depth=<depth>
\end{verbatim}
Specifies how far the media display area should extend below the bottom line of the running text. Any valid \TeX{} dimension is accepted.
\begin{verbatim}
externalviewer
\end{verbatim}
Opens and plays the media in an external application.
\begin{verbatim}
inline[=false]
\end{verbatim}
Media file \emph{data} are embedded into PDF output by default.
This can be suppressed with option `\verb+inline=false+'.
\begin{verbatim}
label=<label spec>
\end{verbatim}
The media is labelled with \verb+<label spec>+ such that it can be referenced by the \verb+\movieref+ command elsewhere in the document. The \verb+\movieref+ command creates a hyperlink to either stop, pause, resume the media, to play it with different settings, such as frame rate or volume, or to show a different part of it. \verb+<label spec>+ may consist of any sequence of letters, digits or punctuation characters.
\begin{verbatim}
mimetype=<mimetype>
\end{verbatim}
According to the PDF specification, the viewer application needs to know the MIME type of \verb+<media file>+. Package `movie15' tries to make a guess from the file name extension. If, however, a media file is of unknown type or has a non-standard file name extension, its MIME type must be explicitly specified using this option. See Table \ref{table:mime} for a list of known file name extensions.
\begin{verbatim}
mouse[=true|false]
\end{verbatim}
Enable mouse interaction: Clicking onto the media (giving it the focus) pauses the playback while clicking outside resumes it. Alternatively, once the media has got the focus, repeated pressing of key `P' on the keyboard switches between Play and Pause (at least with some players).
\begin{verbatim}
palindrome[=true|false]
\end{verbatim}
The media is played forward and backward, if supported by the media player. In combination with option `\verb+repeat+' this forward-and-reverse playback repeats as many times as specified. Each complete forward and reverse playback counts as one repeat.
\begin{verbatim}
poster
\end{verbatim}
The first frame of the movie or the frame at the beginning of the movie section specified by the `\verb+startat+' and `\verb+endat+' options is shown.
\begin{verbatim}
poster=<image>
\end{verbatim}
Inserts still image from file \verb+<image>+ to be shown when the media clip is not activated. The file type of \verb+<image>+ depends on the output driver: PS or EPS when using \LaTeX{} together with \verb+dvips+; PDF, PNG or JPEG when using pdf\LaTeX. This option is obsolescent and should not be used any longer. Instead, use option `\verb+text+' if a still image from an external file is to be inserted. See option `\verb+text+' for a possibility to scale the media display area according to the poster image dimensions.
\begin{verbatim}
rate=<rate>
\end{verbatim}
\verb+<rate>+ specifies the playback rate, where $1$ is normal playback, $0.5$ is halfspeed, $2$ is doublespeed, $-1$ is normal speed in reverse etc.
\begin{verbatim}
repeat[=<repeats>]
\end{verbatim}
Playback of the media clip will be repeated \verb+<repeats>+ times. Without argument this option causes the player to repeat forever.
\begin{verbatim}
startat=<offset>
endat=<offset>
\end{verbatim}
Start/stop playback at the specified offsets. \verb+<offset>+ may be an absolute time or frame value, or a named marker, or a marker plus a time or frame. In the latter case, time or frame values are regarded as relative to the named marker. Support of markers, time and frame offsets is media type dependent. Media incompatible offsets are ignored. The following syntax applies to \verb+<offset>+:
\begin{verbatim}
    time:<time in seconds>
    frame:<frame number>
    marker:<quoted string>
\end{verbatim}
Some \verb+<offset>+ examples:
\begin{verbatim}
    time:20.5
    frame:100
    {marker:"Chapter 1", time:60}
\end{verbatim}
\begin{verbatim}
text=<text>
\end{verbatim}
\verb+<text>+ is typeset onto and centred within the media display area which has been specified by the \verb+<width>+ and \verb+<height>+ arguments as well as the `\verb+depth+' option. If either or both of the \verb+<width>+ and \verb+<height>+ arguments are left empty, any unspecified dimension of the media display is scaled to match the corresponding dimension, i.\,e. width and height, of \verb+<text>+. Likewise, the depth of the media display is adjusted to the depth of \verb+<text>+ if the optional `\verb+depth+' has not been given. Therefore, option `\verb+text+' can be used to scale the media display to the natural or scaled dimensions of a poster image file, such as (requires package `graphicx'):
\begin{verbatim}
 \includemovie[text={\includegraphics[scale=2]{path/to/poster}}]
   {}{}{path/to/movie}
\end{verbatim}
\begin{verbatim}
textoverposter[=false]
\end{verbatim}
Set this option to `\verb+false+' if you wish \verb+<text>+ to be obscured by the external poster image which has been inserted with the poster option. Deprecated.
\begin{verbatim}
url
\end{verbatim}
Treat \verb+<media file>+ as URL. Sets option `\verb+inline+' to `\verb+false+' automatically.
\begin{verbatim}
volume=<percentage of original volume>
\end{verbatim}
The meaning of this option should be self explaining.

\subsection{Inclusion of 3D objects}\label{3dtut}
The PDF-1.6 specification, which was introduced with the advent of Adobe Acrobat/Reader 7, allows embedding of 3 dimensional graphic objects, such as CAD models or 3D scientific data, and lets the user interactively manipulate them. At time of writing this documentation, the only supported file format is U3D~\cite{3diforg}, and only one commercial software~\cite{dexp} for exporting into U3D format, yet from a number of CAD and 3D vector formats, including DXF and VRML, was known. However, a tryout version of~\cite{dexp} can be downloaded from the Web site.

Selection of the `\verb+3D+' package option enables the 3D feature. Most of the command options listed in section~\ref{usrif} do what they are supposed to do in the case of embedded 3D as well. Other options are ignored, in particular `\verb+open+', `\verb+repeat+', `\verb+palindrome+', `\verb+startat+', `\verb+endat+', `\verb+rate+' and `\verb+volume+', because they do not make sense, `\verb+inline+' and `\verb+url+', because 3D files are always fully embedded and finally `\verb+mouse+', because 3D objects are interactive by definition.

There are a few options to \verb+\includemovie+ which define how the 3D object is positioned within the viewport of a virtual camera, or conversely, how the virtual camera is positioned and oriented within a coordinate system, called `The World', which bears the 3D object at a fixed position. Fig.~\ref{3dscene} should help to visualise the scenery: The virtual camera is orbiting at a distance of $ROO$ around the centre of orbit, specified by the position vector $\overrightarrow{COO}$; $\sphericalangle AAC$ is the camera's aperture angle. In addition, the direction vector $\overrightarrow{C2C}$ is needed to specify the initial camera position.
\begin{figure}[ht]
  \resizebox{\linewidth}{!}{\input{3dsystem}}
  \caption{Camera and 3D object in the World System $XYZ$; centre of orbit position vector $\vec{COO}$, centre of orbit to camera direction vector $\vec{C2C}$, radius of orbit $ROO$, aperture angle of camera $\sphericalangle AAC$.}\label{3dscene}
\end{figure}

The \emph{default view}, i. e. the view that is shown initially after activating the 3D object in the Reader, can be set using the options `\verb+3Dcoo+' for the centre of orbit, `\verb+3Dc2c+' for the centre of orbit to camera vector, `\verb+3Droo+' for the orbital radius and `\verb+3Daac+' for the aperture angle of the camera:
\begin{verbatim}
3Daac=<angle>
\end{verbatim}
This option sets the aperture angle of the camera, measured in degrees. Fixed point real numbers between 0 and 180 are admissible. A sensible value of 30 is preset by default. Larger values can be used to achieve wide-angle or fish-eye effects, cf. example 2 in section~\ref{examples}.
\begin{verbatim}
3Dc2c=<x> <y> <z>
\end{verbatim}
\verb+<x> <y> <z>+ specify a direction vector $\overrightarrow{C2C}$ of arbitrary length, originating in the centre of orbit and pointing to the virtual camera; cf. option `\verb+3Dcoo+' for the number format of \verb+<x> <y> <z>+. Note, that \emph{top} ({\tt 3Dc2c=0 0 1}) and \emph{bottom views} ({\tt 3Dc2c=0 0 -1}) as well as views with \emph{very small but larger than zero inclination angles} relative to the world axes should be avoided when going the {\tt latex} $\rightarrow$ {\tt dvips} $\rightarrow$ {\tt ps2pdf} route. Due to a bug in Ghostscript they lead to unusable 3D inclusions. This restriction does not apply to pdf\LaTeX!
\begin{verbatim}
3Dcoo=<x> <y> <z>
\end{verbatim}
\verb+<x> <y> <z>+ specify the positional vector $\overrightarrow{COO}$ of the centre of orbit. Only fixed point numbers in the range from -999999999999999999.999999999999999999 to +999999999999999999.999999999999999999 are allowed.
\begin{verbatim}
3Droo=<r>
\end{verbatim}
\verb+<r>+ (always positive!) specifies the radius of orbit $ROO$ of the virtual camera; cf. option `\verb+3Dcoo+' for the number format

Without the above options the immovable camera sits at the origin $(0,0,0)$ of the World, and looks in the positive $Y$ direction, i. e. default settings of \verb+3Droo=0+, \verb+3Dcoo=0 0 0+ and  \verb+3Dc2c=0 -1 0+ are assumed. (Note, that $\overrightarrow{C2C}$ is the opposite of the view vector!)

Therefore, in order to get a `front view' of the 3D object it would be sufficient to gradually increase the radius $ROO$ from \LaTeX{} run to \LaTeX{} run until the object or group of objects can be fully seen in the viewport. Since the object size in terms of world coordinate units may differ in orders of magnitude between U3D files, the optimal `\verb+3Droo+' setting might be found by experimenting with a series of geometrically increasing numbers, such as 1, 10, 100, 1000, 10000, 100000 etc. to get a rough approximation and by a subsequent fine tuning using smaller changes.

Ideally, there should be no need for changing the default setting of \verb+3Dcoo=0 0 0+ for the centre of orbit. However, this requires that the 3D object or group of objects be centred around the world origin $(0,0,0)$ during file export into the U3D format. (This is the default setting with~\cite{dexp}.) If the 3D object apparently pivots around an orbital centre that lies outside of the object's cubature, either the file export could be repeated with appropriate settings or the centre of orbit could be moved into the object centre using the `\verb+3Dcoo+' option. Regarding the latter method, this can be easily achieved if the object is examined from two different directions, say from left (\verb+3Dc2c=-1 0 0+) in order to adjust the \verb+<y>+ and \verb+<z>+ coordinates of `\verb+3Dcoo+' and from front (\verb+3Dc2c=0 -1 0+) in order to adjust the remaining \verb+<x>+ coordinate.

\begin{verbatim}
3Dviews=<views file>
\end{verbatim}
Instead of or in addition to the default view, further \emph{named, predefined views} can be set in an auxiliary file specified by the `\verb+3Dviews+' option. The predefined views can later be selected from a drop down list in the tool bar that is associated with every activated 3D object in the Reader. The file \verb+<views file>+ contains lines which obey the syntax:
\begin{verbatim}
[<name>]{<coo_x> <coo_y> <coo_z>}{<c2c_x> <c2c_y> <c2c_z>}{<roo>}{<aac>}
\end{verbatim}
The \verb+<name>+ entry is optional. If \verb+<name>+ is not given, a default name consisting of `View' followed by the number of the current entry in the list is formed. For \verb+<coo_x>+, \verb+<coo_y>+, \verb+<coo_z>+, \verb+<c2c_x>+, \verb+<c2c_y>+, \verb+<c2c_z>+, \verb+<roo>+ and \verb+<aac>+ the same rules as for the corresponding options `\verb+3Dcoo+', `\verb+3Dc2c+', `\verb+3Droo+' and `\verb+3Daac+' apply. Trailing whitespace or comment signs (\%) are allowed. Reading of the file stops either at its end, at the first empty line encountered or at the first line containing nothing but whitespace and/or a comment sign followed by arbitrary stuff.

\begin{verbatim}
3Dbg=<r> <g> <b>
\end{verbatim}
This option sets the background colour of the canvas. Only fixed point real numbers in the range from 0 to 1 are allowed for the colour components.

\begin{verbatim}
3Djscript=<JavaScipt file>
\end{verbatim}
Things like animation, lighting, background colour etc. may also be script driven. Option `\verb+3Djscript+' associates a \verb+<JavaScipt file>+ with the 3D object. The script will be executed upon activation of the object. Refer to the Acrobat 3D JavaScript Reference~\cite{jscript} for details.

\subsection{Media hyperlinks}
A movie or sound may serve as the destination of hyperlinks, which are inserted into the document using the command
\begin{verbatim}
  \movieref[<options>]{<label spec>}{<text>}
\end{verbatim}
It makes \verb+<text>+ a hyperlink to a movie or sound that has been labelled with \verb+<label spec>+ using the `\verb+label+' option of the \verb+\includemovie+ command. Media hyperlinks can be inserted at any location within the document. Clicking onto the hyperlink causes the Reader to open the page containing the media it is pointing to. Referencing of 3D objects has not been implemented yet.

The primary purpose of media hyperlinks, however, is to provide a means to control the playback of media. Depending on the \verb+<options>+ being in effect, clicking onto the hyperlink causes the media to stop, pause or resume, or to restart at different settings, such as frame rate, volume, starting and ending positions.

Options that control the playback \emph{characteristics} are: `\verb+controls+', `\verb+endat+', `\verb+mouse+', `\verb+palindrome+', `\verb+rate+', `\verb+repeat+', `\verb+startat+' and `\verb+volume+'. Their meaning is the same as for the \verb+\includemovie+ command and can be looked up in section~\ref{usrif}. They take effect in combination with the `\verb+play+' option only.

The options which follow let the hyperlink change the playback \emph{state} of media. If none of them is specified, `\verb+play+' is assumed.
\begin{verbatim}
play
\end{verbatim}
Immediately closes the media and restarts playback. If new playback settings have been specified through the options given above, they override the original settings being in effect during media inclusion.
\begin{verbatim}
stop
\end{verbatim}
Stops and rewinds the media to its beginning or to the `\verb+startat+' position.
\begin{verbatim}
resume
\end{verbatim}
Resumes paused media. In fact, this option makes the hyperlink a toggle switch: repeated clicking switches between paused and resumed state.
\begin{verbatim}
pause
\end{verbatim}
Has the same effect as option `\verb+resume+'. Added for completeness only.
\begin{verbatim}
reset
\end{verbatim}
Revert to the original settings which were in effect during media inclusion.
\begin{verbatim}
close
\end{verbatim}
Immediately closes the media player.

\subsection{Compatibility commands}
Two user commands have been provided that make `movie15' a replacement for the `multimedia' package which is part of Till Tantau's `Beamer' Class:
\begin{verbatim}
  \movie[<options>]{<poster text>}{<media file>}
\end{verbatim}
\begin{verbatim}
  \hyperlinkmovie[<options>]{<label spec>}{<text>}
\end{verbatim}
All of the optional arguments to \verb+\includemovie+ and \verb+\movieref+ can be used with the compatibility macros as well. In addition, they honor the following options:
\begin{verbatim}
height=<height of display>
width=<width of display>
\end{verbatim}
Set the horizontal and vertical dimensions of the media display area (\verb+\movie+ only).
\begin{verbatim}
autostart
\end{verbatim}
The same as `\verb+autoplay+'.
\begin{verbatim}
loop[=<repeats>]
\end{verbatim}
The same as `\verb+repeat+'.
\begin{verbatim}
once
\end{verbatim}
The same as `\verb+repeat=1+'.
\begin{verbatim}
showcontrols
\end{verbatim}
The same as `\verb+controls+'.
\begin{verbatim}
start=<offset in seconds>s
\end{verbatim}
Start playback at the specified temporal offset. The trailing `\verb+s+' is mandatory.
\begin{verbatim}
duration=<duration in seconds>s
\end{verbatim}
The duration of the media segment to be played. The trailing `\verb+s+' is mandatory. Note, that `\verb+duration+' cannot be used together with option `startat' from \verb+\includemovie+. The following options can be combined in order to define a media segment: `\verb+startat+'/`\verb+endat+', `\verb+start+'/`\verb+endat+', `\verb+start+'/`\verb+duration+'.

\section{Examples}\label{examples}
\begin{enumerate}
\item A short circular MPEG movie, taken from \href{http://www.linux-video.net/Samples/}{\tt http://www.linux-video.net/} \href{http://www.linux-video.net/Samples/}{\tt Samples/}

\begin{minipage}{0.5\linewidth}
{\tt%
  \string\includemovie[\\
  \phantom{xx}poster,\\
  \phantom{xx}text=(random.mpg),\\
  \phantom{xx}mouse,\\
  \phantom{xx}repeat\\
  ]\string{\\
  \phantom{xx}.5\string\linewidth\\
  \string}\string{\\
  \phantom{xx}.375\string\linewidth\\
  \string}\string{random.mpg\string}
}
\end{minipage}%
\begin{minipage}{0.5\linewidth}
\begin{center}
  \includemovie[poster, text=(random.mpg), mouse, repeat]{\linewidth}{.75\linewidth}{random.mpg}
\end{center}
\end{minipage}

\item Embedded U3D file. It is based on a VRML model by Peter Whitehouse \href{mailto:pwhitehouse@optusnet.com.au}{\tt <pwhitehouse@optusnet.com.au>}. Conversion to U3D has been made with DeepExploration\textsuperscript{\scriptsize\textregistered}\cite{dexp}. A file `{\tt dice.vws}' that provides predefined views and a JavaScript `{\tt dice.js}' defining light sources have been associated with the 3D object.

\begin{minipage}{0.5\linewidth}
{\tt%
  \string\includemovie[\\
  \phantom{xx}poster,\\
  \phantom{xx}text=(dice.u3d),\\
  \phantom{xx}3Droo=28,\\
  \phantom{xx}3Dc2c=1 -1 1,\\
  \phantom{xx}3Dbg=1 1 1,\\
  \phantom{xx}3Dviews=dice.vws,\\
  \phantom{xx}3Djscript=dice.js\\
  ]\string{\\
  \phantom{xx}.5\string\linewidth\\
  \string}\string{\\
  \phantom{xx}.5\string\linewidth\\
  \string}\string{dice.u3d\string}%
}
\end{minipage}%
\begin{minipage}{0.5\linewidth}
\begin{center}
  \includemovie[poster, text=(dice.u3d), 3Droo=28, 3Dc2c=1 -1 1, 3Dbg=1 1 1, 3Dviews=dice.vws, 3Djscript=dice.js]{\linewidth}{\linewidth}{dice.u3d}
\end{center}
\end{minipage}
\end{enumerate}

\begin{thebibliography}{9}
  \bibitem{pdfspec} Adobe Systems Inc.: \emph{PDF Reference, fifth edition: Adobe Portable Document Format version 1.6}, 2004, Implementation note 144, Appendix H.3, available at: \href{http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/pdf_creation_apis_and_specs/PDFReference.pdf}{\tt http://partners.adobe.com/public/developer/en/acrobat/sdk/} \href{http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/pdf_creation_apis_and_specs/PDFReference.pdf}{\tt pdf/pdf\_creation\_apis\_and\_specs/PDFReference.pdf}.
  \bibitem{3diforg} \href{http://www.3dif.org/}{\tt http://www.3dif.org/}
  \bibitem{dexp} \href{http://www.righthemisphere.com/products/dexp/}{\tt http://www.righthemisphere.com/products/dexp/}
  \bibitem{jscript}  Adobe Systems Inc.: \emph{Adobe Acrobat 7.0 3D JavaScript Reference}, 2005, available at \href{http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/javascript/Acro3DJS.pdf}{\tt http://partners.adobe.com/public/developer/en/ac} \href{http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/javascript/Acro3DJS.pdf}{\tt robat/sdk/pdf/javascript/Acro3DJS.pdf}
\end{thebibliography}

\begin{table}[h]
\caption{Media formats for use with Adobe Reader (partially from \cite{pdfspec})}\label{table:mime}
\RaggedRight
\begin{tabular}[t]{llp{0.36\linewidth}}\hline
Extension & MIME type & Description\\\hline\hline\\[-2.5ex]
aif, aifc, aiff & audio/aiff & Audio Interchange File Format\\
au, snd         & audio/basic & NeXT/Sun Audio Format\\
avi             & video/avi & Audio/Video Interleaved\\
mid, rmi        & audio/midi & Musical Instrument Digital Interface\\
mov, qt         & video/quicktime & Apple QuickTime\\
mp3, m3u        & audio/x-mp3 & MPEG Audio Layer-3\\
mp4             & video/mp4 & MPEG-4 Video/Audio\\
mpeg, mpg       & video/mpeg & MPEG-2 Video\\
ra, ram, rm     & audio/x-pn-realaudio & Real Media\\
smil            & application/smil & Synchronized Multimedia Integration Language\\
swf             & application/x-shockwave-flash & (Adobe?) Macromedia Flash\\
u3d             & model/u3d  & Universal 3D File Format\\
wav             & audio/wav  & MS Audio Format\\
wma             & audio/x-ms-wma & Windows Media Audio\\
wmv             & video/x-ms-wmv & Windows Media Video\\\hline
\end{tabular}
\end{table}
\end{document}