How to include multimedia files in beamer
A quick survey of the unanswered beamer questions suggestions that about 20% of them are about problems with including multimedia files, such as videos or sound files. Many of them are about either using the wrong method for their file type (or the wrong file kind for their method) or use an unsuitable pdf viewer. Maybe this question can help to organise the information a bit.
There are different ways to include multimedia files in beamer, which one work and which ones do not highly depends on the pdf viewer you use and the operating system you are on.
This questions tries to summarize the main information about the different packages which can be used, one answer per package.
Packages covered in this Q&A:
- multimedia
- media9
Tools/Viewers covered in this Q&A:
- pdfpc
Useful Q&As on this site:
beamer media9 multimedia video
add a comment |
A quick survey of the unanswered beamer questions suggestions that about 20% of them are about problems with including multimedia files, such as videos or sound files. Many of them are about either using the wrong method for their file type (or the wrong file kind for their method) or use an unsuitable pdf viewer. Maybe this question can help to organise the information a bit.
There are different ways to include multimedia files in beamer, which one work and which ones do not highly depends on the pdf viewer you use and the operating system you are on.
This questions tries to summarize the main information about the different packages which can be used, one answer per package.
Packages covered in this Q&A:
- multimedia
- media9
Tools/Viewers covered in this Q&A:
- pdfpc
Useful Q&As on this site:
beamer media9 multimedia video
add a comment |
A quick survey of the unanswered beamer questions suggestions that about 20% of them are about problems with including multimedia files, such as videos or sound files. Many of them are about either using the wrong method for their file type (or the wrong file kind for their method) or use an unsuitable pdf viewer. Maybe this question can help to organise the information a bit.
There are different ways to include multimedia files in beamer, which one work and which ones do not highly depends on the pdf viewer you use and the operating system you are on.
This questions tries to summarize the main information about the different packages which can be used, one answer per package.
Packages covered in this Q&A:
- multimedia
- media9
Tools/Viewers covered in this Q&A:
- pdfpc
Useful Q&As on this site:
beamer media9 multimedia video
A quick survey of the unanswered beamer questions suggestions that about 20% of them are about problems with including multimedia files, such as videos or sound files. Many of them are about either using the wrong method for their file type (or the wrong file kind for their method) or use an unsuitable pdf viewer. Maybe this question can help to organise the information a bit.
There are different ways to include multimedia files in beamer, which one work and which ones do not highly depends on the pdf viewer you use and the operating system you are on.
This questions tries to summarize the main information about the different packages which can be used, one answer per package.
Packages covered in this Q&A:
- multimedia
- media9
Tools/Viewers covered in this Q&A:
- pdfpc
Useful Q&As on this site:
beamer media9 multimedia video
beamer media9 multimedia video
edited Aug 1 '18 at 14:48
community wiki
4 revs, 2 users 82%
samcarter
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
media9package
information can be found in the documentation
usage (2code examples to be compiled as separate documents):
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% player (`VPlayer.swf`) and video resource (`eso50supernova.m4v`)
% embedded in the document
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
documentclass{beamer}
usepackage{media9}
begin{document}
begin{frame}{embedded files}
includemedia[
width=0.4linewidth,
totalheight=0.225linewidth,
activate=pageopen,
passcontext, %show VPlayer's right-click menu
addresource=eso50supernova.m4v,
flashvars={
%important: same path as in `addresource'
source=eso50supernova.m4v
}
]{fbox{Click!}}{VPlayer.swf}
end{frame}
end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% player (`VPlayer.swf`) and video resource (`eso50supernova.m4v`)
% loaded from web urls during viewing time
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
documentclass{beamer}
usepackage{media9}
begin{document}
begin{frame}{remote files}
includemedia[
width=0.4linewidth,
totalheight=0.225linewidth,
activate=pageopen,
passcontext, %show VPlayer's right-click menu
flashvars={
source=https://cdn.eso.org/videos/medium_podcast/eso50supernova.m4v
}
]{fbox{Click!}}{http://mirrors.ctan.org/macros/latex/contrib/media9/players/VPlayer.swf}
end{frame}
end{document}
file types:
- SWF (Flash); PRC, U3D (3D content, local files only)
- MP4 (h264 encoded), FLV, MP3 via configurable media players, e. g.
VPlayer.swfandAPlayer.swfbundled withmedia9
- any file type a user-provided SWF app can digest; example: the slide show viewer
SlideShow.swfbundled withmedia9, example on TeX-SX
important note:
viewer:
- Windows: Acrobat Reader, Foxit (configuration), PDF-XChange, all requiring Adobe Flash Player plugin for Firefox (not the ActiveX version)
Linux (x86): only outdated Adobe-Reader-9.4.1 and usingVPlayer9.swf/APlayer9.swfis available natively, Current adobe reader and flash can be installed via wine (see https://tex.stackexchange.com/a/446179/36296)- OSX: Acrobat Reader (Adobe Flash Player plugin required)
- mobile: not supported
1
@Dr.Beeblebrox Thanks for fixing this mistake! So long and thanks for all the fish!
– user36296
May 31 '17 at 20:50
For PDF-Xchange editor, I always get a warningTo view the Flash content in this PDF file, please install the required version of Flash player. However, I am 100% sure that the flash is installed and working properly on all my browsers.
– Diaa
Sep 3 '17 at 16:50
@sam : I think the YT example should be removed as it does not work anymore (YT stopped their Flash based player.).
– AlexG
Mar 3 '18 at 9:56
@AlexG Do you know if there is some other example one could show instead? Or simply remove without replacement?
– user36296
Mar 3 '18 at 13:40
@sam Well, If you know a site serving MP4 video directly viahttp(s)as inhttps://some.video.site/.../some_video.mp4, such a URL could be passed to thesourceFlash variable ofVPlayer.swf. (See second example.) This is the only way to show online video that is still possible. So, maybe yes, the YT example should be removed altogether.
– AlexG
Mar 3 '18 at 14:50
|
show 3 more comments
multimediapackage
If we want to stay in the beamer universe, the package multimedia comes as part of beamer (nevertheless you have to explicitly load it with usepackage{multimedia}).
information can be found in the beameruserguide, section
14.1.1 Including External Animation Files
usage:
The basic command to include a video/audio file is
movie[⟨options⟩]{⟨poster text⟩}{⟨movie filename⟩}, a short MWE can look as the following:
documentclass{beamer}
usepackage{multimedia}
begin{document}
begin{frame}
movie[width=8cm,height=4.5cm]{test}{eso50supernova.mov}
end{frame}
end{document}
This will include a movie of the type
.movwith the specified size.testis the text that will appear on the slide and which, if clicked on, will play the video. There are many possible options, such as using an external viewer, automatically start the video or display an image as preview, please consult the documentation to read more about them.
file types:
- mac:
.mov,... - linux: '.mov', '.flv', '.mp4'
- with external viewer option: everything your external viewer can
- mac:
important note: The video file will not be embedded in
.pdffile, if you want to present the pdf from another computer you also have to copy the movie file.
viewer:
mac: adobe reader (you may have to tell adobe reader to trust this .pdf)
linux: okular (at least under ubuntu 18.04 LTS)
not working: preview (mac), skim (mac), TeXStudio internal viewer (mac)
2
It seems that this solution does not work for mp4 on Windows. Acrobat reader returns "name.mp4 is not a supported file type"... But avi seems to be fine.
– Pygmalion
Jul 16 '17 at 18:02
It also doesn't seem to support mp4 file on mac either, although the Acrobat website seems to suggest it does - just my experience
– Phill
Feb 1 at 0:45
@Phill It might depend on the encoding of the mp4 file
– user36296
Feb 1 at 9:25
add a comment |
pdfpcpdf viewer optionally withpdfpc-commands
pdfpc targets presentations in pdf format regardless of the producer of that presentation. It also supports showing notes on another screen (see this answer), which integrates nicely with the way of adding notes in beamer.
information can be found on the
pdfpchomepage and on their github repository.
usage In their example with movies they provide an example:
documentclass{beamer}
setbeamertemplate{navigation symbols}{} % don't use navigation tools on slides
% use our .sty file for simple movie commands
usepackage{pdfpc-commands}
begin{document}
% Full frame movie exmaple
frame{
frametitle{Example}
Open with: texttt{pdfpc video-example.pdf}
vspace{25pt}
A full frame video using textbf{commands from texttt{pdfpc-commands}} is on the next slide.
}
fullFrameMovie[loop]{apollo17.avi}{apollo17.jpg}{copyrightText{Apollo 17, NASA}}
% Inline movie example
frame{
frametitle{Example 2}
A video using the textbf{commands from texttt{pdfpc-commands}} is on this slide. The video is set to start at 5 seconds and end at 12 seconds.
vspace{20pt}
inlineMovie[loop&autostart&start=5&stop=12]{apollo17.avi}{apollo17.jpg}{height=0.7textheight}
}
% Inline movie example
frame{
frametitle{Example 3}
A video using the textbf{basic syntax} is on this slide. The video is set to start at 5 seconds and end at 12 seconds.
vspace{20pt}
href{run:apollo17.avi?autostart&loop&start=5&stop=12}{includegraphics[height=0.7textheight]{apollo17.jpg}}
}
frame{
frametitle{Image example}
An example full frame textbf{image} is on the next slide.
}
% Full frame iamge example
fullFrameImage{a17_moon.jpg}{copyrightText{Apollo 17, NASA}}
end{document}
The
.styfilepdfpc-commandscan be found in the example.
file types
- those supported by
gst-plugins-goodandgst-libavfor examplemp4andavi
gifnot working
- those supported by
important note: The video file will not be embedded in
.pdffile, if you want to present the pdf from another computer you also have to copy the movie file.viewer:
pdfpcis the viewer available in binary on some linux distros and source for mac and windows. Embedded videos will not play in other pdf viewers (tested withenvinceand TeXStudio internal viewer (linux)).
add a comment |
Following is a wrapper for these commands (described in one of the above answers) to ease the multiple uses. It is demonstrated for media9 package. However, it can be used with any of the above packages.
Define a new command in the preamble-
newcommand{includemovie}[3]{%
includemedia[%
width=#1,height=#2,%
activate=pagevisible,%
deactivate=pageclose,%
addresource=#3,%
flashvars={%
src=#3 % same path as in addresource!
&autoPlay=true % default: false; if =true, automatically starts playback after activation (see option ‘activation)’
%&loop=true % if loop=true, media is played in a loop
%&controlBarAutoHideTimeout=0 % time span before auto-hide
}%
]{fbox{Click!}}{StrobeMediaPlayback.swf}%
}% end of the new command
Later, use this command to insert a video as follows --
begin{frame}{multimedia}
begin{center}%
includemovie{linewidth}{.6linewidth}{video.flv}%
end{center}%
Note from personal experience: with media9, use .flv format rather than .mp4; as not all codecs of mp4 format are supported.
2
Can you please -- as usual here -- make your code snippet compilable?
– Kurt
Mar 29 at 19:14
Isn't this just a wrapper around the command described in the accepted answer?
– TeXnician
2 days ago
@TeXnician yes, the answer is based on command described in the above answer, but I think it simplifies the use greatly. Therefore I think, the reader would appreciate this answer too.
– Bhanuday Sharma
5 hours ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f345431%2fhow-to-include-multimedia-files-in-beamer%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
media9package
information can be found in the documentation
usage (2code examples to be compiled as separate documents):
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% player (`VPlayer.swf`) and video resource (`eso50supernova.m4v`)
% embedded in the document
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
documentclass{beamer}
usepackage{media9}
begin{document}
begin{frame}{embedded files}
includemedia[
width=0.4linewidth,
totalheight=0.225linewidth,
activate=pageopen,
passcontext, %show VPlayer's right-click menu
addresource=eso50supernova.m4v,
flashvars={
%important: same path as in `addresource'
source=eso50supernova.m4v
}
]{fbox{Click!}}{VPlayer.swf}
end{frame}
end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% player (`VPlayer.swf`) and video resource (`eso50supernova.m4v`)
% loaded from web urls during viewing time
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
documentclass{beamer}
usepackage{media9}
begin{document}
begin{frame}{remote files}
includemedia[
width=0.4linewidth,
totalheight=0.225linewidth,
activate=pageopen,
passcontext, %show VPlayer's right-click menu
flashvars={
source=https://cdn.eso.org/videos/medium_podcast/eso50supernova.m4v
}
]{fbox{Click!}}{http://mirrors.ctan.org/macros/latex/contrib/media9/players/VPlayer.swf}
end{frame}
end{document}
file types:
- SWF (Flash); PRC, U3D (3D content, local files only)
- MP4 (h264 encoded), FLV, MP3 via configurable media players, e. g.
VPlayer.swfandAPlayer.swfbundled withmedia9
- any file type a user-provided SWF app can digest; example: the slide show viewer
SlideShow.swfbundled withmedia9, example on TeX-SX
important note:
viewer:
- Windows: Acrobat Reader, Foxit (configuration), PDF-XChange, all requiring Adobe Flash Player plugin for Firefox (not the ActiveX version)
Linux (x86): only outdated Adobe-Reader-9.4.1 and usingVPlayer9.swf/APlayer9.swfis available natively, Current adobe reader and flash can be installed via wine (see https://tex.stackexchange.com/a/446179/36296)- OSX: Acrobat Reader (Adobe Flash Player plugin required)
- mobile: not supported
1
@Dr.Beeblebrox Thanks for fixing this mistake! So long and thanks for all the fish!
– user36296
May 31 '17 at 20:50
For PDF-Xchange editor, I always get a warningTo view the Flash content in this PDF file, please install the required version of Flash player. However, I am 100% sure that the flash is installed and working properly on all my browsers.
– Diaa
Sep 3 '17 at 16:50
@sam : I think the YT example should be removed as it does not work anymore (YT stopped their Flash based player.).
– AlexG
Mar 3 '18 at 9:56
@AlexG Do you know if there is some other example one could show instead? Or simply remove without replacement?
– user36296
Mar 3 '18 at 13:40
@sam Well, If you know a site serving MP4 video directly viahttp(s)as inhttps://some.video.site/.../some_video.mp4, such a URL could be passed to thesourceFlash variable ofVPlayer.swf. (See second example.) This is the only way to show online video that is still possible. So, maybe yes, the YT example should be removed altogether.
– AlexG
Mar 3 '18 at 14:50
|
show 3 more comments
media9package
information can be found in the documentation
usage (2code examples to be compiled as separate documents):
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% player (`VPlayer.swf`) and video resource (`eso50supernova.m4v`)
% embedded in the document
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
documentclass{beamer}
usepackage{media9}
begin{document}
begin{frame}{embedded files}
includemedia[
width=0.4linewidth,
totalheight=0.225linewidth,
activate=pageopen,
passcontext, %show VPlayer's right-click menu
addresource=eso50supernova.m4v,
flashvars={
%important: same path as in `addresource'
source=eso50supernova.m4v
}
]{fbox{Click!}}{VPlayer.swf}
end{frame}
end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% player (`VPlayer.swf`) and video resource (`eso50supernova.m4v`)
% loaded from web urls during viewing time
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
documentclass{beamer}
usepackage{media9}
begin{document}
begin{frame}{remote files}
includemedia[
width=0.4linewidth,
totalheight=0.225linewidth,
activate=pageopen,
passcontext, %show VPlayer's right-click menu
flashvars={
source=https://cdn.eso.org/videos/medium_podcast/eso50supernova.m4v
}
]{fbox{Click!}}{http://mirrors.ctan.org/macros/latex/contrib/media9/players/VPlayer.swf}
end{frame}
end{document}
file types:
- SWF (Flash); PRC, U3D (3D content, local files only)
- MP4 (h264 encoded), FLV, MP3 via configurable media players, e. g.
VPlayer.swfandAPlayer.swfbundled withmedia9
- any file type a user-provided SWF app can digest; example: the slide show viewer
SlideShow.swfbundled withmedia9, example on TeX-SX
important note:
viewer:
- Windows: Acrobat Reader, Foxit (configuration), PDF-XChange, all requiring Adobe Flash Player plugin for Firefox (not the ActiveX version)
Linux (x86): only outdated Adobe-Reader-9.4.1 and usingVPlayer9.swf/APlayer9.swfis available natively, Current adobe reader and flash can be installed via wine (see https://tex.stackexchange.com/a/446179/36296)- OSX: Acrobat Reader (Adobe Flash Player plugin required)
- mobile: not supported
1
@Dr.Beeblebrox Thanks for fixing this mistake! So long and thanks for all the fish!
– user36296
May 31 '17 at 20:50
For PDF-Xchange editor, I always get a warningTo view the Flash content in this PDF file, please install the required version of Flash player. However, I am 100% sure that the flash is installed and working properly on all my browsers.
– Diaa
Sep 3 '17 at 16:50
@sam : I think the YT example should be removed as it does not work anymore (YT stopped their Flash based player.).
– AlexG
Mar 3 '18 at 9:56
@AlexG Do you know if there is some other example one could show instead? Or simply remove without replacement?
– user36296
Mar 3 '18 at 13:40
@sam Well, If you know a site serving MP4 video directly viahttp(s)as inhttps://some.video.site/.../some_video.mp4, such a URL could be passed to thesourceFlash variable ofVPlayer.swf. (See second example.) This is the only way to show online video that is still possible. So, maybe yes, the YT example should be removed altogether.
– AlexG
Mar 3 '18 at 14:50
|
show 3 more comments
media9package
information can be found in the documentation
usage (2code examples to be compiled as separate documents):
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% player (`VPlayer.swf`) and video resource (`eso50supernova.m4v`)
% embedded in the document
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
documentclass{beamer}
usepackage{media9}
begin{document}
begin{frame}{embedded files}
includemedia[
width=0.4linewidth,
totalheight=0.225linewidth,
activate=pageopen,
passcontext, %show VPlayer's right-click menu
addresource=eso50supernova.m4v,
flashvars={
%important: same path as in `addresource'
source=eso50supernova.m4v
}
]{fbox{Click!}}{VPlayer.swf}
end{frame}
end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% player (`VPlayer.swf`) and video resource (`eso50supernova.m4v`)
% loaded from web urls during viewing time
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
documentclass{beamer}
usepackage{media9}
begin{document}
begin{frame}{remote files}
includemedia[
width=0.4linewidth,
totalheight=0.225linewidth,
activate=pageopen,
passcontext, %show VPlayer's right-click menu
flashvars={
source=https://cdn.eso.org/videos/medium_podcast/eso50supernova.m4v
}
]{fbox{Click!}}{http://mirrors.ctan.org/macros/latex/contrib/media9/players/VPlayer.swf}
end{frame}
end{document}
file types:
- SWF (Flash); PRC, U3D (3D content, local files only)
- MP4 (h264 encoded), FLV, MP3 via configurable media players, e. g.
VPlayer.swfandAPlayer.swfbundled withmedia9
- any file type a user-provided SWF app can digest; example: the slide show viewer
SlideShow.swfbundled withmedia9, example on TeX-SX
important note:
viewer:
- Windows: Acrobat Reader, Foxit (configuration), PDF-XChange, all requiring Adobe Flash Player plugin for Firefox (not the ActiveX version)
Linux (x86): only outdated Adobe-Reader-9.4.1 and usingVPlayer9.swf/APlayer9.swfis available natively, Current adobe reader and flash can be installed via wine (see https://tex.stackexchange.com/a/446179/36296)- OSX: Acrobat Reader (Adobe Flash Player plugin required)
- mobile: not supported
media9package
information can be found in the documentation
usage (2code examples to be compiled as separate documents):
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% player (`VPlayer.swf`) and video resource (`eso50supernova.m4v`)
% embedded in the document
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
documentclass{beamer}
usepackage{media9}
begin{document}
begin{frame}{embedded files}
includemedia[
width=0.4linewidth,
totalheight=0.225linewidth,
activate=pageopen,
passcontext, %show VPlayer's right-click menu
addresource=eso50supernova.m4v,
flashvars={
%important: same path as in `addresource'
source=eso50supernova.m4v
}
]{fbox{Click!}}{VPlayer.swf}
end{frame}
end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% player (`VPlayer.swf`) and video resource (`eso50supernova.m4v`)
% loaded from web urls during viewing time
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
documentclass{beamer}
usepackage{media9}
begin{document}
begin{frame}{remote files}
includemedia[
width=0.4linewidth,
totalheight=0.225linewidth,
activate=pageopen,
passcontext, %show VPlayer's right-click menu
flashvars={
source=https://cdn.eso.org/videos/medium_podcast/eso50supernova.m4v
}
]{fbox{Click!}}{http://mirrors.ctan.org/macros/latex/contrib/media9/players/VPlayer.swf}
end{frame}
end{document}
file types:
- SWF (Flash); PRC, U3D (3D content, local files only)
- MP4 (h264 encoded), FLV, MP3 via configurable media players, e. g.
VPlayer.swfandAPlayer.swfbundled withmedia9
- any file type a user-provided SWF app can digest; example: the slide show viewer
SlideShow.swfbundled withmedia9, example on TeX-SX
important note:
viewer:
- Windows: Acrobat Reader, Foxit (configuration), PDF-XChange, all requiring Adobe Flash Player plugin for Firefox (not the ActiveX version)
Linux (x86): only outdated Adobe-Reader-9.4.1 and usingVPlayer9.swf/APlayer9.swfis available natively, Current adobe reader and flash can be installed via wine (see https://tex.stackexchange.com/a/446179/36296)- OSX: Acrobat Reader (Adobe Flash Player plugin required)
- mobile: not supported
edited Aug 22 '18 at 19:13
community wiki
7 revs, 3 users 74%
samcarter
1
@Dr.Beeblebrox Thanks for fixing this mistake! So long and thanks for all the fish!
– user36296
May 31 '17 at 20:50
For PDF-Xchange editor, I always get a warningTo view the Flash content in this PDF file, please install the required version of Flash player. However, I am 100% sure that the flash is installed and working properly on all my browsers.
– Diaa
Sep 3 '17 at 16:50
@sam : I think the YT example should be removed as it does not work anymore (YT stopped their Flash based player.).
– AlexG
Mar 3 '18 at 9:56
@AlexG Do you know if there is some other example one could show instead? Or simply remove without replacement?
– user36296
Mar 3 '18 at 13:40
@sam Well, If you know a site serving MP4 video directly viahttp(s)as inhttps://some.video.site/.../some_video.mp4, such a URL could be passed to thesourceFlash variable ofVPlayer.swf. (See second example.) This is the only way to show online video that is still possible. So, maybe yes, the YT example should be removed altogether.
– AlexG
Mar 3 '18 at 14:50
|
show 3 more comments
1
@Dr.Beeblebrox Thanks for fixing this mistake! So long and thanks for all the fish!
– user36296
May 31 '17 at 20:50
For PDF-Xchange editor, I always get a warningTo view the Flash content in this PDF file, please install the required version of Flash player. However, I am 100% sure that the flash is installed and working properly on all my browsers.
– Diaa
Sep 3 '17 at 16:50
@sam : I think the YT example should be removed as it does not work anymore (YT stopped their Flash based player.).
– AlexG
Mar 3 '18 at 9:56
@AlexG Do you know if there is some other example one could show instead? Or simply remove without replacement?
– user36296
Mar 3 '18 at 13:40
@sam Well, If you know a site serving MP4 video directly viahttp(s)as inhttps://some.video.site/.../some_video.mp4, such a URL could be passed to thesourceFlash variable ofVPlayer.swf. (See second example.) This is the only way to show online video that is still possible. So, maybe yes, the YT example should be removed altogether.
– AlexG
Mar 3 '18 at 14:50
1
1
@Dr.Beeblebrox Thanks for fixing this mistake! So long and thanks for all the fish!
– user36296
May 31 '17 at 20:50
@Dr.Beeblebrox Thanks for fixing this mistake! So long and thanks for all the fish!
– user36296
May 31 '17 at 20:50
For PDF-Xchange editor, I always get a warning
To view the Flash content in this PDF file, please install the required version of Flash player. However, I am 100% sure that the flash is installed and working properly on all my browsers.– Diaa
Sep 3 '17 at 16:50
For PDF-Xchange editor, I always get a warning
To view the Flash content in this PDF file, please install the required version of Flash player. However, I am 100% sure that the flash is installed and working properly on all my browsers.– Diaa
Sep 3 '17 at 16:50
@sam : I think the YT example should be removed as it does not work anymore (YT stopped their Flash based player.).
– AlexG
Mar 3 '18 at 9:56
@sam : I think the YT example should be removed as it does not work anymore (YT stopped their Flash based player.).
– AlexG
Mar 3 '18 at 9:56
@AlexG Do you know if there is some other example one could show instead? Or simply remove without replacement?
– user36296
Mar 3 '18 at 13:40
@AlexG Do you know if there is some other example one could show instead? Or simply remove without replacement?
– user36296
Mar 3 '18 at 13:40
@sam Well, If you know a site serving MP4 video directly via
http(s) as in https://some.video.site/.../some_video.mp4, such a URL could be passed to the source Flash variable of VPlayer.swf. (See second example.) This is the only way to show online video that is still possible. So, maybe yes, the YT example should be removed altogether.– AlexG
Mar 3 '18 at 14:50
@sam Well, If you know a site serving MP4 video directly via
http(s) as in https://some.video.site/.../some_video.mp4, such a URL could be passed to the source Flash variable of VPlayer.swf. (See second example.) This is the only way to show online video that is still possible. So, maybe yes, the YT example should be removed altogether.– AlexG
Mar 3 '18 at 14:50
|
show 3 more comments
multimediapackage
If we want to stay in the beamer universe, the package multimedia comes as part of beamer (nevertheless you have to explicitly load it with usepackage{multimedia}).
information can be found in the beameruserguide, section
14.1.1 Including External Animation Files
usage:
The basic command to include a video/audio file is
movie[⟨options⟩]{⟨poster text⟩}{⟨movie filename⟩}, a short MWE can look as the following:
documentclass{beamer}
usepackage{multimedia}
begin{document}
begin{frame}
movie[width=8cm,height=4.5cm]{test}{eso50supernova.mov}
end{frame}
end{document}
This will include a movie of the type
.movwith the specified size.testis the text that will appear on the slide and which, if clicked on, will play the video. There are many possible options, such as using an external viewer, automatically start the video or display an image as preview, please consult the documentation to read more about them.
file types:
- mac:
.mov,... - linux: '.mov', '.flv', '.mp4'
- with external viewer option: everything your external viewer can
- mac:
important note: The video file will not be embedded in
.pdffile, if you want to present the pdf from another computer you also have to copy the movie file.
viewer:
mac: adobe reader (you may have to tell adobe reader to trust this .pdf)
linux: okular (at least under ubuntu 18.04 LTS)
not working: preview (mac), skim (mac), TeXStudio internal viewer (mac)
2
It seems that this solution does not work for mp4 on Windows. Acrobat reader returns "name.mp4 is not a supported file type"... But avi seems to be fine.
– Pygmalion
Jul 16 '17 at 18:02
It also doesn't seem to support mp4 file on mac either, although the Acrobat website seems to suggest it does - just my experience
– Phill
Feb 1 at 0:45
@Phill It might depend on the encoding of the mp4 file
– user36296
Feb 1 at 9:25
add a comment |
multimediapackage
If we want to stay in the beamer universe, the package multimedia comes as part of beamer (nevertheless you have to explicitly load it with usepackage{multimedia}).
information can be found in the beameruserguide, section
14.1.1 Including External Animation Files
usage:
The basic command to include a video/audio file is
movie[⟨options⟩]{⟨poster text⟩}{⟨movie filename⟩}, a short MWE can look as the following:
documentclass{beamer}
usepackage{multimedia}
begin{document}
begin{frame}
movie[width=8cm,height=4.5cm]{test}{eso50supernova.mov}
end{frame}
end{document}
This will include a movie of the type
.movwith the specified size.testis the text that will appear on the slide and which, if clicked on, will play the video. There are many possible options, such as using an external viewer, automatically start the video or display an image as preview, please consult the documentation to read more about them.
file types:
- mac:
.mov,... - linux: '.mov', '.flv', '.mp4'
- with external viewer option: everything your external viewer can
- mac:
important note: The video file will not be embedded in
.pdffile, if you want to present the pdf from another computer you also have to copy the movie file.
viewer:
mac: adobe reader (you may have to tell adobe reader to trust this .pdf)
linux: okular (at least under ubuntu 18.04 LTS)
not working: preview (mac), skim (mac), TeXStudio internal viewer (mac)
2
It seems that this solution does not work for mp4 on Windows. Acrobat reader returns "name.mp4 is not a supported file type"... But avi seems to be fine.
– Pygmalion
Jul 16 '17 at 18:02
It also doesn't seem to support mp4 file on mac either, although the Acrobat website seems to suggest it does - just my experience
– Phill
Feb 1 at 0:45
@Phill It might depend on the encoding of the mp4 file
– user36296
Feb 1 at 9:25
add a comment |
multimediapackage
If we want to stay in the beamer universe, the package multimedia comes as part of beamer (nevertheless you have to explicitly load it with usepackage{multimedia}).
information can be found in the beameruserguide, section
14.1.1 Including External Animation Files
usage:
The basic command to include a video/audio file is
movie[⟨options⟩]{⟨poster text⟩}{⟨movie filename⟩}, a short MWE can look as the following:
documentclass{beamer}
usepackage{multimedia}
begin{document}
begin{frame}
movie[width=8cm,height=4.5cm]{test}{eso50supernova.mov}
end{frame}
end{document}
This will include a movie of the type
.movwith the specified size.testis the text that will appear on the slide and which, if clicked on, will play the video. There are many possible options, such as using an external viewer, automatically start the video or display an image as preview, please consult the documentation to read more about them.
file types:
- mac:
.mov,... - linux: '.mov', '.flv', '.mp4'
- with external viewer option: everything your external viewer can
- mac:
important note: The video file will not be embedded in
.pdffile, if you want to present the pdf from another computer you also have to copy the movie file.
viewer:
mac: adobe reader (you may have to tell adobe reader to trust this .pdf)
linux: okular (at least under ubuntu 18.04 LTS)
not working: preview (mac), skim (mac), TeXStudio internal viewer (mac)
multimediapackage
If we want to stay in the beamer universe, the package multimedia comes as part of beamer (nevertheless you have to explicitly load it with usepackage{multimedia}).
information can be found in the beameruserguide, section
14.1.1 Including External Animation Files
usage:
The basic command to include a video/audio file is
movie[⟨options⟩]{⟨poster text⟩}{⟨movie filename⟩}, a short MWE can look as the following:
documentclass{beamer}
usepackage{multimedia}
begin{document}
begin{frame}
movie[width=8cm,height=4.5cm]{test}{eso50supernova.mov}
end{frame}
end{document}
This will include a movie of the type
.movwith the specified size.testis the text that will appear on the slide and which, if clicked on, will play the video. There are many possible options, such as using an external viewer, automatically start the video or display an image as preview, please consult the documentation to read more about them.
file types:
- mac:
.mov,... - linux: '.mov', '.flv', '.mp4'
- with external viewer option: everything your external viewer can
- mac:
important note: The video file will not be embedded in
.pdffile, if you want to present the pdf from another computer you also have to copy the movie file.
viewer:
mac: adobe reader (you may have to tell adobe reader to trust this .pdf)
linux: okular (at least under ubuntu 18.04 LTS)
not working: preview (mac), skim (mac), TeXStudio internal viewer (mac)
edited Jul 18 '18 at 13:11
community wiki
2 revs, 2 users 94%
samcarter
2
It seems that this solution does not work for mp4 on Windows. Acrobat reader returns "name.mp4 is not a supported file type"... But avi seems to be fine.
– Pygmalion
Jul 16 '17 at 18:02
It also doesn't seem to support mp4 file on mac either, although the Acrobat website seems to suggest it does - just my experience
– Phill
Feb 1 at 0:45
@Phill It might depend on the encoding of the mp4 file
– user36296
Feb 1 at 9:25
add a comment |
2
It seems that this solution does not work for mp4 on Windows. Acrobat reader returns "name.mp4 is not a supported file type"... But avi seems to be fine.
– Pygmalion
Jul 16 '17 at 18:02
It also doesn't seem to support mp4 file on mac either, although the Acrobat website seems to suggest it does - just my experience
– Phill
Feb 1 at 0:45
@Phill It might depend on the encoding of the mp4 file
– user36296
Feb 1 at 9:25
2
2
It seems that this solution does not work for mp4 on Windows. Acrobat reader returns "name.mp4 is not a supported file type"... But avi seems to be fine.
– Pygmalion
Jul 16 '17 at 18:02
It seems that this solution does not work for mp4 on Windows. Acrobat reader returns "name.mp4 is not a supported file type"... But avi seems to be fine.
– Pygmalion
Jul 16 '17 at 18:02
It also doesn't seem to support mp4 file on mac either, although the Acrobat website seems to suggest it does - just my experience
– Phill
Feb 1 at 0:45
It also doesn't seem to support mp4 file on mac either, although the Acrobat website seems to suggest it does - just my experience
– Phill
Feb 1 at 0:45
@Phill It might depend on the encoding of the mp4 file
– user36296
Feb 1 at 9:25
@Phill It might depend on the encoding of the mp4 file
– user36296
Feb 1 at 9:25
add a comment |
pdfpcpdf viewer optionally withpdfpc-commands
pdfpc targets presentations in pdf format regardless of the producer of that presentation. It also supports showing notes on another screen (see this answer), which integrates nicely with the way of adding notes in beamer.
information can be found on the
pdfpchomepage and on their github repository.
usage In their example with movies they provide an example:
documentclass{beamer}
setbeamertemplate{navigation symbols}{} % don't use navigation tools on slides
% use our .sty file for simple movie commands
usepackage{pdfpc-commands}
begin{document}
% Full frame movie exmaple
frame{
frametitle{Example}
Open with: texttt{pdfpc video-example.pdf}
vspace{25pt}
A full frame video using textbf{commands from texttt{pdfpc-commands}} is on the next slide.
}
fullFrameMovie[loop]{apollo17.avi}{apollo17.jpg}{copyrightText{Apollo 17, NASA}}
% Inline movie example
frame{
frametitle{Example 2}
A video using the textbf{commands from texttt{pdfpc-commands}} is on this slide. The video is set to start at 5 seconds and end at 12 seconds.
vspace{20pt}
inlineMovie[loop&autostart&start=5&stop=12]{apollo17.avi}{apollo17.jpg}{height=0.7textheight}
}
% Inline movie example
frame{
frametitle{Example 3}
A video using the textbf{basic syntax} is on this slide. The video is set to start at 5 seconds and end at 12 seconds.
vspace{20pt}
href{run:apollo17.avi?autostart&loop&start=5&stop=12}{includegraphics[height=0.7textheight]{apollo17.jpg}}
}
frame{
frametitle{Image example}
An example full frame textbf{image} is on the next slide.
}
% Full frame iamge example
fullFrameImage{a17_moon.jpg}{copyrightText{Apollo 17, NASA}}
end{document}
The
.styfilepdfpc-commandscan be found in the example.
file types
- those supported by
gst-plugins-goodandgst-libavfor examplemp4andavi
gifnot working
- those supported by
important note: The video file will not be embedded in
.pdffile, if you want to present the pdf from another computer you also have to copy the movie file.viewer:
pdfpcis the viewer available in binary on some linux distros and source for mac and windows. Embedded videos will not play in other pdf viewers (tested withenvinceand TeXStudio internal viewer (linux)).
add a comment |
pdfpcpdf viewer optionally withpdfpc-commands
pdfpc targets presentations in pdf format regardless of the producer of that presentation. It also supports showing notes on another screen (see this answer), which integrates nicely with the way of adding notes in beamer.
information can be found on the
pdfpchomepage and on their github repository.
usage In their example with movies they provide an example:
documentclass{beamer}
setbeamertemplate{navigation symbols}{} % don't use navigation tools on slides
% use our .sty file for simple movie commands
usepackage{pdfpc-commands}
begin{document}
% Full frame movie exmaple
frame{
frametitle{Example}
Open with: texttt{pdfpc video-example.pdf}
vspace{25pt}
A full frame video using textbf{commands from texttt{pdfpc-commands}} is on the next slide.
}
fullFrameMovie[loop]{apollo17.avi}{apollo17.jpg}{copyrightText{Apollo 17, NASA}}
% Inline movie example
frame{
frametitle{Example 2}
A video using the textbf{commands from texttt{pdfpc-commands}} is on this slide. The video is set to start at 5 seconds and end at 12 seconds.
vspace{20pt}
inlineMovie[loop&autostart&start=5&stop=12]{apollo17.avi}{apollo17.jpg}{height=0.7textheight}
}
% Inline movie example
frame{
frametitle{Example 3}
A video using the textbf{basic syntax} is on this slide. The video is set to start at 5 seconds and end at 12 seconds.
vspace{20pt}
href{run:apollo17.avi?autostart&loop&start=5&stop=12}{includegraphics[height=0.7textheight]{apollo17.jpg}}
}
frame{
frametitle{Image example}
An example full frame textbf{image} is on the next slide.
}
% Full frame iamge example
fullFrameImage{a17_moon.jpg}{copyrightText{Apollo 17, NASA}}
end{document}
The
.styfilepdfpc-commandscan be found in the example.
file types
- those supported by
gst-plugins-goodandgst-libavfor examplemp4andavi
gifnot working
- those supported by
important note: The video file will not be embedded in
.pdffile, if you want to present the pdf from another computer you also have to copy the movie file.viewer:
pdfpcis the viewer available in binary on some linux distros and source for mac and windows. Embedded videos will not play in other pdf viewers (tested withenvinceand TeXStudio internal viewer (linux)).
add a comment |
pdfpcpdf viewer optionally withpdfpc-commands
pdfpc targets presentations in pdf format regardless of the producer of that presentation. It also supports showing notes on another screen (see this answer), which integrates nicely with the way of adding notes in beamer.
information can be found on the
pdfpchomepage and on their github repository.
usage In their example with movies they provide an example:
documentclass{beamer}
setbeamertemplate{navigation symbols}{} % don't use navigation tools on slides
% use our .sty file for simple movie commands
usepackage{pdfpc-commands}
begin{document}
% Full frame movie exmaple
frame{
frametitle{Example}
Open with: texttt{pdfpc video-example.pdf}
vspace{25pt}
A full frame video using textbf{commands from texttt{pdfpc-commands}} is on the next slide.
}
fullFrameMovie[loop]{apollo17.avi}{apollo17.jpg}{copyrightText{Apollo 17, NASA}}
% Inline movie example
frame{
frametitle{Example 2}
A video using the textbf{commands from texttt{pdfpc-commands}} is on this slide. The video is set to start at 5 seconds and end at 12 seconds.
vspace{20pt}
inlineMovie[loop&autostart&start=5&stop=12]{apollo17.avi}{apollo17.jpg}{height=0.7textheight}
}
% Inline movie example
frame{
frametitle{Example 3}
A video using the textbf{basic syntax} is on this slide. The video is set to start at 5 seconds and end at 12 seconds.
vspace{20pt}
href{run:apollo17.avi?autostart&loop&start=5&stop=12}{includegraphics[height=0.7textheight]{apollo17.jpg}}
}
frame{
frametitle{Image example}
An example full frame textbf{image} is on the next slide.
}
% Full frame iamge example
fullFrameImage{a17_moon.jpg}{copyrightText{Apollo 17, NASA}}
end{document}
The
.styfilepdfpc-commandscan be found in the example.
file types
- those supported by
gst-plugins-goodandgst-libavfor examplemp4andavi
gifnot working
- those supported by
important note: The video file will not be embedded in
.pdffile, if you want to present the pdf from another computer you also have to copy the movie file.viewer:
pdfpcis the viewer available in binary on some linux distros and source for mac and windows. Embedded videos will not play in other pdf viewers (tested withenvinceand TeXStudio internal viewer (linux)).
pdfpcpdf viewer optionally withpdfpc-commands
pdfpc targets presentations in pdf format regardless of the producer of that presentation. It also supports showing notes on another screen (see this answer), which integrates nicely with the way of adding notes in beamer.
information can be found on the
pdfpchomepage and on their github repository.
usage In their example with movies they provide an example:
documentclass{beamer}
setbeamertemplate{navigation symbols}{} % don't use navigation tools on slides
% use our .sty file for simple movie commands
usepackage{pdfpc-commands}
begin{document}
% Full frame movie exmaple
frame{
frametitle{Example}
Open with: texttt{pdfpc video-example.pdf}
vspace{25pt}
A full frame video using textbf{commands from texttt{pdfpc-commands}} is on the next slide.
}
fullFrameMovie[loop]{apollo17.avi}{apollo17.jpg}{copyrightText{Apollo 17, NASA}}
% Inline movie example
frame{
frametitle{Example 2}
A video using the textbf{commands from texttt{pdfpc-commands}} is on this slide. The video is set to start at 5 seconds and end at 12 seconds.
vspace{20pt}
inlineMovie[loop&autostart&start=5&stop=12]{apollo17.avi}{apollo17.jpg}{height=0.7textheight}
}
% Inline movie example
frame{
frametitle{Example 3}
A video using the textbf{basic syntax} is on this slide. The video is set to start at 5 seconds and end at 12 seconds.
vspace{20pt}
href{run:apollo17.avi?autostart&loop&start=5&stop=12}{includegraphics[height=0.7textheight]{apollo17.jpg}}
}
frame{
frametitle{Image example}
An example full frame textbf{image} is on the next slide.
}
% Full frame iamge example
fullFrameImage{a17_moon.jpg}{copyrightText{Apollo 17, NASA}}
end{document}
The
.styfilepdfpc-commandscan be found in the example.
file types
- those supported by
gst-plugins-goodandgst-libavfor examplemp4andavi
gifnot working
- those supported by
important note: The video file will not be embedded in
.pdffile, if you want to present the pdf from another computer you also have to copy the movie file.viewer:
pdfpcis the viewer available in binary on some linux distros and source for mac and windows. Embedded videos will not play in other pdf viewers (tested withenvinceand TeXStudio internal viewer (linux)).
edited Aug 1 '18 at 14:54
community wiki
2 revs
Benjamin
add a comment |
add a comment |
Following is a wrapper for these commands (described in one of the above answers) to ease the multiple uses. It is demonstrated for media9 package. However, it can be used with any of the above packages.
Define a new command in the preamble-
newcommand{includemovie}[3]{%
includemedia[%
width=#1,height=#2,%
activate=pagevisible,%
deactivate=pageclose,%
addresource=#3,%
flashvars={%
src=#3 % same path as in addresource!
&autoPlay=true % default: false; if =true, automatically starts playback after activation (see option ‘activation)’
%&loop=true % if loop=true, media is played in a loop
%&controlBarAutoHideTimeout=0 % time span before auto-hide
}%
]{fbox{Click!}}{StrobeMediaPlayback.swf}%
}% end of the new command
Later, use this command to insert a video as follows --
begin{frame}{multimedia}
begin{center}%
includemovie{linewidth}{.6linewidth}{video.flv}%
end{center}%
Note from personal experience: with media9, use .flv format rather than .mp4; as not all codecs of mp4 format are supported.
2
Can you please -- as usual here -- make your code snippet compilable?
– Kurt
Mar 29 at 19:14
Isn't this just a wrapper around the command described in the accepted answer?
– TeXnician
2 days ago
@TeXnician yes, the answer is based on command described in the above answer, but I think it simplifies the use greatly. Therefore I think, the reader would appreciate this answer too.
– Bhanuday Sharma
5 hours ago
add a comment |
Following is a wrapper for these commands (described in one of the above answers) to ease the multiple uses. It is demonstrated for media9 package. However, it can be used with any of the above packages.
Define a new command in the preamble-
newcommand{includemovie}[3]{%
includemedia[%
width=#1,height=#2,%
activate=pagevisible,%
deactivate=pageclose,%
addresource=#3,%
flashvars={%
src=#3 % same path as in addresource!
&autoPlay=true % default: false; if =true, automatically starts playback after activation (see option ‘activation)’
%&loop=true % if loop=true, media is played in a loop
%&controlBarAutoHideTimeout=0 % time span before auto-hide
}%
]{fbox{Click!}}{StrobeMediaPlayback.swf}%
}% end of the new command
Later, use this command to insert a video as follows --
begin{frame}{multimedia}
begin{center}%
includemovie{linewidth}{.6linewidth}{video.flv}%
end{center}%
Note from personal experience: with media9, use .flv format rather than .mp4; as not all codecs of mp4 format are supported.
2
Can you please -- as usual here -- make your code snippet compilable?
– Kurt
Mar 29 at 19:14
Isn't this just a wrapper around the command described in the accepted answer?
– TeXnician
2 days ago
@TeXnician yes, the answer is based on command described in the above answer, but I think it simplifies the use greatly. Therefore I think, the reader would appreciate this answer too.
– Bhanuday Sharma
5 hours ago
add a comment |
Following is a wrapper for these commands (described in one of the above answers) to ease the multiple uses. It is demonstrated for media9 package. However, it can be used with any of the above packages.
Define a new command in the preamble-
newcommand{includemovie}[3]{%
includemedia[%
width=#1,height=#2,%
activate=pagevisible,%
deactivate=pageclose,%
addresource=#3,%
flashvars={%
src=#3 % same path as in addresource!
&autoPlay=true % default: false; if =true, automatically starts playback after activation (see option ‘activation)’
%&loop=true % if loop=true, media is played in a loop
%&controlBarAutoHideTimeout=0 % time span before auto-hide
}%
]{fbox{Click!}}{StrobeMediaPlayback.swf}%
}% end of the new command
Later, use this command to insert a video as follows --
begin{frame}{multimedia}
begin{center}%
includemovie{linewidth}{.6linewidth}{video.flv}%
end{center}%
Note from personal experience: with media9, use .flv format rather than .mp4; as not all codecs of mp4 format are supported.
Following is a wrapper for these commands (described in one of the above answers) to ease the multiple uses. It is demonstrated for media9 package. However, it can be used with any of the above packages.
Define a new command in the preamble-
newcommand{includemovie}[3]{%
includemedia[%
width=#1,height=#2,%
activate=pagevisible,%
deactivate=pageclose,%
addresource=#3,%
flashvars={%
src=#3 % same path as in addresource!
&autoPlay=true % default: false; if =true, automatically starts playback after activation (see option ‘activation)’
%&loop=true % if loop=true, media is played in a loop
%&controlBarAutoHideTimeout=0 % time span before auto-hide
}%
]{fbox{Click!}}{StrobeMediaPlayback.swf}%
}% end of the new command
Later, use this command to insert a video as follows --
begin{frame}{multimedia}
begin{center}%
includemovie{linewidth}{.6linewidth}{video.flv}%
end{center}%
Note from personal experience: with media9, use .flv format rather than .mp4; as not all codecs of mp4 format are supported.
edited 4 hours ago
community wiki
4 revs, 2 users 99%
Bhanuday Sharma
2
Can you please -- as usual here -- make your code snippet compilable?
– Kurt
Mar 29 at 19:14
Isn't this just a wrapper around the command described in the accepted answer?
– TeXnician
2 days ago
@TeXnician yes, the answer is based on command described in the above answer, but I think it simplifies the use greatly. Therefore I think, the reader would appreciate this answer too.
– Bhanuday Sharma
5 hours ago
add a comment |
2
Can you please -- as usual here -- make your code snippet compilable?
– Kurt
Mar 29 at 19:14
Isn't this just a wrapper around the command described in the accepted answer?
– TeXnician
2 days ago
@TeXnician yes, the answer is based on command described in the above answer, but I think it simplifies the use greatly. Therefore I think, the reader would appreciate this answer too.
– Bhanuday Sharma
5 hours ago
2
2
Can you please -- as usual here -- make your code snippet compilable?
– Kurt
Mar 29 at 19:14
Can you please -- as usual here -- make your code snippet compilable?
– Kurt
Mar 29 at 19:14
Isn't this just a wrapper around the command described in the accepted answer?
– TeXnician
2 days ago
Isn't this just a wrapper around the command described in the accepted answer?
– TeXnician
2 days ago
@TeXnician yes, the answer is based on command described in the above answer, but I think it simplifies the use greatly. Therefore I think, the reader would appreciate this answer too.
– Bhanuday Sharma
5 hours ago
@TeXnician yes, the answer is based on command described in the above answer, but I think it simplifies the use greatly. Therefore I think, the reader would appreciate this answer too.
– Bhanuday Sharma
5 hours ago
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f345431%2fhow-to-include-multimedia-files-in-beamer%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown