Insert video clip in a lyx presentation and play it in GNU/Linux.

Posted by Orjanp on Stack Overflow See other posts from Stack Overflow or by Orjanp
Published on 2010-03-11T20:18:45Z Indexed on 2010/04/12 14:03 UTC
Read the original article Hit count: 475

Filed under:
|
|
|

How can I insert a video clip into a presentation created in Lyx?

Have seen http://www.latex-community.org/forum/viewtopic.php?f=19&t=48. It works, but there the video starts in the background in an external player.

I would prefer it to be played in the presentation itself. If an external player is used it it should at least start in the foreground. But the presentation takes the foreground. Using evince in GNU/linux as pdf viewer. Beamer is used as a presentation template.

Is it possible to play a video file in an embedded player in the presentation itself?

Created an example presentation. The code is found below.

\documentclass[english]{beamer}
\usepackage{mathptmx}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
 % this default might be overridden by plain title style
 \newcommand\makebeamertitle{\frame{\maketitle}}%
 \AtBeginDocument{
   \let\origtableofcontents=\tableofcontents
   \def\tableofcontents{\@ifnextchar[{\origtableofcontents}{\gobbletableofcontents}}
   \def\gobbletableofcontents#1{\origtableofcontents}
 }
 \makeatletter
 \long\def\lyxframe#1{\@lyxframe#1\@lyxframestop}%
 \def\@lyxframe{\@ifnextchar<{\@@lyxframe}{\@@lyxframe<*>}}%
 \def\@@lyxframe<#1>{\@ifnextchar[{\@@@lyxframe<#1>}{\@@@lyxframe<#1>[]}}
 \def\@@@lyxframe<#1>[{\@ifnextchar<{\@@@@@lyxframe<#1>[}{\@@@@lyxframe<#1>[<*>][}}
 \def\@@@@@lyxframe<#1>[#2]{\@ifnextchar[{\@@@@lyxframe<#1>[#2]}{\@@@@lyxframe<#1>[#2][]}}
 \long\def\@@@@lyxframe<#1>[#2][#3]#4\@lyxframestop#5\lyxframeend{%
   \frame<#1>[#2][#3]{\frametitle{#4}#5}}
 \makeatother
 \def\lyxframeend{} % In case there is a superfluous frame end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usetheme{Warsaw}
\usepackage{hyperref}

\makeatother

\usepackage{babel}

\begin{document}

\title{Testing video}

\makebeamertitle

\lyxframeend{}\section{Testing video}


\lyxframeend{}\subsection{Testing video}


\lyxframeend{}\lyxframe{Testing video}

\href{run:video.wmv}{Movie}

\appendix

\lyxframeend{}
\end{document}

© Stack Overflow or respective owner

Related posts about latex

Related posts about lyx