For playback of large video files in the modern MP4/H.264 format using package media9
and Acrobat Reader, the web-server method should be used. Even a 275 MB video file immediately starts playing while being loaded in the background. With this method, the video file is not embedded in the PDF.
A local video file can as well be served by a locally running, lightweight web server such as Nginx. See https://tex.stackexchange.com/a/73039 for instructions.
Edit:
The command
\mediaopts{<media label>}{[autoplay] [, autopause] [, autorewind]}
% autoplay -> play / resume on page-open
% autopause -> pause on page-close
% autorewind -> seek to start on page-close
was added. It allows one to control the media behaviour during page open and page close events. Paused media continue to be loaded in the background.
This is a large video example, using the "Big Buck Bunny" example from Blender.org:
\documentclass{beamer}
\usepackage{fontawesome5}
\usepackage{media9}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \mediaopts{<media label>}{[autoplay] [, autopause] [, autorewind]}
%
% autoplay -> play / resume on page-open
% autopause -> pause on page-close
% autorewind -> seek to start on page-close
%
% Place command directly after \includemedia[...]{...}{...}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ExplSyntaxOn
\NewDocumentCommand\mediaopts{mm}{
\group_begin:
\leavevmode
%reset actions
\tl_clear:N\l_mix_openact_tl \tl_clear:N\l_mix_closeact_tl
%process list of actions
\tl_if_exist:cTF{ann@#1}{
\str_if_eq:eeF{\tl_use:c{ann@#1}}{draft}{
\clist_map_inline:nn{#2}{
\str_case:nn{##1}{
{autoplay}{
\mix_pdfobj:nnn{}{dict}{
/S/RichMediaExecute /TA~\tl_use:c{ann@#1} /TI~\tl_use:c{main@#1}
/CMD~<</C~(play)>>
}
\tl_set:Nx\l_mix_openact_tl{\mix_pdflastobj:}
}
{autopause}{
\mix_pdfobj:nnn{}{dict}{
/S/RichMediaExecute /TA~\tl_use:c{ann@#1} /TI~\tl_use:c{main@#1}
/CMD~<</C~(pause)>>
}
\tl_put_right:Nx\l_mix_closeact_tl{\mix_pdflastobj:}
}
{autorewind}{
\mix_pdfobj:nnn{}{dict}{
/S/RichMediaExecute /TA~\tl_use:c{ann@#1} /TI~\tl_use:c{main@#1}
/CMD~<</C~(rewind)>>
}
\tl_put_right:Nx\l_mix_closeact_tl{\mix_pdflastobj:}
}
}
}
%insert widget annotation
\mix_pdfannot:nnnn{3bp}{3bp}{0pt}{
/Subtype/Widget /T~(mbtn@\int_use:N\g_mix_mbtncnt_int) /FT/Btn/Ff~65537
/AA~<<
/PO~<<
/S/JavaScript/JS~(
if(typeof(annotRM)=='undefined'){annotRM=new~Array();}
if(typeof(annotRM['#1'])=='undefined'){
annotRM['#1']=this.getAnnotRichMedia(\tl_use:c{page@#1},'#1');
}
annotRM['#1'].activated=true;
)
\tl_if_empty:NF\l_mix_openact_tl{/Next~\l_mix_openact_tl}
>>
\tl_if_empty:NF\l_mix_closeact_tl{
/PC~<</S/Named /N/NOP/Next~[\l_mix_closeact_tl]>>
}
>>
}
\mix_appendtofields:n{\mix_pdflastann:}
\int_gincr:N\g_mix_mbtncnt_int
}
}{
\msg_warning:nnx{media9}{undefined~reference}{#1}
\cs_if_exist:NF\g_mix_refundefwarned_tl{
\tl_new:N\g_mix_refundefwarned_tl
\AtEndDocument{\msg_warning:nn{media9}{undefined~references}}
}
}
\group_end:
}
\ExplSyntaxOff
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{frame}{Start}
\end{frame}
\begin{frame}{Remote video}
\noindent\includemedia[
label=bunny,
width=\linewidth,height=0.5625\linewidth, % 16:9
activate=pageopen,
deactivate=onclick, % keep FlashPlayer activated
passcontext,
flashvars={
% source=http://localhost/bbb_sunflower_1080p_30fps_normal.mp4
source=http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4
&autoPlay=true
}
]{}{VPlayer.swf}%
\mediaopts{bunny}{autoplay,autopause}
\mediabutton[mediacommand=bunny:pause, mediacommand=bunny:rewind]{\faStop}\quad
\mediabutton[mediacommand=bunny:playPause]{\faPlay / \faPause}
\end{frame}
\begin{frame}{End}
\end{frame}
\end{document}
multimedia
+\movie
is limited to AVI as video container format and the antique "MS Video 1" codec used for making the video. The video file remains separate from the PDF. Therefore, faster loading. (2) MP4/H264 is the video format to be used with\includemedia
frommedia9
package. Videos take longer to be played, because they are compressed and embedded in the PDF und thus must be unpackaged and decompressed first.media9
+\includemedia
you could try this local web-server based method: tex.stackexchange.com/q/72993