2

I want to play video in pdf using latex. Following is my sample code. When I try to play it, just an empty screen comes and video is not played. My basic requirement is that it should display picture with play/pause and when I play it should play. I could not understand much from media9 package file. Please help

\documentclass{article}

\usepackage{media9}

\begin{document}

\includemedia[label=videofile, width=1.0\textwidth, addresource=srs.mp4,
flashvars={source=srs.mp4}]{\includegraphics[width=1.0\textwidth]
{views}}{VPlayer.swf} 

\end{document}
percusse
  • 157,807
shivam
  • 53
  • What viewer do you use to open the pdf? – Clément Jul 12 '14 at 20:57
  • I use Adobe reader – shivam Jul 13 '14 at 01:13
  • On Linux? If so, see http://tex.stackexchange.com/a/70931 . Otherwise there may be an issue with the video encoding of your file. Does cube.mp4 from the media9 package play? – AlexG Jul 15 '14 at 10:57
  • When i run srs.mp4 in pdf through latex audio comes but not video – shivam Jul 16 '14 at 09:35
  • Then it is a video encoding issue. Which tool did you use to produce the mp4? Try http://video.online-convert.com/convert-to-mp4 to re-encode the video file into a usable format. – AlexG Jul 17 '14 at 10:31

1 Answers1

3

Flash support has discontinued from Dec 2020. Media9 no longer works as above. Fixes are in Media9 Alternatives